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.

4 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 Docker and Docker
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 Docker

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

Hi All,

during the startup of docker the deamon tells me that there is a problem :slight_smile:
ERRO[2022-01-24T21:41:11.916601462+01:00] failed to mount overlay: no such device storage-driver=overlay2
ERRO[2022-01-24T21:41:11.920593218+01:00] AUFS was not found in /proc/filesystems storage-driver=aufs
ERRO[2022-01-24T21:41:11.926332547+01:00] failed to mount overlay: no such device storage-driver=overlay
ERRO[2022-01-24T21:41:11.926446508+01:00] Failed to built-in GetDriver graph devicemapper /mnt/HD/HD_a2/Nas_Prog/_docker
WARN[2022-01-24T21:41:12.073654997+01:00] Your kernel does not support cgroup memory limit
WARN[2022-01-24T21:41:12.073742183+01:00] Unable to find cpu cgroup in mounts
WARN[2022-01-24T21:41:12.073792236+01:00] Unable to find blkio cgroup in mounts
WARN[2022-01-24T21:41:12.073837501+01:00] Unable to find cpuset cgroup in mounts
WARN[2022-01-24T21:41:12.073876982+01:00] mountpoint for pids not found

This is the latest Docker bin version 19.03.8.1 …

Any idea ?

Uwe

Just successfully installed on mine with this

This one is working fine for me : https://dl.cloudsmith.io/public/wd-community/EX2Ultra/raw/names/docker/versions/21.04.06/docker_21.04.06_EX2Ultra.bin

This works on my EX2 Ultra

The latest version can be found here actually :

https://github.com/WDCommunity/wdpksrc/releases/tag/docker-v20.10.14

1 Like

Could someone make a YouTube video on using docker on portainer? I’m already using my WD Cloud PR 4100 for storage with my Windows system and I already have a file structure that I’m using. In watching YouTube videos about portainer and docker, they don’t give advice about how a docker filing system might conflict with a Windows filing system like they one that I’m using. I hope to see some YouTube videos about docker and portainer on WD MyCloud storage.

1 Like

You might have a wrong understanding about Docker. There are plenty of videos about Docker and also Portainer. Keep in mind that Portainer itself is just a management tool for Docker. A Docker filing system has nothing to do with Windows, in fact there is no such thing. Docker uses whatever you give it. If you let it use storage from your NAS, then this is the file system in place.

1 Like

hello folks,

i urgently need Docker for my WDMyCloud Gen 2 (NOT MIRROR) OS5 with Firmware 5.24.108
I could not compile or RePackage it my self
how can i solve it?

I have a successfull .bin of Docker for OS 5 Gen 2 (Glacier)
https://workupload.com/file/dCMudQ5JRnR
the problem is, that some Modules in the kernel needed are not available, so if someone knows how to make them available, that would be great.

maybe some one can make an updated kernel

Hello !

Precions added : I’m running PR4100 with 16Go RAM.
The portainer page is set on the port :9000 (don’t know if it has some important…)

I install the new image of docker --version 21 shown in the cloudsmith. But :

docker --version
Docker version 20.10.5, build 55c4c88

That’s not my issue. I’m learning coding slowly, but I have still some issue, and with this .bin file, when I install it, portainer doesn’t ask me to add a password, but directly log on to the Authentication page (I guess I tried a long time ago to install it on my NAS and did some s** obviously !

I then check to reset password with :

docker pull portainer/helper-reset-password
docker run --rm -v portainer_data:/data portainer/helper-reset-password

but the directory’s not good. I did then a :

find / -name helper-reset-password

and find a file in a folder in a folder in a folder… in the /mnt/HD/HD_a2/Nas_Prog/_docker/vfs/dir…and so on.
Is that the good file ? If yes, How could I reset then ?

OR !

How could I proceed to a clean remove / install of a new docker ? With that last image you shown there ?

Thank you.

Run docker inspect portainer | grep Source to find out what volume Portainer uses.

Next, if Portainer doesn’t use the standard portainer-data volume, adjust the helper-reset-password command to match the used volume.

Stop the Portainer container first, before trying to run the helper-reset-password command: docker stop portainer(if your container is named “portainer”).

Of course you can also always re-install Portainer with a fresh config.

Hello !

Okay… After a while, I’m coming back… Again !

Still stuck on the same part : Unable to locate /data/portainer.db on disk
I did run the command you tell me :

"Source": "/mnt/HD/HD_a2/Nas_Prog/portainer",
"Source": "/var/run/docker.sock",

but I understood where it is while doing : find / -name portainer.db
as I got always the result that it doesn’t find the /data/portainer.db

and it finded : /mnt/HD/HD_a2/Nas_Prog/docker/portainer

That’s what I get.
I did stop portainer then.

But I got an issue “timeout” when I run the command :
docker run --rm -v /mnt/HD/HD_a2/Nas_Prog/docker/portainer:/data portainer/helper-reset-password

at least, it’s working ^^’

But I have now a daemon problem, not able to stop or launch the portnaire.

So I decided to unistal, restart my NAS, and I’ll try again.

EDIT : when i relaunch, it does exactly the same.
So decided to try to restart portainer and then : Error response from daemon: driver failed programming external connectivity on endpoint portainer (50b35292746c4f2b06ec87c47eed4f496f4cdaab54f0812db017ad6b457d73ff): Error starting userland proxy: listen tcp4 0.0.0.0:8000: bind: address already in use
Error: failed to start containers: portainer

any idea ?

Thank you @Tfl for sharing.
I managed to install portainer on my pr4100 the.
From there i installed home assistant and it all work perfectly.
Thanks