Question Running Portainer on Docker - Can't deploy a stack

Currently reading
Question Running Portainer on Docker - Can't deploy a stack

Hi everyone,

I have installed portainer on my Synology NAS by running this command.
sudo docker run -d \
--name=portainer \
--restart=always \
-p 8000:8000 \
-p 9000:9000 \
-e PUID=1026 \
-e PGID=100 \
-e TZ=Europe/Paris \
-v /var/run/docker.sock:/var/run/docker.sock  \
-v /volume1/docker/portainer:/data \

The container is setup and running.
I can monitor, start, stop, restart, delete my containers, volumes, networks, etc. without any issues.

Nervertheless, when I want to create a new stack with my docker compose yaml, it results in an error.
The image is downloaded, the container created and then BOOM.
Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused “process_linux.go:430: container init caused \”process_linux.go:396: setting cgroup config for procHooks process caused \\\”failed to write 0 to memory.swappiness: write /sys/fs/cgroup/memory/docker/218204415accffd3a31eab9e8073c82fa6afec9720518eac1ba4caa366944f4c/memory.swappiness: invalid argument\\\”\””: unknown

Does anyone alreay faced it? Any hints how to solve it?

Thanks for your help


  • error.PNG
    21.5 KB · Views: 21
  • stack.PNG
    331 KB · Views: 21
Last edited:
Seems generaly broken. No idea how to fix it. Pitty.
Next time your add compose.yml content, please add them as text using a "code </>" block. It makes it easier for others to read and/or reproduce your situation.

One more thing: The environment variables PUID, PGID and TZ you added to portainer are going to have no effect. If the Dockerhub description does not specificly mention them, it is high likely that the maintainer of the image did not implement the mechanisms required to make them do anything.
Hello @one-eyed-king
Thanks for the feedback.
It seems I can't edit my post. Here is the yaml:
version: "2"
    container_name: embystats
    image: uping/embystat:nightly-ubuntu-x64
    restart: unless-stopped
      - PUID=1026
      - PGID=100
      - TZ=Europe/Paris
      - 6555:6555
      - /volume1/docker/embystats/config:/app/config
Last edited:
There is not much we can do about the problem: it is a combination of what the Synology kernel Docker package provides and how Portainer defaults empty values.

mem_swappiness is a field in docker-compose, which is implicitly filled with "null" (as in no value) from docker-compose, but is explicitly filled with 0 from Portainer. If you add it explicitly to your compose declaration, it will not allow to add null, since it will require an iteger value.

This will need a fix, either in how Portainer uses the docker-api to create containers from a docker-compose declaration OR adding the missing implementation ins Synology's kernel Docker package.

I am afraid this problem will not occour on a "normal" linux system...

update: this is not a kernel issue. You simply manged to find another bug in the Synology Docker package!

If you create a container from the cli, in /sys/fs/cgroup/memory/docker/ a subfolder with the full containerid is created. If you deploy containers from docker-compose (regardless wether using the cli or Portainer), those folders are not created! If you add "mem_swappiness: 0" to a compose.yml and try to deploy it from the cli, it fails with the same problem. On my other linux systems the folder is created. This is just another bug in Synologies half-assed docker package...


NAS Support
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Thanks a lot for your analysis!
Do you know if we can report this somewhere?
Synology has a report page as well as feature request page. Have a look in there support section a bit.

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to! is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Similar threads

Similar threads