Run Openshift Origin master as a container with proxy

Openshift master can be deployed as a container. In fact, it is the only way to run it on RHEL Atomic host. I deploy the open source version Origin as a container on Atomic host following this guide. When I try to create a new project, it could not download the image from Docker hub. The host does not have direct access to the Internet. I went to the user mailing list and opened a github issue. Thanks to the good guys at Red Hat, the solution is to pass HTTP_PROXY and HTTPS_PROXY environment variables to the Docker run command with -e option.

docker run -d --name "origin" --privileged --pid=host --net=host 
-v /:/rootfs:ro -v /var/run:/var/run:rw -v /sys:/sys 
-v /var/lib/docker:/var/lib/docker:rw 
-v /var/lib/origin/openshift.local.volumes:/var/lib/origin/openshift.local.volumes 
 openshift/origin start

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s