mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 05:54:19 +01:00
* Add Vagrantfile for development with an Ubuntu base box * Add Docker support to Vagrant VM
This commit is contained in:
38
scripts/install_docker_ubuntu.sh
Normal file
38
scripts/install_docker_ubuntu.sh
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script to install docker in Debian Guest VM
|
||||
# per: https://docs.docker.com/engine/installation/linux/debian/#install-docker-ce
|
||||
|
||||
# Install packages to allow apt to use a repository over HTTPS
|
||||
sudo apt-get install -y \
|
||||
python-pip
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg2 \
|
||||
software-properties-common
|
||||
|
||||
# Add Docker’s official GPG key
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||
|
||||
# Set up the stable repository.
|
||||
sudo add-apt-repository \
|
||||
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
|
||||
$(lsb_release -cs) \
|
||||
stable"
|
||||
|
||||
# Update the apt package index
|
||||
sudo apt-get update
|
||||
|
||||
# Install the latest version of Docker
|
||||
sudo apt-get install -y docker-ce
|
||||
|
||||
# Add user to the docker group
|
||||
# Warning: The docker group grants privileges equivalent to the root user.
|
||||
sudo usermod -aG docker ubuntu
|
||||
|
||||
# Configure Docker to start on boot
|
||||
sudo systemctl enable docker
|
||||
|
||||
# Install docker-compose
|
||||
sudo pip install docker-compose
|
||||
Reference in New Issue
Block a user