Installing Docker Containers and Configuring Docker Image Sources on QNAP (QTS)

Publish: 2020-06-13 | Modify: 2020-06-13

The QNAP TS-453B mini, which I previously purchased, supports the installation of Docker container services. Using Docker containers allows for environment isolation, convenience of use, and ease of maintenance. In cases where certain software does not support the QNAP system, Docker can be used for indirect support, greatly enhancing versatility.

Installing Docker

In the QTS system, the Docker container software is called "Container Station". Simply open the AppCenter and search for this software to install it, as shown in the image below.

Enabling SSH

To easily modify Docker configuration files, SSH login needs to be enabled. Open the QTS Control Panel, go to "Network & File Services", and find Telnet/SSH. Follow the on-screen instructions to enable SSH service, and then login using the QTS administrator account/password.

Modifying Docker Repository Mirror

If you are using a network environment in China, you may find that pulling Docker images is very slow. In this case, you need to switch to a Chinese Docker repository mirror to improve the download speed.

After installing Docker on QNAP, the configuration file is located at /share/CACHEDEV1_DATA/.qpkg/container-station/etc/docker.json. You can use the vi command or SFTP to download it and make modifications. The original content is as follows:

{
}

Modify it to:

{
 "registry-mirrors": ["http://hub-mirror.c.163.com"] 
}

The above configuration uses the Docker image address provided by NetEase 163. After making the modification, you need to restart the Docker service for it to take effect: /etc/init.d/container-station.sh restart. Finally, you will notice a significant improvement in the speed of pulling Docker images.

Conclusion

Getting started with Docker itself is not complicated, but tinkering with Docker requires some basic knowledge. Otherwise, when using the QNAP Container Station suite, you may encounter many parameters that you don't understand, which can hinder the deployment of Docker images.

In the future, I will share articles on installing useful software on QNAP (QTS) Docker (Container Station). Stay tuned!


Comments