Docker is a containerization platform. Docker is used to running lightweight containers on your computer.

Synology NAS has official support for Docker. Docker can be an alternative to virtual machines. If you don’t have enough memory to run virtual machines on your Synology NAS, you can run Docker containers instead. Docker containers require a very little amount of memory and system resources to run.

In this article, I will show you how to install and use Docker on Synology NAS. So, let’s get started.

Installing Docker on Synology NAS:

Synology NAS products officially support Docker. To use Docker on your Synology NAS, you need to install the Docker app from the Synology Web GUI.

First, open the Package Center app from the Synology Web GUI.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-136.png" data-lazy- height="830" src="data:image/svg xml,” width=”1289″>

Search for docker in Package Center. The Docker app should be listed, as you can see in the screenshot below.

Click on the Docker app.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-137.png" data-lazy- height="750" src="data:image/svg xml,” width=”1289″>

Click on Install to install the Docker app on your Synology NAS.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-138.png" data-lazy- height="750" src="data:image/svg xml,” width=”1289″>

Select the volume you want to install and keep Docker data using the dropdown menu and click on Next as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-139.png" data-lazy- height="618" src="data:image/svg xml,” width=”1072″>

Click on Apply.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-140.png" data-lazy- height="616" src="data:image/svg xml,” width=”1072″>

The Docker app is being installed. It may take a few seconds to complete.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-141.png" data-lazy- height="750" src="data:image/svg xml,” width=”1289″>

At this point, the Docker app should be installed.

You can click on Open to open the Docker app from the Package Center app as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-145.png" data-lazy- height="626" src="data:image/svg xml,” width=”1079″>

You can also open the Docker app from the Main Menu of Synology Web GUI, as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-147.png" data-lazy- height="750" src="data:image/svg xml,” width=”1289″>

As you’re running the Docker app for the first time, you will see the following dialog window.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-153.png" data-lazy- height="578" src="data:image/svg xml,” width=”1069″>

If you don’t want to see it every time you open the Docker app, check the Don’t show this again checkbox and close the dialog window as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-155.png" data-lazy- height="585" src="data:image/svg xml,” width=”1075″>

The Docker app should be ready to use.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-158.png" data-lazy- height="581" src="data:image/svg xml,” width=”1072″>

Downloading Docker Images:

You can download Docker images from the Registry tab of the Docker app. By default, the Docker images available in the Docker Hub registry are displayed. You can add other Docker registries and download Docker images from there as well. I will show you how to add your own Docker registry in a later section of this article.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-160.png" data-lazy- height="580" src="data:image/svg xml,” width=”1075″>

To download a Docker image from the Docker Hub registry, type in your search keyword (httpd, let’s say) and click on Search as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-162.png" data-lazy- height="577" src="data:image/svg xml,” width=”1068″>

The Docker images that matched the search keyword should be listed.

If you like a Docker image and would like to know more about it, click on the<img data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-164.png" height="18" src="data:image/svg xml,” width=”18″>

icon to visit that Docker image’s official web page.For example, to know more about the httpd Docker image, click on the <img data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-165.png" height="18" src="data:image/svg xml,” width=”18″> icon as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-166.png" data-lazy- height="578" src="data:image/svg xml,” width=”1068″>

A new browser tab should open the Docker Hub page of the httpd Docker image, as you can see in the screenshot below. You can find all the information you need about the httpd Docker image on this page.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-167.png" data-lazy- height="830" src="data:image/svg xml,” width=”1289″>

If you like a Docker image and you would like to download it, select it and click on Download as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-168.png" data-lazy- height="577" src="data:image/svg xml,” width=”1070″>

Select the tag of your selected Docker image from the dropdown menu you want to download and click on Select as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-169.png" data-lazy- height="582" src="data:image/svg xml,” width=”1069″>

As you can see, 1 new image is being downloaded.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-170.png" data-lazy- height="586" src="data:image/svg xml,” width=”1078″>

Navigate to the Image section to see the download progress.

As you can see, the httpd: latest Docker image is being downloaded.

