We use cookies to help us improve our webpage. Please read our Cookie Policy .

NAS 145

Introducing Portainer

Use Portainer to pull images and deploy containers in ASUSTOR NAS

2019-01-25

COURSE OBJECTIVES

Upon completion of this course you should be able to:
1. Use Portainer to pull images in Docker.
2. Use Portainer to deploy containers in Docker.


PREREQUISITES

Course Prerequisites:
N/A

Students are expected to have a working knowledge of:
Docker / Image / Container


OUTLINE

1. Install Portainer

2. Manage Local Docker environment

3. Pull Images of Docker

3.1 Search image path in dockerhub

3.2 Pull Images

4. Deploy Containers

5. Add Endpoint





1. Install Portainer

STEP 1

  • Using your Web browser, log in to ADM using the “admin” account.
  • Select [App Central] [ASUSTOR Apps].
  • Select [Portainer] and then click on [Install].


Applicable Models: AS31, 32, 40, 50, 51, 61, 62, 63, 64 and 70.


STEP 2

  • App Central will install docker-ce first if it is not installed, and then install Portainer.
  • Locate the [Portainer] icon in the ADM desktop and click on it to open Portainer.
  • Please use the account information in App Central description of Portainer to create administrator account in Portainer.
  • You can change the password in [ Users ] settings of Portainer.





2. Manage Local Docker environment

Please setup local Docker environment first while Portainer initialization.

  • Select [Local] and then click on [Connect].


  • Select [local] in [Endpoints] settings of Portainer.
  • Setup Public IP of NAS as Docker container default IP in [Endpoint details] page.




  • 3. Pull Images of Docker

    3.1 Search image path in dockerhub

    Portainer will pull Docker images from dockerhub. Images with same function or name may have different versions uploading by different developers. To get correct Docker image, please search the image name in dockerhub first.
    Ex: [dockerhub]

  • Search for "phpmyadmin" in dockerhub, the most popular version will be listed first. Click on the desired item to get into the detail page.


  • You can find the image path in the [Docker Pull Command] field.



  • 3.2 Pull Images

  • Select [Images] settings of Portainer.
  • Setup Image name got from dockerhub in the [Pull image] page, and then click on [Pull the Image].
  • Portainer will download the image with [latest] tag. Users can download the versions of other tags according to the instructions in dockerhub.


  • The time required to pull an image will vary. The page displays the status of the download while downloading.


  • After the download is completed, the image with “Unused” tag will be displayed in the image list if the image is still not deployed yet.




  • 4. Deploy Containers

    You can deploy the container when the image is downloaded. Once the container is successfully deployed, it can be used normally.

  • Select [Containers] settings of Portainer.
  • Click on [Add container] in the [Container list] page.


  • Setup the name and desired image of the Container in [Create container] page.
  • Enable [Publish all exposed ports] option is recommended and then click on [Deploy the container].


  • After the container is successfully deployed, the container will be started directly. All the deployed containers in the Docker will be listed in the Container list and users can operate the individual container from the list.


  • After the container has been deployed, you can launched the web UI of the container in new tab of the browser.

    Take Wordpress as an example. Click on [Published Ports] in the list and Portainer will launch Wordpress web UI in the new tab of the browser.

    Note: Please reference [2. Manage Local Docker environment] to setup Public IP if the IP is 0.0.0.0.






    5. Add Endpoint

    Users can operate another NAS Docker in Portainer, if there are other ASUSTOR NAS with docker-ce in the LAN.

  • Select [Endpoints] settings of Portainer.
  • Click on [Add endpoint] in the [Endpoints] page.


  • Setup the name and URL of the endpoint in the [Create endpoint] page, and then click on [Add endpoint].


  • After the endpoint is added, select [Home] of Portainer to browse different Endpoints.

  • Was this article helpful? Yes / No