The problem was that I used the same docker-compose.yml file during development and production.
The application service did not specify a repository name or tag, so when I ran docker-compose up on the server, it just tried to create a Docker file in the application source directory (which does not exist on the server).
I decided to solve the problem by adding an explicit image field to my local docker-compose.yml file.
version: '2' services: web: image: 'my-private-docker-registry:latest' build: ./app
Then an alternate file was created to create:
version: '2' services: web: image: 'my-private-docker-registry:latest'
After launching docker-compose build local web service image is created with the repository name my-private-docker-registry and the latest tag.
Then this is just a case of clicking an image on a repository.
docker push 'my-private-docker-registry:latest'
And by launching docker pull , you can safely stop and recreate running containers with new images.
source share