As long as the Docker image is downloaded, the Disk icon (<img data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-171.png" height="24" src="data:image/svg xml,” width=”28″>

) will animate.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-172.png" data-lazy- height="579" src="data:image/svg xml,” width=”1078″>

Once the download is complete, the disk icon (<img data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-173.png" height="24" src="data:image/svg xml,” width=”22″>

) animation should stop.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-174.png" data-lazy- height="582" src="data:image/svg xml,” width=”1070″>

I have downloaded another Docker image php: latest, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-175.png" data-lazy- height="578" src="data:image/svg xml,” width=”1072″>

The size of the Docker images you’ve downloaded should be displayed in the Image section, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-176.png" data-lazy- height="581" src="data:image/svg xml,” width=”1069″>

Managing Docker Images:

You can manage your downloaded Docker images from the Image section of the Docker app.

You can export a Docker image from the Docker app to your Synology NAS shares.

To export a Docker image (php: latest, let’s say), select the Docker image and click on Export as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-177.png" data-lazy- height="579" src="data:image/svg xml,” width=”1073″>

Select a folder (docker-images/, let’s say) from one of your Synology NAS shares (share2, let’s say) where you would like to export the Docker image and click on Select marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-178.png" data-lazy- height="584" src="data:image/svg xml,” width=”1071″>

As you can see, the Docker image php: latest is being exported. It may take a few seconds to complete.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-179.png" data-lazy- height="573" src="data:image/svg xml,” width=”1066″>

Once the Docker image is exported, you should find a new archive file (php(latest).syno.tar in my case) in the folder you’ve exported; the Docker image can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-180.png" data-lazy- height="296" src="data:image/svg xml,” width=”927″>

Now, let’s remove the php: latest Docker image and import it back.

To remove a Docker image, select the Docker image you want to remove and click on Delete, as shown in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-181.png" data-lazy- height="578" src="data:image/svg xml,” width=”1070″>

To confirm the removal operation, click on Delete as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-182.png" data-lazy- height="578" src="data:image/svg xml,” width=”1070″>

The php: latest Docker image should be removed, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-183.png" data-lazy- height="581" src="data:image/svg xml,” width=”1069″>

To import the php: latest Docker image from the exported Docker image file, click on Add > Add From File as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-184.png" data-lazy- height="574" src="data:image/svg xml,” width=”1069″>

Select the Docker image file you’ve just exported and click on Select as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-185.png" data-lazy- height="586" src="data:image/svg xml,” width=”1075″>

The php: latest Docker image should be imported, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-186.png" data-lazy- height="583" src="data:image/svg xml,” width=”1069″>

Managing Docker Registries:

By default, the official Docker registry Docker Hub is used on the Docker app. So, you can search for and download all the Docker images available on Docker Hub. That is more than enough for most people. But, if you do need to add third-party Docker registries or your own Docker registries, you can do it as well.

To manage Docker registries, click on Settings from the Registry section as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-187.png" data-lazy- height="582" src="data:image/svg xml,” width=”1070″>

By default, you will have the following Docker registries. The Docker Hub registry and the Aliyun Hub registry.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-188.png" data-lazy- height="580" src="data:image/svg xml,” width=”1070″>

Use the Aliyun Hub registry instead of the Docker Hub registry, select it and click on Use as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-189.png" data-lazy- height="580" src="data:image/svg xml,” width=”1071″>

The Aliyun Hub registry should be activated, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-190.png" data-lazy- height="582" src="data:image/svg xml,” width=”1078″>

To add a new Docker registry, click on Add as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-191.png" data-lazy- height="585" src="data:image/svg xml,” width=”1079″>

Type in the information of the Docker registry you want to add and click on Confirm.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-192.png" data-lazy- height="585" src="data:image/svg xml,” width=”1081″>

A new Docker registry should be added, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-193.png" data-lazy- height="578" src="data:image/svg xml,” width=”1071″>

You can edit a Docker registry you’ve added recently as well.

To edit a Docker registry, select it and click on Edit as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-194.png" data-lazy- height="588" src="data:image/svg xml,” width=”1077″>

