Difference between revisions of "Docker ARM Synology"

From Servarr
Line 1: Line 1:
 +
==Installation==
 +
 
Log in as <code>root</code> to your synology.  Execute the following command:
 
Log in as <code>root</code> to your synology.  Execute the following command:
  
Line 12: Line 14:
 
Hopefully you have a functioning <code>docker</code> and <code>docker-compose</code>, which should work when logged in as your normal user.
 
Hopefully you have a functioning <code>docker</code> and <code>docker-compose</code>, which should work when logged in as your normal user.
  
Some caveats:
+
==Caveats==
 
# It seems most ARM Synology don't support seccomp, so the docker container has unfettered access to your system (even more so than with a regular docker)
 
# It seems most ARM Synology don't support seccomp, so the docker container has unfettered access to your system (even more so than with a regular docker)
 
# Again, due to Synology constraints, all containers need to use `--network=host` (or `network: host` in compose) and everything will be directly accesible from the host.  There are no port maps
 
# Again, due to Synology constraints, all containers need to use `--network=host` (or `network: host` in compose) and everything will be directly accesible from the host.  There are no port maps
 
# Obviously you can only run aarch64 images, but most hotio and linuxserver images offer an aarch64 version.
 
# Obviously you can only run aarch64 images, but most hotio and linuxserver images offer an aarch64 version.
  
 +
==Setting up Portainer==
 
If you want a GUI you can use the following example compose:
 
If you want a GUI you can use the following example compose:
  
Line 34: Line 37:
 
   portainer_data:
 
   portainer_data:
 
</pre>
 
</pre>
 +
 +
Place this in an empty directory and call it <code>docker-compose.yml</code>.  Run:
 +
docker-compose up -d
 +
And visit <code>http://ip:9000</code> to complete setup.

Revision as of 19:52, 11 December 2020

Installation

Log in as root to your synology. Execute the following command:

curl https://gist.githubusercontent.com/ta264/2b7fb6e6466b109b9bf9b0a1d91ebedc/raw/7b11f25c3dce181faa5206aed8051f176cc4e406/get-docker.sh | sh

If all goes well you should see the message:

Done.  Please add your user to the docker group in the Synology GUI and reboot your NAS.

Do as it says:

  1. Add your user to the new 'docker' group using the synology UI
  2. Reboot.

Hopefully you have a functioning docker and docker-compose, which should work when logged in as your normal user.

Caveats

  1. It seems most ARM Synology don't support seccomp, so the docker container has unfettered access to your system (even more so than with a regular docker)
  2. Again, due to Synology constraints, all containers need to use `--network=host` (or `network: host` in compose) and everything will be directly accesible from the host. There are no port maps
  3. Obviously you can only run aarch64 images, but most hotio and linuxserver images offer an aarch64 version.

Setting up Portainer

If you want a GUI you can use the following example compose:

version: '2'

services:
  portainer:
    image: portainer/portainer
    restart: unless-stopped
    network_mode: host
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - portainer_data:/data

volumes:
  portainer_data:

Place this in an empty directory and call it docker-compose.yml. Run:

docker-compose up -d

And visit http://ip:9000 to complete setup.