Docker build with files from primary container

Hi,

I’m generating a lot of static pages in a Ruby+node container and want to include these static files in a nginx container build with remote_docker.

I understand that I can copy files between those environments with ‘docker cp’ but I can’t access that volume directly with docker build or Dockerfile. If i understand correctly, normal docker command are run in primary container, but build/push/run etc. are run in the remote docker. Does this mean that it’s not possible to copy from the volume you copied to with ‘docker cp’ in the remote docker environment so it’s accessible in the local filesystem? Are there any way to force a docker command to be run in the remote docker environment instead of the primary one?

Any tips on how to achieve what i want? I really want to do this without any external services or dependencies. I also want to keep the nginx image small so I can’t to the build there either.

Use docker machine instead and run docker commands to achieve what you want.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.