Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create/modify/save ENV variables on Synology environment. #2423

Closed
chreggy opened this issue Oct 31, 2018 · 96 comments
Closed

Cannot create/modify/save ENV variables on Synology environment. #2423

chreggy opened this issue Oct 31, 2018 · 96 comments

Comments

@chreggy
Copy link

chreggy commented Oct 31, 2018

Bug description

Cannot create/modify/save any Environment variables after container creation. Bug only on Synology.

Expected behavior

I want to create, modify or save container environment variable like the synology docker gui.

Steps to reproduce the issue:

Steps to reproduce the behavior:

  1. Go to 'Containers'.
  2. Click on a container and duplicate/edit.
  3. Modify or Create a variable in the ENV tab.
  4. Deploy the Container.

Technical details:

  • Portainer version: 1.19.2
  • Docker version (managed by Portainer): Standalone 17.05.0-ce
  • Platform (windows/linux): Synology 6.2.1

Additional context

If you want more details, give me the instructions for this.

Thanks.

@deviantony
Copy link
Member

Bug only on Synology.

@chreggy have you been able to test this on another environment to confirm that this is only problematic on Synology? Synology Docker GUI works ok?

@chreggy
Copy link
Author

chreggy commented Oct 31, 2018

It's working on my Debian VM and Synology GUI.

@deviantony
Copy link
Member

@chreggy what error are you seeing? Something in the UI? Can you inspect the container creation HTTP request via your browser dev tools?

@chreggy
Copy link
Author

chreggy commented Nov 8, 2018

Hello,

there is no error on deployment. Where can I see the real HTTP request ?

@deviantony
Copy link
Member

@chreggy in your browser you should be able to open the "developer tools" (F12 on Chrome for example), then simply refresh the view and inspect the requests in the network panel of the developer tools.

@chreggy
Copy link
Author

chreggy commented Nov 15, 2018

Hello,

2 screenshots :

With Env variable, not saving it :

with_env

With a Label and saving OK :

with_label

Is it what you want ?

@KamistixX
Copy link

KamistixX commented Feb 22, 2019

I can confirm having the same issue on my Synology NAS. No error message at all but adding ENV variables just get ignored when deploying/editing a container.

@keteflips
Copy link

keteflips commented Mar 11, 2019

Same problem here with Portainer 1.20.1

@adigyran
Copy link

1.20.2 218+ same problem

@digitalface
Copy link

Same issue as above, 1.20.2, Synology 218+ , unable to make changes to ENV variables

Everything else works (creating containers etc)

@anton-matosov
Copy link

It might be related to the way docker is installed there. I am experiencing an issue that Synology's docker ignores environment from swarm services commands:
This command works directly on NAS

sudo docker run --rm --env SERVER=google.com alpine:latest sh -c 'ping ${SERVER}'

However while running this one, no environment is set on Synology NAS node, but works on other nodes.

docker service create --mode global --name ping-alpine --env SERVER=google.com alpine:latest sh -c 'ping ${SERVER}'

Docker on Synology NAS seems to be pretty outdated

docker --version
Docker version 17.05.0-ce, build d49b918-synology

and IMO can be the root cause of the issue

@tsm121
Copy link

tsm121 commented Jun 8, 2019

Same issue. Changes gets reverted when editing a container.

Portainer 1.21.0
Synology 918+
Docker version 17.05.0-ce, build 371caef-synology

@ohadbenita
Copy link

Any of you guys found a solution to this issue ?

@KamistixX
Copy link

KamistixX commented Aug 29, 2019

Docker for Synology package has just been updated to 18.09.6 version, I have yet to see if that improves the ENV variables handling in Portainer.

Update after testing : no improvement spotted

@ohadbenita
Copy link

ohadbenita commented Aug 29, 2019 via email

@tsm121
Copy link

tsm121 commented Sep 2, 2019

No changes for me at least. Same problem.
Docker version 18.09.6, build 8cdf373

@r2ixuz
Copy link

r2ixuz commented Sep 2, 2019

