To install Docker Engine, visit here
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo groupadd docker
sudo usermod -aG docker $USER
For any other user (e.g mbaye) do:
sudo usermod -aG docker mbaye
Source is there
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
sudo systemctl enable docker
Start a mysql container with existing dumps. For that mount the directory where dumps live on /docker-entrypoint-initdb.d. See Official Documentation (Initializing a fresh instance). For example in this case I have a dump of my test database, and I want to start a new Docker container that will restore that one.
docker run --name mysql_cidemia_test -v ~/databases/backups/cidemia/test:/docker-entrypoint-initdb.d -p 13306:3306 -e MYSQL_ROOT_PASSWORD=cidemia -e MYSQL_DATABASE=cidemia_dev -e MYSQL_USER=cidemia -e MYSQL_PASSWORD=cidemia mysql:5.7.20