Now, make the necessary changes and click on Confirm to save the changes.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-195.png" data-lazy- height="581" src="data:image/svg xml,” width=”1071″>

To remove a Docker registry, select it and click on Delete as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-196.png" data-lazy- height="580" src="data:image/svg xml,” width=”1071″>

The selected Docker registry should be removed.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-197.png" data-lazy- height="582" src="data:image/svg xml,” width=”1074″>

Creating Docker Containers:

To create a Docker container, navigate to the Image section of the Docker app. Then, select the Docker image you want to use to create the container and click on Launch as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-198.png" data-lazy- height="585" src="data:image/svg xml,” width=”1078″>

Type in a name for the container in the Container Name section as marked in the screenshot below.

I will call it http-server-1.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-199.png" data-lazy- height="578" src="data:image/svg xml,” width=”1072″>

If you want to run the container as root (with superuser privileges), check the Execute container using the high privilege checkbox as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-200.png" data-lazy- height="581" src="data:image/svg xml,” width=”1073″>

You can limit the CPU and memory usage of the container as well.

To limit resources, check the Enable resource limitation checkbox and set the CPU Priority and Memory Limit as you need.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-201.png" data-lazy- height="582" src="data:image/svg xml,” width=”1073″>

To configure some advanced settings for the container, click on Advanced Settings as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-202.png" data-lazy- height="579" src="data:image/svg xml,” width=”1074″>

If you want to start the container automatically when your Synology NAS boots, check the Enable auto-restart checkbox as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-203.png" data-lazy- height="584" src="data:image/svg xml,” width=”1074″>

To create a shortcut of this container on the Synology Web GUI desktop, check the Create shortcut on desktop checkbox and configure it as needed.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-204.png" data-lazy- height="585" src="data:image/svg xml,” width=”1076″>

To add volumes to the container, click on the Volume tab of the Advanced Settings window, as shown in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-205.png" data-lazy- height="584" src="data:image/svg xml,” width=”1078″>

If you visit the Docker Hub page of the Docker image you’re using, you should know the volumes you need to create for your container.

For example, I am using the httpd Docker image to create a container. In the Docker Hub page of the httpd Docker image, you can see that I need to create a volume for the container that binds to the folder /usr/local/apache2/htdocs of the container.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-206.png" data-lazy- height="298" src="data:image/svg xml,” width=”880″>

To add a new volume to the container, click on Add Folder as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-207.png" data-lazy- height="581" src="data:image/svg xml,” width=”1074″>

You will be asked to select a folder that you want to bind to your container.

When you install the Docker app on your Synology NAS, it will create a new share docker on the volume where you have installed the Docker app. My advice would be to keep your volumes and other files related to your container in their separate folder in the docker share.

Create a new folder in the docker share, select the docker share and click on Create folder as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-208.png" data-lazy- height="579" src="data:image/svg xml,” width=”1074″>

Type in the name of your container (http-server-1 in my case) and click on OK.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-209.png" data-lazy- height="583" src="data:image/svg xml,” width=”1073″>

To create a new folder inside the http-server-1/ folder, select it and click on Create folder.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-210.png" data-lazy- height="582" src="data:image/svg xml,” width=”1078″>

Type in a folder name and click on OK. The folder name should resemble the path where you want to mount the folder in your container.

In my case, it’s htdocs as I want to mount it in the /usr/local/apache2/htdocs directory of the container.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-211.png" data-lazy- height="580" src="data:image/svg xml,” width=”1072″>

Once the folder is created, select it and click on Select as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-212.png" data-lazy- height="582" src="data:image/svg xml,” width=”1069″>

Now, you have to type in the path where you want to mount the folder you’ve selected.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-213.png" data-lazy- height="581" src="data:image/svg xml,” width=”1066″>

In this case, it is the /usr/local/apache2/htdocs directory. Just type in the mount path, and you’re good to go.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-214.png" data-lazy- height="578" src="data:image/svg xml,” width=”1068″>

You can configure the network of the container from the Network tab of the Advanced Settings window.

