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.

Dockerfile:

  • Requests hanging on ports forwarded from docker container inside vagrant
  • Create Dockerfile interactive?
  • Is s3fs not able to mount inside docker container?
  • 502 Bad Gateway: Registered endpoint failed to handle the request
  • Why is the Docker vfs storage backend not considered suitable for production?
  • How to pass arguments to a Dockerfile?
  • 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.

  • Specify runtime for self container .Net Core app in Docker
  • Dockerize ruby script that takes directories as input/output
  • jenkins plugins installed via CLI inside docker container is not showing up in jenkins web console
  • How to automate a docker run from a private Dockerhub repo?
  • Docker container shutdown script
  • Running VirtualBox in Ubuntu in Mac OSX, won't start up
  • One Solution collect form web for “Docker Add command doesn't work in nested destination directory”

    What about?

    FROM jetbrains/teamcity-server
    RUN cd /data/teamcity_server/datadir/lib/jdbc/ \
       && wget https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.