Chameera Dinesh Kumara Loku Hewa Gamage
sudo apt update
sudo apt install apt-transport-https ca-certificates curl 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 bionic stable"
sudo apt update
apt-cache policy docker-ce
docker-ce:
Installed: (none)
Candidate: 18.03.1~ce~3-0~ubuntu
Version table:
18.03.1~ce~3-0~ubuntu 500
500 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages
docker-ce
is not installed, but the candidate for installation is from the Docker repository for Ubuntu 18.04 (bionic)
.sudo apt install docker-ce
sudo systemctl status docker
docker
command can only be run the root
user or by a user in the docker
group, which is automatically created during Docker's installation process. If you attempt to run the docker command without prefixing it with sudo
or without being in the docker group, you'll get an output like this.
docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?. See 'docker run --help'.
sudo
whenever you run the docker
command, add your username to the docker
group.
sudo usermod -aG docker ${USER}
su - ${USER}
docker
.sudo apt install docker-compose
docker-compose --version
docker-compose up -d
docker-compose exec app php artisan migrate
./etc/hosts
file to load the laravel site and phpmyadmin.
127.0.0.1 ervapp.local pma.ervapp.local
docker-compose kill
. If you'd like to remove them all together, after stopping run docker-compose rm
.