Files
dockerfiles/nginx

Clear Linux Based Container: Nginx Service

This container provides a nginx web service, which is same as the one from dockerhub in functionality with optimized libraries and secure content from Clear Linux*. It can be executed by docker tool directly or deployed on any docker orchrestration like kubernetes.

Build Container

docker build -t clearlinux/nginx .

Or just pull it from Dockerhub

docker pull clearlinux/nginx

Default build args in Docker are on: https://docs.docker.com/engine/reference/builder/#arg, extra Build ARGs:

  • swupd_args Specifies SWUPD flags

Run with Docker Tool

Quick start container:

docker run -p 80:80 -v /some/content:/var/www/html -d clearlinux/nginx

Note: The default root path is /var/www/html and default configuration path is /etc/nginx/.

See How to use this image section of the official nginx image page.

Deploy on Kubernetes Cluster

This container could be deployed on any kubernetes compatible cloud native cluster such as minikube or CSP's platform. Please refer here to setup minikube.

Following template files as kubernete YAML registries for operator's reference:

Quick deployment for test:

kubectl apply -f nginx-service-deployment-<xxx>.yaml

On minikube cluster, to visit demo web service:

minikube service clear-nginx-service