35 lines
1.3 KiB
Markdown
35 lines
1.3 KiB
Markdown
# install
|
|
sudo apt-get update
|
|
sudo apt update
|
|
sudo apt install gnupg
|
|
sudo apt-get 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 $(lsb_release -cs) stable"
|
|
sudo apt-get update
|
|
sudo apt-get install docker-ce
|
|
|
|
# add portainer
|
|
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always --pull=always -v /var/run/docker.sock:/var/run/docker.sock -v /mnt/storage/docker_volumes/portainer_data:/data portainer/portainer-ce
|
|
|
|
# change portainer admin password
|
|
docker stop portainer
|
|
docker pull portainer/helper-reset-password
|
|
docker run --rm -v /mnt/storage/docker_volumes/portainer_data:/data portainer/helper-reset-password
|
|
|
|
|
|
# start
|
|
sudo systemctl start docker
|
|
sudo systemctl enable docker
|
|
|
|
|
|
# build image
|
|
sudo docker build -t your-image-name .
|
|
|
|
# attach to container
|
|
docker exec -it potainer /bin/sh
|
|
|
|
# on windows - setup port forwarding
|
|
#netsh interface portproxy add v4tov4 listenaddress=127.0.0.1 listenport=9000 connectaddress=172.29.111.255 connectport=9000
|
|
netsh interface portproxy add v4tov4 listenport=9000 listenaddress=0.0.0.0 connectport=9000 connectaddress=172.29.104.23
|
|
netsh interface portproxy delete v4tov4 listenaddress=127.0.0.1 listenport=9000
|