Reputation: 614
I have been deploying remotely with docker-compose -H $docker_host up --build
, but the directory is large and even though I only need 2 small binaries for the images everything is getting sent to the remote server.
The slowness is having an impact on my performance, so I was wondering if there was a way to make compose build the images locally and then send those instead of the whole directory.
Upvotes: 0
Views: 66
Reputation: 36
A .dockerignore file tells docker what files to ignore when sending the build context during a docker build.
Upvotes: 1
Reputation: 942
You can build the images locally, but you will need a Docker daemon to do that. After building an image you would then push it to a Docker registry (you could also use a public registry, like the Docker hub and then you could download the image from that registry on the target server.
You can head over to the docker docs to learn more about the architecture or ask a more specific question - I'll try to answer.
Upvotes: 1