For me also no change. And watchtower is not able to re-set ENV anymore with this new version.

Kind of known issue for this version: https://community.synology.com/enu/forum/15/post/128146

@falcon397
Copy link

This has been an issue for me for some time now, I'm glad there's a ticket open for it.

When I use Portainer to recreate the container, and I update an environment variable, the resulting container has the previous environment variable set, not the new value I had just set.

@scyto
Copy link

scyto commented Oct 9, 2019

new here, is the advised interim solution(in the synology forum post linked above) 'to use the synology docker UI to set the env var' practical? It would seem not given how a new container is made for each operation?

@ohadbenita
Copy link

ohadbenita commented Oct 10, 2019 via email

@r2ixuz
Copy link

r2ixuz commented Oct 10, 2019

There’s a new docker release for Synology that solves the problem

That is not true. With the latest stable Docker release by Synology (18.09.0-0506) the issue still exists. Do you refer another version? On 29th Aug you commented by yourself that it does't work with this version...

@ohadbenita
Copy link

ohadbenita commented Oct 10, 2019 via email

@raspberrycoulis
Copy link

@elisimpson you can simply go to the Docker app in DSM, stop the container, do what you need to do with the variables in the container configuration modal, and restart the container. This works fine as far as I'm concerned

If that's the case, then there's no need to even use Portainer on a Synology NAS as you can also edit the environment variables within the Docker app UI. However if @elisimpson is using Portainer for the same reason as me (that it is much better and convenient than the native Docker app within Synology, and less buggy), then a fix to this issue would be much appreciated.

@coisnepe
Copy link

My point is that for the time being there is a work around that does not involve deleting a container AND recreate from the command line, which sounds like more hassle than simply using the UI. No?

@raspberrycoulis
Copy link

My point is that for the time being there is a work around that does not involve deleting a container AND recreate from the command line, which sounds like more hassle than simply using the UI. No?

Oh don't get me wrong, I understand you're helping here. It's more that the fix suggested doesn't actually involve using Portainer, which means that whilst I'm sure it will work, it is not related to the issue. It's like saying you will no longer be scared of flying if you walk everywhere...

FWIW, I've started using Docker Compose a whole lot more now - then I just tweak one file then run docker-compose up -d to recreate any effected containers. Again, this is a "fix" but it's not really related to Portainer as it means defaulting back to command line scripting. It means my use of Portainer is more for a visual oversight of my containers, rather than what it was designed for - to be a graphical way of managing your containers - mostly because the Docker app within Synology is poor (slow, often fails to load unless I reboot my NAS and just general clunky).

@elisimpson
Copy link

