How to copy files from an absolute path to docker image using docker maven plugin
I am writing microservices with Java. At the end, I run maven build to generate a Docker image based on a Dockerfile in directory [project-root]/docker. Some files need to be copied into the Docker image. Therefore I have the following lines in my Dockerfile: # HDFS base image FROM mdouchement/hdfs COPY ${workdir.name} /${workdir.name} COPY ${resource.dir} /etc/hadoop Variables workdir.name and resource.dir are defined in pom.xml <properties> <workdir.name>javarun</workdir.name> <resource.dir>${project.baseUri}/src/main/resources</resource.dir> </properties> While first copy command uses relat
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.