Docker Add command doesn't work in nested destination directory
I’m trying to build a simple image that includes a file (jdbc driver for Teamcity) in the image that I will then upload. When I set the destination to /data/ or /data/teamcity_server/ it works but, if I include the full path of where the file needs to be, it doesn’t. I’m stumped.
FROM jetbrains/teamcity-server ADD https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar /data/teamcity_server/datadir/lib/jdbc/
I tried the copy command using a file on disk in the context of the folder i’m building from with the same result. Surely it’s something simple I’ve missed, but i’m about frustrated at this point.
One Solution collect form web for “Docker Add command doesn't work in nested destination directory”
FROM jetbrains/teamcity-server RUN cd /data/teamcity_server/datadir/lib/jdbc/ \ && wget https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar