Build of Dockerfile with multistage build fails on private registry
See original GitHub issueDescription
We have private docker registry which requires authenication (we tried to pass the user and password via .m2/settings.xml
, directly via CLI params and by logging in via docker, it’s all the same
). The build fails when Dockerfile contains multi-staged build (Dockerfile contains multiple FROM statements), specifically on the second FROM statement with
Unable to build image [docker-develop.lnd.bz/sandbox/dmpmsbp:latest] : "Get https://docker.lnd.bz/v2/nginx/manifests/1.10: no basic auth credentials"
Info
- d-m-p version :
0.21.0
,0.28.0
(tested on both in hope that upgrade will help) - Maven version (
mvn -v
) :
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T20:41:47+02:00)
Maven home: /usr/local/Cellar/maven/3.6.0/libexec
Java version: 11.0.1, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/openjdk-11.0.1.jdk/Contents/Home
Default locale: en_CZ, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.2", arch: "x86_64", family: "mac"
- Docker version :
Client: Docker Engine - Community
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:47:43 2018
OS/Arch: darwin/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:55:00 2018
OS/Arch: linux/amd64
Experimental: true
-
If it’s a bug, how to reproduce : Sample pom.xml and Dockerfile attached. One would need private repo with authentication and docker images used in the Dockerfile not present on local system (so the download must occure). The first image is downloaded properly, the second one fails.
-
Sample project : dmpmsbp.zip maven-output.log
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:9
Thanks, I just confirmed as well, that multistage with FROM statements referring to registry-images like in your example above works.
@xfh: oh, okay. I would close this and investigate #1264 then 😉