gradle-docker-plugin
gradle-docker-plugin copied to clipboard
Creating inline files with here-doc in Dockerfile doesn't work
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.
I'd have to see the task that you are running. Can you provide your build logic?
This is my Gradle task:
tasks.register("buildDockerImage", DockerBuildImage) {
inputDir = project.projectDir
images.add("me/myImage")
}