Skip to content

Instantly share code, notes, and snippets.

Last active November 11, 2023 21:59
  • Star 14 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Install docker on arm64 synology
set -e
echo "Downloading docker $DOCKER_VERSION-$ARCH"
curl "$ARCH/docker-$DOCKER_VERSION.tgz" | tar -xz -C /usr/local/bin --strip-components=1
echo "Creating docker working directory $DOCKER_DIR"
mkdir -p "$DOCKER_DIR"
echo "Creating docker.json config file"
mkdir -p /usr/local/etc/docker
cat <<EOT > /usr/local/etc/docker/docker.json
"storage-driver": "vfs",
"iptables": false,
"bridge": "none",
"data-root": "$DOCKER_DIR"
echo "Creating docker startup script"
cat <<'EOT' > /usr/local/etc/rc.d/
# Start docker daemon
DAEMON_ARGS="--config-file=/usr/local/etc/docker/docker.json --pidfile=$PIDFILE"
case "$1" in
echo "Starting docker daemon"
/usr/local/bin/dockerd $DAEMON_ARGS &
echo "Stopping docker daemon"
kill $(cat $PIDFILE)
echo "Usage: "$1" {start|stop}"
exit 1
exit 0
chmod 755 /usr/local/etc/rc.d/
echo "Creating docker group"
synogroup --add docker root
echo "Installing docker compose"
curl -L --fail -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
echo "Starting docker"
/usr/local/etc/rc.d/ start
echo "Done. Please add your user to the docker group in the Synology GUI and reboot your NAS."
Copy link

Thank you. Could you provide the use method

Copy link

DaveMDS commented May 22, 2022

first of all thanks for this super-handy script!!
I successfully installed docker on my DS418 NAS using this gist

If you are interested I have made some improvements in my fork:

The main change I have made is to install compose in a more simple and modern way (installed as a CLI plugin),
also made a small change to the group creation command to not fail if the group already exists. And updated docker version to latest available.

You can see the diff at:

Thanks again for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment