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

HEREDOC: Escaping $ seems off #5422

Open
LecrisUT opened this issue Mar 20, 2024 · 3 comments
Open

HEREDOC: Escaping $ seems off #5422

LecrisUT opened this issue Mar 20, 2024 · 3 comments

Comments

@LecrisUT
Copy link

LecrisUT commented Mar 20, 2024

Description

Let's say we have dockerfile like:

FROM fedora:latest

ENV EXPAND_THIS_VAR=/correctly_expanded
COPY <<EOF /etc/profile.d/load-modules.sh
export MODULEPATH="\$MODULEPATH:$EXPAND_THIS_VAR/lmod"
EOF

CMD cat /etc/profile.d/load-modules.sh

The issue is that the $ sign is not escaped as expected

Describe the results you received:

$ podman run ...
export MODULEPATH="\$MODULEPATH:/correctly_expanded/lmod"

Describe the results you expected:

$ podman run ...
export MODULEPATH="$MODULEPATH:/correctly_expanded/lmod"

Output of podman version if reporting a podman build issue:

Client:       Podman Engine
Version:      4.9.3
API Version:  4.9.3
Go Version:   go1.21.7
Built:        Mon Feb 19 16:41:34 2024
OS/Arch:      linux/amd64
Copy link

A friendly reminder that this issue had no activity for 30 days.

@LecrisUT
Copy link
Author

Maybe #5473

Copy link

A friendly reminder that this issue had no activity for 30 days.

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

1 participant