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:

  • Starting and stopping App Engine instances with Docker
  • Vagrant and NGINX only works on ports other than 80
  • Importing test library 'SSHLibrary' fails with the ImportError “Importing Paramiko library failed. Make sure you have Paramiko installed.”
  • Docker MEAN stack which FROM to use?
  • Java process in Docker container doesn't exit on end of main()
  • Can FreeBSD be run inside Docker?
  • 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.

  • docker odoo 9 install pika error
  • Pods doesn't run on another node after its node down
  • Container already stopped error on ECS
  • Docker Compose volume doesn't persist files in subfolders
  • How to create a new docker image from a running container on Amazon?
  • docker-compose cannot find package (golang)
  • 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.