10

I have a Synology Disk Station 118 (appears it is using Arm8 processor)

There is no Docker package found by searching within Package Manager I found this article but the link to Synology packages only has X64 packages and article says Docker does not work from Arm

But it does seem from various articles Docker is available from arm8 platforms

https://github.com/docker-library/official-images#architectures-other-than-amd64

and there is a link to unofficial

https://hub.docker.com/u/arm64v8/

but aren't these just containers rather than than the actual docker itself ?

So it is possible to install on my Synology Nas 118. This is required to test a docker file for my application.

Paul Taylor
  • 13,411
  • 42
  • 184
  • 351

3 Answers3

23

The answer is YES. Any ARM type of Synology NAS supports docker, not completely but it can be enough. Please follow the steps below to install docker/dockerd in ARM Synology NAS.

  1. Download static docker binary at https://download.docker.com/linux/static/stable/ . Choose the right version for your ARM chip, most likely aarch64 will be the one for your Synology NAS. You can use an old version https://download.docker.com/linux/static/stable/aarch64/docker-17.09.0-ce.tgz and give it a try, although newer versions could work too.
  2. tar xzvf /path/to/.tar.gz
  3. sudo cp docker/* /usr/bin/
  4. create the /etc/docker/daemon.json configuration file with the following configuration:
{
  "storage-driver": "vfs",
  "iptables": false,
  "bridge": "none"
}
  1. sudo dockerd &
  2. sudo docker run -d --network=host portainer/portainer:linux-arm64

Please note, you need to set storage drive vfs, iptables off, bridge off due to a Linux kernel problem. And you need to run docker container with --network=host mode. It is not usual, but it is necessary due to Synology NAS kernel limitations.

Or you can have a try with this automatic script: https://raw.githubusercontent.com/wdmomoxx/catdriver/master/install-docker.sh

LightSystem
  • 193
  • 1
  • 8
P Leo
  • 357
  • 2
  • 8
  • 1
    extra tips: add dockerd to the taskmanager to run on startup and make a docker group and add your user to it to use docker without sudo – Hikariii May 26 '20 at 12:14
  • 2
    you can easily run out of space for docker since the default dsm / mount is only 2GB, to prevent this you can create a docker folder on your volume, mount it to /docker and set it as data-root: `sudo mkdir -p /volume1/@Docker/lib` `sudo mkdir /docker` `sudo mount -o bind "/volume1/@Docker/lib" /docker`. Then set the data-root in /etc/docker/daemon.json: `{ "data-root": "/docker" }` – Hikariii May 27 '20 at 07:51
  • Whenever I run step #6, I get `/bin/docker: /bin/docker: cannot execute binary file` Any idea on how to get past that? – Michael Innes Oct 28 '20 at 03:25
  • Thank you very much! The linked version (docker-17.09.0-ce.tgz) still works on Synology 220j with the latest DSM. – Ashutosh Jindal Dec 01 '20 at 23:39
  • @Eptin _"Choose the right version for your ARM chip"_ – gronostaj Aug 04 '21 at 11:23
  • 1
    `uname -m` shows the architecture of your ARM chip. Just in case of someone needed. – karlbsm Nov 23 '21 at 17:02
  • very usefull and pedagogic. Anyway there's a gist with a complete solution including docker-compose https://gist.github.com/ta264/2b7fb6e6466b109b9bf9b0a1d91ebedc – jona303 Dec 29 '21 at 08:47
  • Here, to complete the bridge functionality of ARM Synology NAS. The idea can work in all official Synology NAS which have no docker spk. The main step is just compile the nas kernal and copy needed files to the NAS. Refer link: https://stackoverflow.com/questions/70529455/docker-in-bridge-network-mode-on-arm-based-synology-nas/72139646 https://www.v2ex.com/t/850768 https://github.com/ourcubk/catdriver – P Leo May 10 '22 at 09:37
  • I have `/usr/bin/dockerd`, but I'm always getting the error `dockerd: command not found` when typing `sudo dockerd &`. What am I missing? – macabeus Oct 01 '22 at 14:18
  • is there any reason you need the extra copy of the docker files you copied in step 3? Can't you just `mv` the files and save space? – ScrappyDev Jan 21 '23 at 01:42
0

I have found ready script for installing docker and docker-compose for ARM NAS:

https://wiki.servarr.com/docker-arm-synology

Flatout
  • 167
  • 2
  • 11
-3

in the github proyect docker on arm and you can read in proyect:

 No official Docker images work on the ARM architecture because they contain binaries built for x64 (regular PCs).

So, you need get source binary from application, and compile to architecture ARM if you need install application.

Soleil
  • 381
  • 4
  • 9
  • There is no point me trying to compile i know nothing about docker, im looking for existing arm8 binaries for Synology – Paul Taylor Sep 26 '18 at 14:54
  • you [check](https://www.synology.com/en-global/products/DS118#specs) say 64 bit architecture. so you not need docker over arm, simply install docker for 64 bit – Soleil Sep 26 '18 at 15:10
  • It is 64bit, but 64bit ARM not 64bit Intel :( – Paul Taylor Sep 26 '18 at 15:19
  • Check this article [here](https://blog.alexellis.io/get-started-with-docker-on-64-bit-arm/) , maybe you can run it – Soleil Sep 26 '18 at 15:32