$ sudo apt-get remove docker docker-engine docker.io containerd runc
$ sudo apt-get update
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
$ sudo docker run hello-world
$ sudo groupadd docker
$ sudo usermod -aG docker $USER
$ sudo reboot
$ docker run hello-world
The preferred way to install
docker-compose
is thru thepython-pip
$ sudo apt-get update
$ sudo apt-get install python-pip
$ sudo pip install docker-compose
$ sudo apt-get install python-pip
$ sudo pip install docker-compose
Check docker-compose configuration:
docker-compose config
On very first start of this configuration or on cofirutaion update, you should up the configuration with the --build
key
docker-compose up -d --build
On regular start:
docker-compose up -d
If you need to watch the output of echo server in dev mode:
docker-compose up | grep node_
For checking current status:
docker-compose ps
If everything is ok you should see something like this:
Name Command State Ports
---------------------------------------------------------------------------------------------------------------------------
project_db_1 docker-entrypoint.sh mysqld Up 0.0.0.0:3366->3306/tcp
project_main_1 /entrypoint supervisord Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp, 0.0.0.0:9001->9000/tcp
project_node_1 laravel-echo-server start ... Up 0.0.0.0:6001->6001/tcp project_redis_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp
docker-compose exec main composer install --working-dir=/var/www/project/src/backend
docker-compose exec --workdir=/var/www/project/src/backend main npm install