By default, the Docker containers will use a private IP address range that is not accessible from your home network. So, you will have to use port forwarding to access the services running on your Docker containers.

But, if you want to access the Docker containers from your home network directory without port forwarding, check the Use the same network as Docker host checkbox as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-215.png" data-lazy- height="578" src="data:image/svg xml,” width=”1069″>

In the Port Settings tab of the Advanced Settings window, you can configure port forwarding for the Docker container.

Depending on the Docker image you’re using the create the container, you may already have some default port forwarding rules.

I have a default port forwarding rule that forwards the container TCP port 80 to the Synology NAS.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-216.png" data-lazy- height="583" src="data:image/svg xml,” width=”1077″>

I will forward the container TCP port 80 to the TCP port 8888 on my Synology NAS. So, the Local Port number will be 8888, and the Container Port number will be 80, and the Type will be TCP.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-217.png" data-lazy- height="582" src="data:image/svg xml,” width=”1077″>

If you want to add a new port forwarding rule, click on the icon as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-218.png" data-lazy- height="584" src="data:image/svg xml,” width=”1084″>

An empty port forwarding rule should be added, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-219.png" data-lazy- height="591" src="data:image/svg xml,” width=”1090″>

Type in the Local Port, the Container Port, and select the Type from the dropdown menu as needed. Once you’re done, the port forwarding rule should be added.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-220.png" data-lazy- height="588" src="data:image/svg xml,” width=”1083″>

If you want to remove a port forwarding rule, select it and click on the icon as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-221.png" data-lazy- height="578" src="data:image/svg xml,” width=”1065″>

The port forwarding rule should be removed.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-222.png" data-lazy- height="577" src="data:image/svg xml,” width=”1075″>

In the Environment tab of the Advanced Settings window, you can configure the environment variables of the container and the command that the container will run when it starts.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-223.png" data-lazy- height="578" src="data:image/svg xml,” width=”1073″>

Depending on the Docker image you’re using to create the container, you may already have some environment variables, as shown in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-224.png" data-lazy- height="582" src="data:image/svg xml,” width=”1078″>

If you need to add a new environment variable, click on the icon as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-225.png" data-lazy- height="586" src="data:image/svg xml,” width=”1073″>

An empty environment variable entry should be added, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-226.png" data-lazy- height="585" src="data:image/svg xml,” width=”1079″>

Type in the environment variable name and the value. Once you’re done, it should be added.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-227.png" data-lazy- height="590" src="data:image/svg xml,” width=”1086″>

If you want to remove an environment variable, select it and click on the icon as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-228.png" data-lazy- height="585" src="data:image/svg xml,” width=”1074″>

Your selected environment variable should be removed.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-229.png" data-lazy- height="583" src="data:image/svg xml,” width=”1075″>

To set the command that you want to run when your Docker container starts, type in the command section’s command as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-230.png" data-lazy- height="585" src="data:image/svg xml,” width=”1076″>

Once you’re done configuring some advanced settings for the container, click on Apply.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-231.png" data-lazy- height="584" src="data:image/svg xml,” width=”1076″>

Click on Next.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-232.png" data-lazy- height="578" src="data:image/svg xml,” width=”1074″>

The settings that will be used to create the container http-server-1 should be displayed. To create a container with these settings, click on Apply.

A new container http-server-1 should be created.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-233.png" data-lazy- height="583" src="data:image/svg xml,” width=”1071″>

You can find all the Docker containers you’ve created in the Container tab of the Docker app. You can manage your containers from here.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-234.png" data-lazy- height="583" src="data:image/svg xml,” width=”1073″>

The running containers should also be displayed in the Overview tab of the Docker app, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-235.png" data-lazy- height="585" src="data:image/svg xml,” width=”1081″>

Using Docker Containers:

You can see the CPU and memory/RAM usage information and the container runtime of all the Docker containers you’ve created from the Container section of the Docker app.

As you can see, the http-server-1 container that I’ve created earlier is Running for 12 minutes. It’s using 11 MB of memory/RAM and barely uses any CPU resource.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-236.png" data-lazy- height="579" src="data:image/svg xml,” width=”1070″>

