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.
Bash:
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 \
portainer/portainer

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.
Code:
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
 

Attachments

  • error.PNG
    error.PNG
    21.5 KB · Views: 94
  • stack.PNG
    stack.PNG
    331 KB · Views: 85
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:
YAML:
version: "2"
services:
  portainer:
    container_name: embystats
    image: uping/embystat:nightly-ubuntu-x64
    restart: unless-stopped
    environment:
      - PUID=1026
      - PGID=100
      - TZ=Europe/Paris
    ports:
      - 6555:6555
    volumes:
      - /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...
 

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.

Similar threads

How did you create the Portainer container in first place? As in exact docker run commands or in case...
Replies
7
Views
1,404
Thank you for this - I'll give it a go and see where I get - worst case I learn something as I go!
Replies
6
Views
1,642
Root of this issue found;) For unknown reason, the docker package on the first, failing DS, uses the...
Replies
3
Views
1,251
Gluetun works fine. I'm using it both for several other containers, and for proxying my browser through my...
Replies
3
Views
427
Thanks... I tried something similar with rsync. The docker volume lived in...
Replies
7
Views
619
I can’t find any option to restore just the settings. 1710356648 Phew, managed to fix it. Within the...
Replies
4
Views
499
Good to hear. Deluge has not been updated for almost two years now as an app, nevertheless. But it gives...
Replies
12
Views
1,103

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top