Tired of seeing "hello nginx" when deploying test containers? Why not use dwarfs?
This repository defines four distinquished webpages with colored dwarfs and docker containers for deployment with nginx.
When deploying contianers, for example to Kubernetes, one often deploys a small webserver "just to see it works". This project provides a playful alternative to the default webpage that says "Welcome to nginx" or "It works!".
The docker images conatain a plain nginx image with the HTML files copied inside. Dockerfiles are present in each of the color-folders. Container images are public at Docker hub:
- Blue dwarf container
smidra/blue-dwarf
- Red dwarf container
smidra/red-dwarf
- Yellow dwarf container
smidra/yellow-dwarf
- Green dwarf container
smidra/green-dwarf
For deployment of the blue dwarf locally use:
docker pull smidra/blue-dwarf
docker run -p 8099:80 --name blue-dwarf smidra/blue-dwarf
The dwarf shall be available at http://localhost:8099
# Deploy resources
kubectl create deployment blue-dwarf --image=smidra/blue-dwarf
kubectl expose deployment blue-dwarf --name=blue-dwarf-svc --type=NodePort --port=80
If deploying with minikube...
# Watch for the assigned XYZ high port
kubectl get services
# Get minikube cluster ip
minikube ip
The dwarf shall be available at http://cluster-ip:XYZ
Add to cluster with kubectl apply -f ...
Blue dwarf service:
apiVersion: v1
kind: Service
metadata:
name: dwarf-svc
spec:
selector:
app: webserver-dwarf
type: NodePort
ports:
- protocol: TCP
port: 80
targetPort: 80
nodePort: 30073
Blue dwarf deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: blue-dwarf
labels:
app: webserver-dwarf
spec:
replicas: 1
selector:
matchLabels:
app: webserver-dwarf
template:
metadata:
labels:
app: webserver-dwarf
spec:
containers:
- name: blue-dwarf
image: smidra/blue-dwarf
ports:
- containerPort: 80
terminationGracePeriodSeconds: 4
The dwarf shall be available at http://cluster-ip:30073
Garden Gnome Clip art by LA is used under the tems of CC BY-NC-SA 3.0
HTML index is based on the bootstrap sign in example
This work is lincensed under the MIT licence, mainly because the Greater Lunduke Lincese is not a real thing.