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.pngCapture9.PNG

You can find the official Portainer installation guide on their website.

We are adding port 9000 which isn't used by default.  This allows Portainer to be accessed through HTTP instead of HTTPS.

Using the terminal, we will issue the command to start our new Docker 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 /srv/portainer:/data portainer/portainer-ce

Docker will download the image and start the container.  Once the command has finished, we can verify that Portainer is operational by querying Docker's running containers:

docker ps

The command should return our running Portainer container and show that it's available under four different ports.  

In order to configure our instance of Portainer, we will need to open a web browser.  

We recommend Mozilla Firefox, but Google Chrome will also work. 

Once the web browser is open, go to http://localhost:9000/ to load Portainer.  Here, we are instructed to create an administrator account and set a secure password.  This will be used in the future to login to Portainer.

The account creation wizard will time-out if not completed quickly.
If this happens, restart Portainer with the command: docker restart portainer.

Once we have created an account, we will be able to select our Docker service.  If everything is working as expected, you should be able to click 'Get Started' to use the local Docker service.

Capture5.PNG

Capture4.PNG

Capture3.PNG

Capture2.PNG

Capture.PNG

Configure the instance name and IP address.

Capture8.PNG

Capture7.PNG

Capture6.PNG