Closed wenzowski closed 5 years ago
@wenzowski can you drop a link to the CircleCI job where you're seeing this error?
it looks like we expect an https address for the push destination, but you're trying to push to one that only uses http ?
Of course! Attempt to push at the end of the cas-postgres#37 build. Thanks!
@wenzowski as the command that failed isn't actually part of the orb, it's not 100% clear to me that the issue lies in the orb source code... is there something that led you to believe this to be the case ?
@lokst you're more familiar with this orb than i am—do you have any thoughts here ?
@iynere I'm working on an isolated test
Ideally, any s2i build that completes successfully should be able to push to the openshift 3.11 registry created via create-local-cluster-with-oc.yml
in order to test config files before attempting to deploy to a test cluster.
@wenzowski Could you share the commands you are using to build and push the docker image to the registry?
@lokst we should add integration tests where an image is pushed to an openshift registry created by the orb, yes ?
@iynere Yes, I'm looking into testing that
@lokst @iynere I extended a test that was already there but haven't found a fix yet
@wenzowski I was able to reproduce the same error but haven't been able to find a fix for this yet too, I'm gonna continue trying
@lokst I'm reasonably confident we need to mark the registry as insecure but I can't figure out how to use a <<
anymore since that's now reserved for template interpolation :'(
cat << EOF >/home/circleci/.docker/config.json
{
"insecure-registries": [
"172.30.0.0/16"
]
}
EOF
probably related to openshift/origin#8997
@wenzowski i can answer that question for you quickly—you just need to escape it:
/<<
see example:
https://github.com/CircleCI-Public/cimg-orb/blob/master/src/commands/test.yml#L97
@wenzowski Were you able to resolve the issue after configuring Docker?
Without configuring Docker, I was able to get pushing of an image to the local registry to work using docker push
and making sure that port 80 is used as the docker registry URL. This StackOverflow article was a good reference for me: https://stackoverflow.com/questions/45624945/unable-to-push-a-docker-image-to-local-openshift-origin-registry
oc login -u system:admin
oc expose svc/docker-registry -n default --as system:admin
oc login -u devuser -p password
sleep 60
docker login -u devuser -p `oc whoami -t` http://docker-registry-default.127.0.0.1.nip.io:80/
docker pull alpine
oc new-project localclustertestproject
docker tag alpine:latest docker-registry-default.127.0.0.1.nip.io:80/localclustertestproject/alpine
docker push docker-registry-default.127.0.0.1.nip.io:80/localclustertestproject/alpine
@lokst that'll do it :)
I'd initially gotten it wrong by trying to use the /home/circleci/.docker/config.json
and not the /etc/docker/daemon.json
.
Fixing that and restarting the daemon solved everything, in keeping with the 3.11 docs
Thanks for sharing @wenzowski !
When trying to push a build to an imagestream the push fails.