There are many settings you cannot modify in the Synology GUI without breaking the container. Most of my containers use at least one of these settings, so the Synology Docker GUI is mostly useless for modifying those containers (it can start and stop them with no problems, but any changes will break those settings that Synology doesn't support)

@kristoferlundgren
Copy link

I just wrote an article on how to run the latest Docker daemon as a Docker container (DinD) on Synology DSM 6.x , and having that Docker daemon configured as the default Docker daemon on the system.
Please read, and try it out:
https://kristoferlundgren.medium.com/synology-run-the-latest-docker-daemon-without-patching-dsm6-x-7bb4834d87bc

@pexner
Copy link

pexner commented May 1, 2021

For me, it looks like that just the changes made in the formular aren't sent/updated to portainer. (lack of SAVE button to be sure!)
When chaning something in ENV, then reloading the page, the old value comes back.
Maybe just a browser problem?
(me on macOS and Synology too)

@Tailslide
Copy link

Same here.. my workaround is to compose with Custom App Template/Stack and then if I change the compose and redeploy from the stack screen the changes stick. Unfortunately these components seem to be invisible to the synology manager even when they are running.

@ShadowButton
Copy link

Issue is still present! even after the latest docker version on synology.
After along time using the stock synology docker application I switched today to portainer. After making some changes for my container env variables I noticed it's never saved when recreating the container with the new values.
I can confirm that the workaround: making the changes inside the synology docker GUI still works, but what's the point of using porttainer then if you are still dependent on the old stuff ..

@Erik262
Copy link

Erik262 commented Jun 1, 2021

Yeah this is really annoying!! Don't know why I should still use portainer.

@elisimpson
Copy link

Looks like Synology rolled back their last Docker update... maybe because it didn't fix this issue?

@EricGuic
Copy link

EricGuic commented Aug 31, 2021

Hi, here with DSM7, Portainer 2.6.2 and Docker 20.10.3-1233 (official from the Synology Package Center), I still have this issue : no way to modify an ENV value and recreate the container. It's always get back to the old value.
And as others here, I don't want to use Synology User Interface for Docker, because it breaks other things in the container.
Any recent help or upgrade ?

@c0ldtech
Copy link

c0ldtech commented Sep 2, 2021

Same here, having this issue also and surprised this has not been addressed after such a long time

@Dannyx323
Copy link

i have the same issue here ENV vars edit will be ignored and get back to the settings before the edit.
to bypass this you can edit the stopped container with the synology docker gui thing and after saving use portainer again.

How to solve this?

Docker version 20.10.3, build b35e731
portainer 2.6.3
DSM 6.2.4-25556
ds220+

@artypineda
Copy link

I'm merely trying to launch a Next.JS app with proper call to the .env.process.API_URL and keep getting the "Only Absolute Paths is accepted" error. I call it either with "getInitialProps" or "getServerSideProps" and nada. Would like to keep using my Synology NAS Docker Strapi Image but well.... life.

@DrEsteban
Copy link

Why was this issue closed? It is very much still active as evidenced by #5813

@Erik262
Copy link

Erik262 commented Oct 7, 2021

Seems to be that they don't care about this error

@bensquire
Copy link

Stumbled into this today...

@GeorgKlaussner
Copy link

This bug was driving me crazy today. Please consider fixing this.

@DrEsteban
Copy link

@Erik262 @bensquire @GeorgJenkinsGit
Just FYI I was able to workaround this. If you deploy your container as a "Stack" (Docker Compose) instead of a straight container, it seems as if updates to the env vars/settings work as expected. I think it's because a Stack update is actually a delete/recreate rather than an edit.

@jamescarppe
Copy link
Member

Why was this issue closed? It is very much still active as evidenced by #5813

This issue was closed almost 2 years ago and at the time it was believed it was an issue pending resolution by Synology (which it still may be). We are tracking this issue in #5813 as you indicated and we recommend following that issue going forward.

@Seger85
Copy link

Seger85 commented Jan 1, 2022

Have the same problem, is there already a solution for this?

@GeorgKlaussner
Copy link

Delete container and create a new one

@geek111
Copy link

geek111 commented May 31, 2023

Welcome in 2023 :D And this bug is still happen...
Docker version 20.10.3, build 55f0773
DSM 7.1.1-42962 Update 5

@Erik262
Copy link

Erik262 commented May 31, 2023

@geek111 and we will see you again in 2024 ;D

@Gitonthegrid
Copy link

The problem is still there, I cant change or edit env variables in Portainer. So annoying.

@OdinVex
Copy link

OdinVex commented Aug 19, 2023

I have the same problem as well. New, editing, nothing works.

@geek111
Copy link

geek111 commented Aug 21, 2023

I found probably bypass this issue xd Use "stacks" and then if you change ENV then deploy new stack :D
I know you can edit ENV by synology docker gui but synology is not perfect (ENV cannot be empty...) if in synology you have empty ENV then container wont want save...

@OdinVex
Copy link

OdinVex commented Aug 21, 2023

I found probably bypass this issue xd Use "stacks" and then if you change ENV then deploy new stack :D I know you can edit ENV by synology docker gui but synology is not perfect (ENV cannot be empty...) if in synology you have empty ENV then container wont want save...

Portainer allows you to edit them, it just doesn't save the changes.

@waylonwang
Copy link

Welcome in 2024 :D And this bug is still happen...
Docker version 20.10.23, build 876964a
DSM 7.2.1-69057

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests