Skip to main content

Creating Your First Container

We will be installing Portainer, an open-source web application that makes it easy to manage Docker from your browser.

1000006140.png

https://docs.portainer.io/start/install-ce/server/docker/linux

https://www.portainer.io/blog/portainer-and-rootless-docker

 

Need to use sudo to get access to docker socket.

sudo docker volume create portainer_data

Will return name of container.

sudo docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.21.5

This adds port 9000, which isn't used by default.  This allows Portainer to be accessed through HTTP instad of HTTPS.

Docker will download the image and start the container.

docker ps

Go to localhost:9000

Create administrator account.  This can time out if you do not do it right away.  This will require stopping and restarting the portainer container.

Hit Get Started to use the default docker environment.