Is a Registry (local or remote) necessary to build a development system with Docker?
I have a system with several services/containers that use one shared data container. I use docker-compose to build/run my sysem. whenever I do a docker-compose build, the first container that depends on the shared container fails due to an error finding the image for the shared container.
Output with error:
…
Successfully built 28953289ac20
rabbitmq uses an image, skipping
mongodb uses an image, skipping
Building alert
Step 1 : FROM service
Pulling repository docker.io/library/service
ERROR: Service ‘alert’ failed to build: Error: image library/service not found
My docker-compose file:
Define an API gateway that maps calls to NGINX on port 80 to each of the
services that make up PKC, where each service is running on a different
port starting at 5001.
version: “2”
services:
nginx:
build: …/…/…/NGINX
restart: always
ports:
- "80:80"
links:
- registration
- alert
volumes:
- “…/…/…/NGINX/Configuration:/etc/nginx/conf.d”
PKC-API
service:
build: …/…/…/Service
restart: always
volumes:
- “…/…/…/Service/Library:/service/Library”
registration:
extends:
service: service
build: …/…/…/Registration
restart: always
ports:
- "5001:5000"
volumes:
- "…/…/…/Registration/Source:/service/Source"
links:
- mongodb:mongodb
- rabbitmq:rabbitmq
alert:
extends:
service: service
build: …/…/…/Alert
restart: always
ports:
- "5002:5000"
links:
- mongodb
- rabbitmq
PKC-Internal
mail:
extends:
service: service
build: …/…/…/Mail
restart: always
links:
- mongodb
- rabbitmq
notification:
extends:
service: service
restart: always
build: …/…/…/Notification
links:
- mongodb
- rabbitmq
Infrastructure
mongodb:
image: mongo
restart: always
ports:
- "27017:27017"
volumes:
- “/opt/pkc-db:/data/db”
- “…/…/…/PeaceKeeperCloud/Test:/Test”
TODO: Set up a volume on the docker host to hold the queue’s persistent messages.
rabbitmq:
restart: always
image: rabbitmq
#ports:
# - “5672:5672”