Reputation: 1130
My docker compose file defines an image named jetty_base, which creates a simple hardened jetty image. The dockerfile for this image starts with - FROM ubuntu:16.04 AS jetty_base
Later in the compose file I specify another image with the following dockerfile entry: FROM jetty_base AS stackone
when I try to run compose up, I get this :
Service 'stackone' failed to build: pull access denied for jetty_base, repository does not exist or may require 'docker login'
The internet talks about using a forward slash somewhere in the imagename (in the FROM line?) Does anyone know how to get docker compose to find an image in the local repository?
Upvotes: 2
Views: 7621
Reputation: 145
Does anyone know how to get docker compose to find an image in the local repository?
You first need to build the image locally from the dockerfile and tag it. Then you can reference that image in the docker-compose.yml
This answer explains this process perfectly.
Upvotes: 1