docker-playground: repository 'laforge/debian-jessie-build' not found
There is a problem appearing when building Docker images based on 'laforge/debian-jessie-build'...
After building, the 'debian-jessie-build' image is being tagged according to the following rule:
$(USER)/$(IMAGE) # e.g. user/debian-jessie-build
so, if the current $(USER) != 'laforge', build fails:
make: Leaving directory `/home/user/osmocom/docker-playground/debian-jessie-build' make -C osmo-stp-master make: Entering directory `/home/user/osmocom/docker-playground/osmo-stp-master' docker build --build-arg USER=user -t docker.io/user/osmo-stp-master:latest . Sending build context to Docker daemon 9.216kB Step 1/16 : FROM laforge/debian-jessie-build repository laforge/debian-jessie-build not found: does not exist or no pull access make: *** [docker-build] Error 1 make: Leaving directory `/home/user/osmocom/docker-playground/osmo-stp-master' make: *** [osmo-stp-master] Error 2
because there is no 'laforge/debian-jessie-build', there are:
# docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE user/debian-jessie-build latest 1f6421af8bfc 15 minutes ago 621MB debian jessie 79f4bda91989 3 weeks ago 127MB
I started to think, may we parametrize the 'FROM laforge/debian-jessie-build' somehow?
Fortunately, yes! The following header makes the trick:
ARG USER FROM $USER/debian-jessie-build
A change will be sent soon...
It should have been noted that I didn't experience this problem previously, most likely because
the 'debian-jessie-build' was tagged as 'laforge/debian-jessie-build', so after removing all
images I had and rebuilding from the recent Dockerfile, I have got '$USER/debian-jessie-build'.