"If you’re copying in local files to your Docker image, always use COPY because it’s more explicit."
says
https://nickjanetakis.com/blog/docke...in-a-dockerile
Quote:
Originally Posted by sparkling
Code:
ADD ./lib/crowd-auth-filter-1.0.0.jar /usr/local/tomcat/webapps/guacamole/WEB-INF/lib/crowd-auth-filter-1.0.0.jar
ADD ./lib/crowd-filter.properties /usr/local/tomcat/webapps/guacamole/WEB-INF/lib/crowd-filter.properties
ADD web.xml /usr/local/tomcat/webapps/guacamole/WEB-INF/web.xml
|
Do these two work as intended?
Quote:
Originally Posted by sparkling
Code:
COPY server.xml conf/server.xml
ADD tomcat.keystore /usr/local/tomcat/
|
"COPY vs ADD
Both ADD and COPY are designed to add directories and files to your Docker image in the form of ADD <src>... <dest> or COPY <src>... <dest>. Most resources, including myself, suggest to use COPY.
The reason behind this is that ADD has extra features compared to COPY that make ADD more unpredictable and a bit over-designed. ADD can pull files from url sources, which COPY cannot. ADD can also extract compressed files assuming it can recognize and handle the format. You cannot extract archives with COPY.
The ADD instruction was added to Docker first, and COPY was added later to provide a straightforward, rock solid solution for copying files and directories into your container’s file system.
If you want to pull files from the web into your image I would suggest to use RUN and curl and uncompress your files with RUN and commands you would use on the command line." says
https://takacsmark.com/dockerfile-tu...8/#copy-vs-add
Are you building?
ADD'ing without a build directory may be problematic AND
one only need specify the file name in the DEST during a "Copy" operation if the destination filename will be different.
so, try
Code:
ADD ./lib/crowd-auth-filter-1.0.0.jar /usr/local/tomcat/webapps/guacamole/WEB-INF/lib/
ADD ./lib/crowd-filter.properties /usr/local/tomcat/webapps/guacamole/WEB-INF/lib/
ADD web.xml /usr/local/tomcat/webapps/guacamole/WEB-INF/
You have culled the usual docker doc sources?
Have Fun!