◂ Previous |
---|
This repo contains the code for an static html demo page behind nginx deployed on local kubernetes cluster.
Here is a quick link that explains the various aspects within kubernetes.
- Docker
- Kubernetes
- macOS Mojave - Version: 10.14.5
- Docker Desktop - Version 2.0.0.3 (31259)
- Kubernetes - Version: 1.10.11
To build the docker image run the following command on the terminal:
docker build -t kubernetes-docker-nginx-static-html-demo:v1 .
To list the created docker images run the command on the terminal:
docker images
Run the following command to spin up the container server:
docker run -d -p 45678:80 nginx-static-html-image:v1
To list all the containers running run this command on the terminal:
docker ps -a
Run the following command to ensure the server is running:
curl localhost:45678
You can also view it in the browser by going to localhost:45678
and the HTML page similar the the one below will show up:
To stop the container that is running use this command
docker stop {container_id}
To delete the container that was created use this command
docker rm {container_id}
To delete the docker image that was created
docker rmi {image_id}
Next ▸ |
---|