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

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

20
4
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: 68
  • stack.PNG
    stack.PNG
    331 KB · Views: 67
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.
 
20
4
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

@DeltaGolf Here’s my approach: Docker - NextCloud on Synology NAS using Docker compose (with Portainer)
Replies
18
Views
2,695
Replies
3
Views
749
  • Question
Sure, thanks for the tip, apparently it can workaround the Web Station bug although I wonder how this...
Replies
6
Views
1,114
Sorry, misread your previous questions so my answer was confusing. They will not have issues, no.
Replies
14
Views
1,160
Synology have an article on installing in Docker the SVN server + a GUI SVN admin: How do I launch an SVN...
Replies
4
Views
2,140
Thanks alot! I've mixed these up. I use the Bedrock-edition now and everything works almost instantly!
Replies
17
Views
2,813
Somehow your style of question reminds me to "let me google that for you" requests... Word of advise...
Replies
11
Views
1,223

Welcome to SynoForum.com!

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

Registration is free, easy and fast!

Top