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:

  • psql: could not translate host name “somePostgres” to address: Name or service not known
  • Virtual machine disk space in Docker for Windows beta
  • How to share local files to docker container In swarm with docker-compose
  • Let's encrypt 502 bad gateway docker
  • Node webservice in Docker with entrypoint fails but works otherwise
  • Docker container drive does not match available hard drive space on host
  • 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.

  • Automated pulling from gitolite repo within docker container
  • debconf warnings despite DEBIAN_FRONTEND inside Docker image
  • docker toolbox on windows then docker run hello-world gets x509: certificate signed by unknown authority
  • How to save docker container using on IMAGE name?
  • Gunicorn graceful stopping with docker-compose
  • docker-machine ssh into Vagrant VM failing
  • 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.