Docker and Portainer for OS5

WD Community proudly presents: Docker.

This WD app installs the latest supported version of Docker-ce from the official sources in your MyCloud NAS. Batteries included: the great Portainer-ce is installed to manage your docker resources in your browser. Docker Compose makes it easy to get a whole stack running in minutes.

What is Docker according to wikipedia:

Docker uses OS-level virtualization to deliver software in packages called containers.[6] Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels.[7] All containers are run by a single operating system kernel and therefore use fewer resources than virtual machines.[8]

Download Docker installer here

You should configure or delete the Portainer container ASAP after installation. It’s has root access to your device!

Official Docker website
OS3 thread
Package Source
Report issues

Remarks:

  • Docker root is on /shares/Volume_1/Nas_Prog/_docker. It contains your internal volumes, images and container data.
  • It’s recommended to define volumes on persistent paths, e.g. somewhere in /shares/Volume_1/
  • Docker Swarm is not supported out of the box. It’s possible to build the required kernel modules though.
  • Platforms with ARM architecture are currently stuck on version 19.03.8
  • The OS3 docker data is backed up to /shares/Volume_1/.systemfile/OS3_Apps_Backup/Nas_Prog/_docker. You may recover this data manually while the docker daemon is disabled.
  • Portainer runs on port 9000 by default, which may clash with your Twonky DLNA server. See here.

Thanks for the trust and all the help and support.
Many people contributed to this app and anyone is welcome to join the effort.

3 Likes

Example: MySQL

One of the security improvements of OS5 is the limited access to the internal management MySQL database. Some people were upset as they used this database for other applications in their network.

For those in need of an MySQL server, you can always run a second instance on another port.
Either by simply using the builtin daemon binary with your own config, or you can get a more recent version via Docker or Entware.
All you need to do is adjust the listen address and port.

Based on https://hub.docker.com/_/mysql and https://hub.docker.com/r/phpmyadmin/phpmyadmin/
Create docker-compose.yml somewhere on a persistent location.

# Use root/example as user/password credentials
version: '3.1'

services:

  db:
    image: mysql
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: example
    ports:
      - 3307:3306

  phpmyadmin:
    image: phpmyadmin
    restart: always
    ports:
      - 8080:80

Then run

docker-compose up -d

You now have a fresh MySQL database running on <nas-ip-address>:3307 and you can configure it with the web interface at port http://<nas-ip-address>:8080.
Just remember that other applications have to use port 3307 instead of the standard 3306.

Example: Gitea, git with a cup of tea

See https://hub.docker.com/r/gitea/gitea

Run a private git server for your office.
The challenge here is that this docker compose setup also ships with an SSH server, which clashes with the one on the NAS.
You could change the compose file to run its SSH server at port 2222 with this change.

    ports:
      - "3000:3000"
      - "2222:22"

And always include the ssh protocol to clone repos (source) for a custom port like 2222

git clone ssh://git@mydomain.com:[port]/mycoolrepo

Alternative is to run the MyCloud SSH on a custom port instead (or not at all).

Hi, the download on bintray doesnt work anymore. i only get a forbidden text after trying to download the file. Would be great if you could host these files somewhere else :slight_smile: Just updated to OS5 and now I dont have Docker anymore … thank you :slight_smile:

I downloaded this binary for Docker. On my EX4100, I have to use the seccomp workaround stated here.

The LinuxServer.io MariaDB worked for me, using a port other than 3306.

Be sure to pull the Alpine tag: The default is on an Ubuntu base, and the WD NAS doesn’t play at all with it.

docker pull linuxserver/mariadb:alpine

Alternatively Postgres is an excellent choice of database system.

docker pull postgres

But now, with bintray closed.
Where are now the various packages that were there

I discovered this thread, hope that helps.

1 Like