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

Systemd escaping #647

Open
ryansmithevans opened this issue Mar 9, 2017 · 1 comment
Open

Systemd escaping #647

ryansmithevans opened this issue Mar 9, 2017 · 1 comment

Comments

@ryansmithevans
Copy link

Complex docker run commands create a systemd runscript that doesn't work.
If you're using spaces or quotes or something like this, then you'll get issues with the systemd/system/docker-x.service file.

See https://www.freedesktop.org/software/systemd/man/systemd-escape.html

A better approach would be to run a script that contains the run command. This way any issues are avoided for commands used in docker.

@Thorndike
Copy link

Thorndike commented Mar 14, 2017

I found a fast bugfix for spaces in environment variables:
If you patch the file

/lib/puppet/parser/functions/docker_run_flags.rb

and find the line
['-e %s', 'env'],
and change that to
['-e "%s"', 'env'],`
the environment variables with spaces work fine.

Found in Version 5.3.0

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

No branches or pull requests

2 participants