This repository contains a customized Ubuntu Dockerfile to allow for Openshift Cluster to be installed and configured on it. It also includes Firefox so that you can access the Openshift Cluster GUI in the browser, once you have configured it.
This is aimed for those who are unable to install Openshift locally on their machine!
- Install Docker.
- Install a VNC client like VNC Viewer. You'll need this to use Firefox in the image.
- You need to register an account on the Red Hat Customer Portal. This will be used when the
oc-setup.sh
is run later in the process, you will need to login into Docker via the command-line in order to allow for Openshift to be installed. - Save your username and password, you will need them in the next section.
docker build -t oc-ubuntu .
docker run -itd --privileged oc-ubuntu:latest /usr/sbin/init
docker exec -it --privileged <container id> bash
- Run
./oc-setup.sh
once you're logged in as root in the Docker image. - Run the following commands in sequence:
tar -xzf openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz
cd openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit
cp oc kubectl /usr/local/bin/
oc version
systemctl restart docker
- In a separate tab or window of your command-line client, run
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <container id>
. Save the IP address somewhere, you will need it later when:- you launch the Openshift cluster inside the Docker image
- and, you want to use Firefox from the VNC client