[ openshift v3 ] deploy the images to private docker repository

Openshift’s container registry is free for 30 days, so I move to docker hub registry ( that provide 1 private repository for free )

Before

image_configuration_before

After

image_registry_after.png

NOTE : checkout from openshift/nodejs:latest

and push to dsin/nodejs-mongo-persistent ( see more at Builds > Images )

 

 

Example of ~/.docker/config.json file

NOTE : On windows, make sure to run docker login command from the “Docker Quickstart Terminal” ( ref : https://dsin.wordpress.com/2017/12/14/docker-docker-for-windows-installer-error-on-windows-7/ )

{ "auths": {</pre>
"https://index.docker.io/v1/": {

"auth": "WhatEverGeneratedRandomValue=="

}

},

"HttpHeaders": {

"User-Agent": "Docker-Client/17.10.0-ce (windows)"

}

}

 

Build Error#1 

An error occurred connecting to the server.
Failed to list imagestreams/v1 (status 504)

openshift_server_error

Cause 

Example : starter-us-west-1 experience elevated api errors

ref : https://status.starter.openshift.com/

 

Build Error#2

Pulling image "whatever/whatever" ...
pulling image error : unauthorized: authentication required
error: build error: unable to get whatever/whatever:latest

Cause

`Docker Image` may not be at `hub.docker.com`.

It may link to `registry.access.redhat.com`.

ref : https://stackoverflow.com/questions/46574214/docker-push-got-error-parsing-http-405-post-not-allowed

 

Using command line

$ ./oc get build
NAME TYPE FROM STATUS STARTED DURATION
nodejs-mongo-persistent-5 Source Git@3dc71ee Failed (PushImageToRegistryFailed) 2 hours ago 4m20s
nodejs-mongo-persistent-6 Source Git@3dc71ee Failed (PullBuilderImageFailed) About an hour ago 35s

Phongsathorn.E@THRYWKS0008 MINGW64 ~/Downloads/openshift-origin-client-tools-v3.7.0-7ed6862-windows
$ ./oc logs build/nodejs-mongo-persistent-6
Cloning "git@bitbucket.org:dsin/openshift-nodejs-v3.git" ...
Commit: 3dc71ee9644c189ec3e1fe551c116cce7ad1db02 (initial commit)
Author: Phongsathorn Eakamongul <phongsathorn.eakamongul@whatever.com>
Date: Fri Dec 29 13:34:15 2017 +0700
Pulling image "dsin/openshift-docker-nodejs" ...
pulling image error : unauthorized: authentication required
error: build error: unable to get dsin/openshift-docker-nodejs:latest
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s