fabric8:push fails going to AWS ECS
See original GitHub issueI am doing local development using Docker for Windows (18.03.1-ce-win65 (17513)) in Linux mode (although I do switch to Windows mode periodically), and fabric8-maven-plugin to build and push images. I’ve run a local registry inside Docker, and am able to push to that using f-m-p.
However, when I use a repository on AWS ECS, I get:
Failed to execute goal io.fabric8:fabric8-maven-plugin:3.5.40:push (default-cli) on project jenkins-master: Unable to push 'dbg/jenkins-master' from registry 'xxxx.dkr.ecr.us-west-2.amazonaws.com' : no basic auth credentials -> [Help 1]
I’ve successfully tagged, and pushed to this repo using the docker commandline. So I conclude the issue is with f-m-p. E.g.:
$ docker tag dbg/jenkins-master xxxx.dkr.ecr.us-west-2.amazonaws.com/dbg/jenkins-master
$ docker push xxxx.dkr.ecr.us-west-2.amazonaws.com/dbg/jenkins-master
The config files here are a little ugly, as I’ve bee trying different workarounds. I would prefer if the system worked with wincred, for safety, since it is integrated with the daily aws get-login system, to avoid cutting and pasting things into config files each day.
For testing, it is easy to create a free aws ecs account, which comes with a registry.
For reference, I suspect it is related to something like the docker-maven-plugin folks faced: https://github.com/spotify/docker-maven-plugin/issues/181
For login:
aws ecr get-login --no-include-email
which spits out a docker login command that you paste into the cli again:
docker login -u AWS -p ppp https://xxx.dkr.ecr.us-west-2.amazonaws.com
Maven: 3.3.9
f-m-p: 3.5.40
.docker/config.json:
{
"auths": {
"xxx.dkr.ecr.us-west-2.amazonaws.com": {},
"https://xxx.dkr.ecr.us-west-2.amazonaws.com": {}
},
"HttpHeaders": {
"User-Agent": "Docker-Client/18.03.1-ce (windows)"
},
"credsStore": "wincred"
}
Pom:
<properties>
<fabric8-version>3.5.40</fabric8-version>
<fabric8.mode>auto</fabric8.mode>
<fabric8.debug.enabled>true</fabric8.debug.enabled>
<docker.verbose>true</docker.verbose>
<docker.registry>xxx.dkr.ecr.us-west-2.amazonaws.com</docker.registry>
<docker.apiVersion>1.37</docker.apiVersion>
</properties>
<build>
<resources>
<resource>
<directory>src/main/fabric8</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/docker</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${fabric8-version}</version>
<configuration>
<verbose>true</verbose>
<images>
<image>
<name>dbg/jenkins-master</name>
<alias>dbg/jenkins-master</alias>
<build>
<dockerFile>JenkinsMaster.Dockerfile</dockerFile>
<filter>@</filter>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (4 by maintainers)
Top GitHub Comments
@rohanKanojia I just migrated on the new tag yesterday. I hope I can give you a feedback soon
@Beennnn : Hm, okay. I’m closing this for now.Feel free to re-open anyone faces this again.