Can I install Docker on arm8 based Synology Nas
Asked Answered
M

3

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.

Moorfowl answered 26/9, 2018 at 14:23 Comment(0)
P
24

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

Pradeep answered 4/11, 2019 at 9:57 Comment(12)
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 sudoRotation
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" }Rotation
Whenever I run step #6, I get /bin/docker: /bin/docker: cannot execute binary file Any idea on how to get past that?Putup
Thank you very much! The linked version (docker-17.09.0-ce.tgz) still works on Synology 220j with the latest DSM.Jurat
@Eptin "Choose the right version for your ARM chip"Nesline
uname -m shows the architecture of your ARM chip. Just in case of someone needed.Omnipotence
very usefull and pedagogic. Anyway there's a gist with a complete solution including docker-compose gist.github.com/ta264/2b7fb6e6466b109b9bf9b0a1d91ebedcMusjid
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: #70529955 v2ex.com/t/850768 github.com/ourcubk/catdriverPradeep
I have /usr/bin/dockerd, but I'm always getting the error dockerd: command not found when typing sudo dockerd &. What am I missing?Apoplexy
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?Hargreaves
I managed to do it today on a Synology DS418 as a complete newbie on docker/ssh/linux. I encountered several issues in the process, such as command not found as mentioned by @Apoplexy or permission denied. First, ensure that you are in the good folder, i.e. /usr/bin. Second, I think newly created files have some sort of permission issue, and so I had to do chmod +x on all the files created in the process (e.g., chmod +x dockerd, chmod +x docker, and so on).Flamsteed
To know on which files you need to run sudo chmod +x , check all white names when you run ls in /usr/bin. Last, I also had to create the docker group with synogroup --add docker root, I added my username in that group in the DSM interface, and I also ran that command: chown root:docker /var/run/docker.sock. I hope it helps other users who struggled like me ;)Flamsteed
C
0

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

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

Cameo answered 21/11, 2022 at 3:9 Comment(0)
G
-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.

Grooved answered 26/9, 2018 at 14:44 Comment(4)
There is no point me trying to compile i know nothing about docker, im looking for existing arm8 binaries for SynologyMoorfowl
you check say 64 bit architecture. so you not need docker over arm, simply install docker for 64 bitGrooved
It is 64bit, but 64bit ARM not 64bit Intel :(Moorfowl
Check this article here , maybe you can run itGrooved

© 2022 - 2024 — McMap. All rights reserved.