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

Creating inline files with here-doc in Dockerfile doesn't work #1225

Open
shollander opened this issue Nov 4, 2024 · 2 comments
Open

Creating inline files with here-doc in Dockerfile doesn't work #1225

shollander opened this issue Nov 4, 2024 · 2 comments

Comments

@shollander
Copy link

Expected Behavior

The following Dockerfile should work (https://docs.docker.com/reference/dockerfile/#example-creating-inline-files):

FROM alpine
COPY <<EOF /etc/myconf
setting1=value
EOF

Current Behavior

Fails with the following error:

Could not build image: COPY failed: no source files were specified

The Dockerfile works fine with commandline docker build.

@bmuschko
Copy link
Owner

bmuschko commented Nov 7, 2024

I'd have to see the task that you are running. Can you provide your build logic?

@shollander
Copy link
Author

This is my Gradle task:

tasks.register("buildDockerImage", DockerBuildImage) {
    inputDir = project.projectDir
    images.add("me/myImage")
}

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