NGINX web/reverse-proxy server in the Docker
container.
- Docker Registry @monstrenyatko/nginx
- GitHub @monstrenyatko/docker-nginx
Container is already configured for automatic restart (See docker-compose.yml
).
-
Configure environment:
-
NGINX_UID
: [OPTIONAL]UID
to be used to run process instead ofdefault
:export NGINX_UID="1000"
-
NGINX_GID
: [OPTIONAL]GID
to be used to run process instead ofdefault
:export NGINX_GID="1000"
-
DOCKER_REGISTRY
: [OPTIONAL] registry prefix to pull image from a customDocker
registry:export DOCKER_REGISTRY="my_registry_hostname:5000/"
-
-
Pull prebuilt
Docker
image:docker-compose pull
-
Start prebuilt image:
docker-compose up -d
-
Verify default configuration:
Open
http://localhost:8000
in web browser. -
Stop/Restart:
docker-compose stop docker-compose start
-
Configuration:
- Create the
conf.d
directory with*.conf
file or files - Add to
docker-compose.yml
thevolumes
section:
nginx: ... volumes: - ./conf.d:/etc/nginx/conf.d:ro
- [OPTIONAL] Override the main configuration file:
nginx: ... volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro
- Create the
-
default
target platform:cd <path to sources> DOCKER_BUILDKIT=1 docker build --tag <tag name> .
-
arm/v6
target platform:cd <path to sources> DOCKER_BUILDKIT=1 docker build --platform=linux/arm/v6 --tag <tag name> .