12/28/2021

Synology Dsm Docker

18

This article guides you how to configure Docker on Synology J series like DS220j which is not officially supported by the Synology.

From what i know DSM 7 will support Nord VPN in the Synology package center,so you can use download station as the client. Navigate to the docker folder location on your Synology NAS and the subfolder for the container that you’ll be creating. For most people, the folder will be stored on volume1, but if you’re using multiple volumes, it could be something different. Cd /volume1/docker/ conatinerfolder 4. The Docker app should be listed, as you can see in the screenshot below. Click on the Docker app. Click on Install to install the Docker app on your Synology NAS. 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.

I love Docker, it makes my work simpler and helps me to keep the environment of my OS clean.I can play with software without the risk of the damaging impact (hard to revert/control some modifications) of the introduced changes.

ARM platform became more and more popular in the IoT world, the good thing is our NAS is based on ARM CPU.

The Synology server is the best fit for HomeAssistant if you have Synology already and thinking to play with smart home solutionsbut when you try to configure your NAS as a HomeAssistant you end up with nothing or spend hours trying to make it work.

In my case I was disappointed the HomeAssistant package is available on package center only for more expensive Synology and started thinking to obtain RaspberryPI but it is another device in my home which consumes energy justfor running HomeAssistant while Synology is working as a file server it caused me to try again, and I managed it :)

Synology dsm dockers

It only applies to the Synology products which are running on ARM-based 32bit processors

You have few options here:

  • Try to install HomeAssistant from sources
  • Forget about Synology as a runtime environment for Docker
  • or do what I did when I’ve decided to dig deeper and understand the Synology architecture

What we need

  • SSH access enabled on Synology -> (Go to DSM UC > Control Panel > Terminal & SNMP > Terminal, and tick Enable SSH service)
  • Static binaries of docker Binaries List

Don’t worry I’ll explain to you step by step how to make it working on your ARM-32bits-based server.

Let’s start

Download

Overview, gathering facts

Please SSH-in to your Synology. If you are using OS X or Linux open up the terminal and type.

Windows users need to use the PUTTY client.

Synology file structure

Synology is running on build-in volume which is relatively small ~2.3GYou need to know all of your docker images which you download from internet needs to be stored somewhere else.So where? In your data volume, so for the purpose of this guide I’ll name it as volume1, and we are assuming it is placed here

Call df -h to list your volumes

So mine is the last one on the list, and I’d use it for the Docker images persistence.

CPU info

My Synology DS220 sudo cat /proc/cpuinfo output:

Ok, so what does it mean to me, if the Docker static list shows the list something like that:

Useful explanation you can find here:

  • The ARM EABI (armel) port targets a range of older 32-bit ARM devices, particularly those used in NAS hardware and a variety of *plug computers.
  • The newer ARM hard-float (armhf) port supports newer, more powerful 32-bit devices using version 7 of the ARM architecture specification.
  • The 64-bit ARM (arm64) port supports the latest 64-bit ARM-powered devices.

Source: https://www.debian.org/ports/arm/index.en.html

So ours is armhf

Binaries download & testing

Ok, we know a little more about or hardware, so it is a good time to download binaries and proceed with the installation.

Go to your home directory and prepare a directory for the download and extraction of the archive

You need to replace phrase: URL_TO_DOCKER_BINARY_GOES_HERE with valid URL to the most recent docker binary for example docker-19.03.9 taken from here

Ok, let’s extract the repository

Where docker-x.x.x.tgz is downloaded TAR archive

Before we install the extracted files we can test is the docker binary compatible with our OS, so let’s change the directory to extracted one and test the binary like below:

the output example:

The output should be the downloaded docker version info of the docker binary if we receive an error message instead it means we downloaded an incompatible package.

IMPORTANT: I’ve got segmentation fault error for next releases higher than 19.03.8 so if you are getting this error to 19.03.8 should work for you.

Docker installation

Docker Synology Dsm 7

You can go to this document directly or read the entire description below

Let’s check where you are

should output

Time to install your docker:

  • IMPORTANT you are in the extracted directory of docker archive
  • What we are going to do right now
    • Change directory to level up just for safety and readability
    • Copy all binaries to /usr/bin/ directory
    • Cleanup downloaded resources

Start the Docker daemon:

If no error message is thrown means it runs :)

Press CTRL+C to stop the running process.

Additional configuration

We need to tell Docker we need to store data in our /volume1 but before we need to create a place for Docker there

Docker needs a config file for that:

Synology Dsm Docker Software

so you need to create/edit following file /etc/docker/daemon.json

Configuration testing

Docker

Synology Dsm Docker

To test docker can run call dockerd command

To stop press CTRL+C

Reboot your Synology you can type

Once it is up SSH-in again and type to test your Docker

Synology Dsm Docker Image

You should see finally the output from the hello-world container

CONGRATULATIONS YOU HAVE SUCCESSFULLY INSTALLED DOCKER ON your ARM-32b-based NAS!

  • Most Viewed News

    • Homebrew Install In Mac
    • Install Docker In Linux Ubuntu
    • Install Docker Mysql
    • Install Conda Mac Os X
    • Google Meet Apk For Mac