1.# Enable hyper-v
:: Bios & Windows
c:\bcdedit /set hypervisorlaunchtype auto
2.# Download and install Docker
1.Docker Installation on Ubuntu
sudo apt-get remove docker docker-engine docker.io
sudo apt-get update
sudo apt install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
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 -v
sudo docker run hello-world
sudo systemctl enable docker
sudo systemctl start docker
2.Portainer Installation
# docker volume create portainer_data
# docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
3.Docker Endpoint (Remote API)
#sudo vi /lib/systemd/system/docker.service
#ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:4243 -H
#unix:///var/run/docker.sock
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:4243 --containerd=/run/containerd/containerd.sock
sudo systemctl daemon-reload
sudo systemctl restart docker
sudo curl http://localhost:4243/version
4.Docker basic command
# docker ps
# docker ps -a
# docker stop rabbitmq && docker rm -f rabbitmq
#Install tomcat
ไม่มีความคิดเห็น:
แสดงความคิดเห็น