Let’s create an index.html file in the htdocs/ volume of the container.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-237.png" data-lazy- height="625" src="data:image/svg xml,” width=”1063″>

Once the index.html file is created in the volume of the container, you should be able to access it from the HTTP server that is running in the container.

I have forwarded the container TCP port 80 on my Synology NAS port 8888. So, I can access the HTTP server running in the Docker container http-server-1 from a web browser using the URL http://192.168.0.110:8888 as you can see in the screenshot below.

Here, 192.168.0.110 is the IP address of my Synology NAS. It will be different for you. So, make sure to replace it with yours.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-238.png" data-lazy- height="830" src="data:image/svg xml,” width=”1289″>

To find more information about a Docker container, select it and click on Details as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-239.png" data-lazy- height="579" src="data:image/svg xml,” width=”1072″>

A new window should be opened.

In the Overview tab, you can see the container’s CPU and RAM usage information, the environment variables added to the container, the configured port forwarding rules of the container, and some container runtime information.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-240.png" data-lazy- height="581" src="data:image/svg xml,” width=”1071″>

You can Start, Stop, Restart and Force stop a container from the Overview tab as well.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-241.png" data-lazy- height="584" src="data:image/svg xml,” width=”1079″>

In the Process tab, you can find the following information about all the running processes of the container:

Process Identifier: The process ID of the running process.

Execution Command: The command that is used to start the process.

CPU Usage: The percentage of CPU the process is using.

Memory Size: The amount of RAM/memory the process is using.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-242.png" data-lazy- height="581" src="data:image/svg xml,” width=”1075″>

In the Log tab, you can find the logs of the running processes on your container. The logs are grouped by date nicely, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-243.png" data-lazy- height="584" src="data:image/svg xml,” width=”1074″>

You can start a shell and do administration on your container from the command-line from the Terminal tab. You can also run any command and see its output.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-244.png" data-lazy- height="583" src="data:image/svg xml,” width=”1068″>

To access the shell of the container, click on Create as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-245.png" data-lazy- height="581" src="data:image/svg xml,” width=”1072″>

A new shell terminal should be created, as you can see in the screenshot below. You can run any command you want in this shell terminal and administer your container from the command-line.

You can create as many shell terminals as you need.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-246.png" data-lazy- height="578" src="data:image/svg xml,” width=”1072″>

You can also run other commands from here.

To do that, click on the Create > Launch with command as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-247.png" data-lazy- height="579" src="data:image/svg xml,” width=”1070″>

Now, type in a command that you want to run and click on OK.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-248.png" data-lazy- height="581" src="data:image/svg xml,” width=”1077″>

The command should run on the container, and the output should be displayed, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-249.png" data-lazy- height="582" src="data:image/svg xml,” width=”1077″>

You can rename or delete a terminal from the Terminal tab as well.

To rename a terminal, select it and click on Rename.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-250.png" data-lazy- height="579" src="data:image/svg xml,” width=”1075″>

Type in a new terminal name and click on OK.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-251.png" data-lazy- height="578" src="data:image/svg xml,” width=”1071″>

The terminal should be renamed.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-252.png" data-lazy- height="582" src="data:image/svg xml,” width=”1079″>

To remove a terminal, select it and click on Delete.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-253.png" data-lazy- height="578" src="data:image/svg xml,” width=”1072″>

The terminal should be removed.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-254.png" data-lazy- height="583" src="data:image/svg xml,” width=”1082″>

You can start and stop a container using the toggle button as marked in the screenshot below.

When a container is Running, the toggle button will be blue.

To stop a running container, click on the toggle button.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-255.png" data-lazy- height="577" src="data:image/svg xml,” width=”1069″>

The container should be Stopped, as you can see in the screenshot below.

When the container is Stopped, the toggle button should be gray.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-256.png" data-lazy- height="578" src="data:image/svg xml,” width=”1073″>

When a container is Stopped, you can edit the configuration of the container.

To edit the container configuration, select the container and click on Edit.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-257.png" data-lazy- height="578" src="data:image/svg xml,” width=”1070″>

You should see the same configuration window as you have seen while creating the container. You should be familiar with all the options as I have explained them earlier in this article.

From the General Settings tab, you can change the container name, configure container privileges, configure resource limits, configure container startup settings, and create a desktop shortcut.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-258.png" data-lazy- height="590" src="data:image/svg xml,” width=”1084″>

From the Volume tab, you can manage the container volumes.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-259.png" data-lazy- height="587" src="data:image/svg xml,” width=”1074″>

From the Port Settings tab, you can manage the port forwarding rules of your container.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-260.png" data-lazy- height="587" src="data:image/svg xml,” width=”1078″>

From the Environment tab, you can manage the container environment variables.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-261.png" data-lazy- height="585" src="data:image/svg xml,” width=”1077″>

Once you’re done with configuring the container, click on Apply as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-262.png" data-lazy- height="579" src="data:image/svg xml,” width=”1063″>

Once you’ve configured the container, click on the toggle button to start the container.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-263.png" data-lazy- height="575" src="data:image/svg xml,” width=”1072″>

The container should be running, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-264.png" data-lazy- height="584" src="data:image/svg xml,” width=”1069″>

You can select a container and click on Action to Start, Stop, Restart, and Force Stop your container, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-265.png" data-lazy- height="585" src="data:image/svg xml,” width=”1077″>

Cloning Docker Containers:

You can clone the configuration of an existing Docker container to create a new Docker container.

To clone a Docker container, select it and click on Settings > Duplicate settings as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-266.png" data-lazy- height="577" src="data:image/svg xml,” width=”1075″>

Type in a name for the cloned container and click on Apply.

I will call it http-server-2.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-267.png" data-lazy- height="582" src="data:image/svg xml,” width=”1079″>

A new container http-server-2 should be created, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-268.png" data-lazy- height="577" src="data:image/svg xml,” width=”1074″>

While the http-server-2 container is Stopped, select it and click on Edit.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-269.png" data-lazy- height="583" src="data:image/svg xml,” width=”1069″>

Change the local port to 8889 from the Port Settings tab and click on Apply as marked in the screenshot below. The http-server-2 container configuration should be updated.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-270.png" data-lazy- height="586" src="data:image/svg xml,” width=”1075″>

Click on the toggle button of the http-server-2 container as marked in the screenshot below to start the container.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-271.png" data-lazy- height="587" src="data:image/svg xml,” width=”1078″>

The http-server-2 container should be running, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-272.png" data-lazy- height="589" src="data:image/svg xml,” width=”1084″>

As you can see, I can access the HTTP server running on both the http-server-1 and http-server-2 containers.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-273.png" data-lazy- height="610" src="data:image/svg xml,” width=”1226″>

Exporting Docker Containers:

You can export Docker containers on your Synology NAS shares and import them later using the Docker app.

To export a Docker container, select it and click on Settings > Export as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-274.png" data-lazy- height="580" src="data:image/svg xml,” width=”1071″>

Select the export type from the Type section.

Export container settings: This option will only export the configuration options of the container in a plain text file. The configuration file can be later used to rebuild the container. This option will not save any filesystem changes you’ve made in the container. So, all of your container data will be lost when you import the container back.

Export container contents and settings: This option will export the container configuration and contents on your Synology NAS share. The filesystem changes of the container will be kept. The exported file will be a lot bigger than the first option.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-275.png" data-lazy- height="585" src="data:image/svg xml,” width=”1090″>

Once you’ve selected an export type, select Export to Synology NAS and click on Select a folder from the Destination section as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-276.png" data-lazy- height="588" src="data:image/svg xml,” width=”1078″>

Select a folder where you want to export the container and click on Select.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-277.png" data-lazy- height="577" src="data:image/svg xml,” width=”1080″>

Click on Export.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-278.png" data-lazy- height="590" src="data:image/svg xml,” width=”1075″>

As you can see, the container is being exported. It may take a while to complete.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-279.png" data-lazy- height="587" src="data:image/svg xml,” width=”1076″>

Once the container is exported, a new archive file should be generated in the folder where you’ve exported the container, as shown in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-280.png" data-lazy- height="570" src="data:image/svg xml,” width=”929″>

Importing Docker Containers:

In this section, I will remove the Docker container I’ve exported earlier and import it back.

Before you can remove a Docker container, you have to stop the container if it’s running.

To stop the http-server-1 container, click on the toggle button of the container from the Container section of the Docker app, as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-281.png" data-lazy- height="591" src="data:image/svg xml,” width=”1076″>

The container should be stopped. Now, select the container and click on Action > Delete as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-282.png" data-lazy- height="584" src="data:image/svg xml,” width=”1075″>

Click on Delete.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-283.png" data-lazy- height="586" src="data:image/svg xml,” width=”1075″>

The http-server-1 container should be removed.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-284.png" data-lazy- height="582" src="data:image/svg xml,” width=”1076″>

To import the container using the exported container file, click on Settings > Import as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-285.png" data-lazy- height="584" src="data:image/svg xml,” width=”1080″>

Select the exported container file and click on Select as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-286.png" data-lazy- height="588" src="data:image/svg xml,” width=”1074″>

Type in a Container Name and click on OK.

NOTE: Importing a container this way will also create a new container image. If you want to use that image to create a container later, it’s good to give the image a meaningful name and tag name.

You can set the new image name in the Repository textbox and image tag in the Tag textbox of the import Settings window.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-287.png" data-lazy- height="583" src="data:image/svg xml,” width=”1078″>

As you can see, the container http-server-1 is imported successfully.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-288.png" data-lazy- height="588" src="data:image/svg xml,” width=”1076″>

A new container image is also created, as you can see in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-289.png" data-lazy- height="588" src="data:image/svg xml,” width=”1077″>

Docker Networks:

You can manage Docker networks from the Network tab of the Docker app.

By default, Docker creates a bridge network interface and a host network interface that you can use to get network connectivity in your Docker containers.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-290.png" data-lazy- height="586" src="data:image/svg xml,” width=”1089″>

To know more about a network interface, click on the down-arrow icon as marked in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-291.png" data-lazy- height="586" src="data:image/svg xml,” width=”1089″>

As you can see in the screenshot below, information about the bridge and the host network is displayed.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-292.png" data-lazy- height="584" src="data:image/svg xml,” width=”1075″>

As you can see, the bridge network interface uses the bridge driver, and the host network interface is using the host driver.

The bridge network interface configures a random IP subnet (172.17.0.0/16 in my case) that is not accessible from your home/office network. You can only access the services running inside the containers connected to the bridge network using port forwarding.

The host network interface will use your home/office network’s DHCP server to assign IP addresses to the containers. So, the containers using the host network will be accessible from your home/office network directly. You won’t need to configure port forwarding.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-293.png" data-lazy- height="584" src="data:image/svg xml,” width=”1075″>

Currently, 2 containers (http-server-1 and http-server-2) are using the bridge network interface, as shown in the screenshot below.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-294.png" data-lazy- height="584" src="data:image/svg xml,” width=”1075″>

Checking Docker Logs:

You can find the logs of your Docker app from the Log section, as you can see in the screenshot below. The log information will help you find problems with the Docker instance running on your Synology NAS.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/word-image-295.png" data-lazy- height="588" src="data:image/svg xml,” width=”1077″>

Conclusion:

In this article, I have shown you how to install the Docker app and use Docker on Synology NAS. I have also shown you how to download Docker images from the Docker Hub registry, manage Docker images, manage Docker registries, create and use Docker containers, clone Docker containers, export Docker containers, import Docker containers, check the Docker network interfaces, and check Docker logs using the Docker app on your Synology NAS. This article should help you get started with Docker on your Synology NAS.

About the author

<img alt="Shahriar Shovon" data-lazy-src="https://kirelos.com/wp-content/uploads/2021/03/echo/photo2-150×150.png" height="112" src="data:image/svg xml,” width=”112″>

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.