Replies: 9 comments 2 replies
-
I've referenced another issue related to the container creation view but with the same problem. We'll track this enhancement. |
Beta Was this translation helpful? Give feedback.
-
Is there any reason not to do a simple fix for this by changing the text boxes for environment variable values to textareas? Should the fix be something more sophisticated than that? I've made this change locally on my own fork and it appears to work. |
Beta Was this translation helpful? Give feedback.
-
Any update on this? |
Beta Was this translation helpful? Give feedback.
-
not yet?? |
Beta Was this translation helpful? Give feedback.
-
Please, when this bug will be fixed? "Environment variables" list in service is not showing the multiline variables and upon saving/modyfing any of the env data this variable is removed at all... |
Beta Was this translation helpful? Give feedback.
-
Was hit by this today (json passed through) env variable, I see we are closing on 6th year anniversary of the original issue. |
Beta Was this translation helpful? Give feedback.
-
Just got hit by this bug too. I think this "Idea" category is fitting by the subject, but the UI at least should ignore the multi-line variables and do not remove it when updating the service. |
Beta Was this translation helpful? Give feedback.
-
Well, I guess I need to encode the multi-line value using base64. |
Beta Was this translation helpful? Give feedback.
-
Maybe this could be filled as an issue? I'm not sure discussions like this are taken into account in the roadmap. |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
I am unable to edit the environment variables for services that currently have one or more multi-line environment variables. The form input is a single line, and my multi-line variable (e.g.
DEFAULT_SSL_CERT
for https://github.com/docker/dockercloud-haproxy) is collapsed into a single line without even\n
to separate the lines. If I save any updates to the environment section, this environment variable will be corrupted.I'm also unable to add multi-line value to the environment section when creating a stack. The reason why I'd like to do this is to keep a single compose file for dev/staging/prod environments, paste in multi-line secrets to the environment section and list them in the stack as
FOO:
(to get from environment).Describe the solution you'd like
Describe alternatives you've considered
Values could be escaped so new lines are rendered as
\n
then restored on save. But this is really ugly and difficult to update. E.g. before copying in a new cert or other value I'd need to manually escape the newlines, and hope that there's no legitimate\n
in my value or else escape those too.Additional context
Multi-line values are easy to add via pasted stack file, but the resulting services won't be update-able. Also services created outside portainer with a multi-line value will not be update-able. For example, when setting up a new cluster I deploy HAproxy first then portainer, so that I only ever access portainer via HTTPS. Because there's no stack for HAproxy, I can only update it via the service page which will corrupt the value. If I deployed HAproxy as an external stack (via CLI, before portainer is deployed), this is also still not editiable in portainer.
Beta Was this translation helpful? Give feedback.
All reactions