Custom docker image used for learning custom image building, and used in my Kubernetes Cluster Build
- Docker
- Uses base image
nginx:alpine
- Uses base image
You can find a prebuilt image right here on GitHub at ghcr.io/thequib/nginx-docker:latest
- Or run
docker pull ghcr.io/thequib/nginx-docker:latestto get it now
- Clone the repository
- Run the command
sudo docker build -t webserver:latest .- This will create a container on the local machine called
webserverwith the taglatest - Just as if downloaded from a Docker repository such as Dockerhub
- This will create a container on the local machine called
- Now that the container is built, run the command
sudo docker run -d webserver:latest- This will run the container is 'detached' mode, in the background
- Alternatively, the included
docker-compose.ymlfile can be used if you prefer by runningsudo docker-compose up -d