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/linuxYou can find the official Portainer installation guide on their website.

https://www.portainer.io/blog/portainer-and-rootless-dockerOpening our terminal, we will issue the command that will start our new Docker container:

 

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 name=portainer --restart=always -v /var/run/$XDG_RUNTIME_DIR/docker.sock:/var/run/docker.sock -v portainer_data:/srv/portainer:/data portainer/portainer-ce:2.21.5ce

 

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.