Below are the steps to build and publish docker images to nexus repository.
a. Login to nexus server with credentials
Code Block |
---|
docker login -u username imagehub.cdc.gov:5989 |
b. create dockerfile with required configuration
c. build docker image locally using Dockerfile with tag which point to nexus repository.
Code Block |
---|
docker build -t imagehub.cdc.gov:5989/helloworld:latest . |
d. Then push the image to nexus repository
Code Block |
---|
docker push imagehub.cdc.gov:5989/helloworld:latest |
Follow the instructions given on the page How to create image stream to use above docker image in openshift ECPaaS environment.