Last active
May 4, 2020 07:39
-
-
Save SanthoshBabuMR/f59b86cbecf12ae2f21fa429febddf6c to your computer and use it in GitHub Desktop.
Setup Openshift in Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- get centos image | |
docker pull centos | |
-- run with interactive shell | |
-- docker run -it --name minishift centos /bin/bash: centos has issues with running serivce | |
docker run -it --name minishift phusion/baseimage /bin/bash -- Ubuntu 16.04.3 LTS | |
-- check OS name/version | |
cat /etc/*-release | |
-- if service is unavailable in docker centos | |
yum -y install initscripts && yum clean all | |
-- download minishift | |
curl -L https://github.com/minishift/minishift/releases/download/v1.34.2/minishift-1.34.2-linux-amd64.tgz --output minishift-1.34.2-linux-amd64.tgz | |
-- extract | |
tar zxvf minishift-1.34.2-linux-amd64.tgz | |
cd minishift-1.34.2-linux-amd64 | |
-- make minishift executable | |
chmod +x minishift | |
-- move to local bin dir | |
mv minishift /usr/local/bin/ | |
-- testing | |
minishift | |
-- install kvm | |
apt install libvirt-bin qemu-kvm | |
usermod -a -G libvirtd $(whoami) | |
newgrp libvirtd | |
curl -L https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-ubuntu16.04 -o /usr/local/bin/docker-machine-driver-kvm | |
chmod +x /usr/local/bin/docker-machine-driver-kvm | |
-- install nginx | |
apt-get update | |
apt-get install nginx | |
unlink /etc/nginx/sites-enabled/default | |
cat > /etc/nginx/sites-available/reverse-proxy.conf | |
server { | |
listen 8443; | |
location / { | |
proxy_pass https://192.168.99.103:8443/; | |
} | |
} | |
ln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/reverse-proxy.conf | |
service nginx configtest | |
service nginx restart | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment