Angie Docker Images#

To run Angie in a Docker container, use the images from our registry: docker.angie.software. They are built based on our binary packages and the official base images of several operating systems.

Minimal Images#

  • angie:minimal: version 1.8.0 based on Alpine 3.21.

  • angie:<VERSION>-minimal: specified version based on Alpine 3.21.

These images include only the angie package.

Templated Images#

  • angie:templated: version 1.8.0 based on Alpine 3.21.

  • angie:<VERSION>-templated: specified version based on Alpine 3.21.

These images set the following environment variables:

ENV ANGIE_BINARY="angie"
ENV ANGIE_CONFIG_TEMPLATE="/etc/angie/angie.conf.t"
ENV ANGIE_ERROR_LOG_SEVERITY="notice"
ENV ANGIE_FEATURE_RELOAD="on"
ENV ANGIE_FEATURE_TEMPLATE="on"
ENV ANGIE_LOAD_MODULES=""
ENV ANGIE_PID_FILE="/run/angie/angie.pid"
ENV ANGIE_WORKER_CONNECTIONS="65536"
ENV ANGIE_WORKER_RLIMIT_NOFILE="65536"

These variables can be used to customise the behavior of a container:

  • ANGIE_BINARY: Allows running the debug binary.

  • ANGIE_ERROR_LOG_SEVERITY: Sets the severity level for the top-level error log.

  • ANGIE_LOAD_MODULES: Loads any available module(s) (all modules are included in the image). Specify a comma-separated list of module names without spaces.

  • ANGIE_PID_FILE: Specifies a custom location for the PID file.

  • ANGIE_FEATURE_TEMPLATE: Executes gomplate at container startup with --input-dir /etc/angie/templates and --output-dir /etc/angie set to generate Angie configuration.

  • ANGIE_FEATURE_RELOAD: Enables handling of SIGHUP, SIGQUIT, and SIGTERM signals.

Examples#

The configuration in the templated images uses the variables approximately as follows:

...
{{- if has $modules "zstd"}}
# package: angie-module-zstd
load_module modules/ngx_http_zstd_filter_module.so;
load_module modules/ngx_http_zstd_static_module.so;
{{end}}

user  angie;
worker_processes  auto;
worker_rlimit_nofile {{.Env.ANGIE_WORKER_RLIMIT_NOFILE}};

error_log  /var/log/angie/error.log {{.Env.ANGIE_ERROR_LOG_SEVERITY}};
pid        {{.Env.ANGIE_PID_FILE}};

events {
    worker_connections  {{.Env.ANGIE_WORKER_CONNECTIONS}};
}

http {
    include       /etc/angie/mime.types;
    default_type  application/octet-stream;

    log_format  main  ...

Running a container with shell access:

$ docker run -it --pull always --rm --entrypoint=sh \
  docker.angie.software/angie:templated

Run Angie with custom worker connections and specific modules loaded (the command angie -T will display the complete configuration):

$ docker run -it --rm -e ANGIE_WORKER_CONNECTIONS=4 \
  -e ANGIE_LOAD_MODULES="auth-jwt,vod" \
  docker.angie.software/angie:templated angie -T

Start a container with a custom name and modules loaded:

$ docker run -it --rm --name angie-test \
  -e ANGIE_WORKER_CONNECTIONS=4 \
  -e ANGIE_LOAD_MODULES="auth-jwt,vod" \
  docker.angie.software/angie:templated

Reload the configuration of a running container:

$ docker kill -s HUP angie-test

Images with Extra Modules#

  • angie:latest: version 1.8.0 based on Alpine 3.21.

  • angie:<VERSION>, angie:<VERSION>-alpine: specified version based on Alpine 3.21.

  • angie:<VERSION>-debian: specified version based on Debian 12.

  • angie:<VERSION>-rocky: specified version based on Rocky Linux 9.

  • angie:<VERSION>-ubuntu: specified version based on Ubuntu 24.04 LTS.

These include the following packages (if they were released for the Angie version that the image was built with):

Package List
  • angie-console-light

  • angie-module-auth-jwt

  • angie-module-auth-spnego

  • angie-module-brotli

  • angie-module-cache-purge

  • angie-module-dav-ext

  • angie-module-dynamic-limit-req

  • angie-module-echo

  • angie-module-enhanced-memcached

  • angie-module-eval

  • angie-module-geoip2

  • angie-module-headers-more

  • angie-module-http-auth-radius

  • angie-module-image-filter

  • angie-module-keyval

  • angie-module-lua

  • angie-module-modsecurity

  • angie-module-ndk

  • angie-module-njs

  • angie-module-opentracing

  • angie-module-otel

  • angie-module-perl

  • angie-module-postgres

  • angie-module-redis2

  • angie-module-rtmp

  • angie-module-set-misc

  • angie-module-subs

  • angie-module-testcookie

  • angie-module-upload

  • angie-module-vod

  • angie-module-vts

  • angie-module-wasm

  • angie-module-wasmtime

  • angie-module-xslt

  • angie-module-zip

  • angie-module-zstd

Running#

To start a container with Angie at port 8080, enabling read-only access to the /var/www/ static file directory and the angie.conf file in the current working directory:

$ docker run --rm --name angie -v /var/www:/usr/share/angie/html:ro \
    -v $(pwd)/angie.conf:/etc/angie/angie.conf:ro -p 8080:80 -d docker.angie.software/angie:latest

$ curl -I localhost:8080

    HTTP/1.1 200 OK
    Server: Angie/1.8.0
    Date: Thu, 19 Dec 2024 10:42:54 GMT
    Content-Type: text/html
    Content-Length: 543
    Last-Modified: Thu, 19 Dec 2024 09:12:23 GMT
    Connection: keep-alive
    ETag: "64c3ccc7-21f"
    Accept-Ranges: bytes

Setups like this can be used for local development and configuration.

Customizing Images#

Also, you can build your own image based on a supported distro, adding the Angie layer with packages or source code. A couple of such Dockerfile examples:

Debian, using Angie packages#
FROM debian:12

LABEL org.opencontainers.image.authors="Release Engineering Team <devops@tech.wbsrv.ru>"

ARG DEBIAN_FRONTEND=noninteractive

RUN set -x \
     && apt-get update \
     && apt-get install --no-install-recommends --no-install-suggests -y \
          ca-certificates curl \
     && curl -o /etc/apt/trusted.gpg.d/angie-signing.gpg \
          https://angie.software/keys/angie-signing.gpg \
     && echo "deb https://download.angie.software/angie/$(. /etc/os-release && echo "$ID/$VERSION_ID $VERSION_CODENAME") main" \
          > /etc/apt/sources.list.d/angie.list \
     && apt-get update \
     && apt-get install --no-install-recommends --no-install-suggests -y \
          angie angie-module-geoip2 angie-module-njs \
     && rm -Rf /var/lib/apt/lists \
          /etc/apt/sources.list.d/angie.list \
          /etc/apt/trusted.gpg.d/angie-signing.gpg \
     && ln -sf /dev/stdout /var/log/angie/access.log \
     && ln -sf /dev/stderr /var/log/angie/error.log

EXPOSE 80

CMD ["angie", "-g", "daemon off;"]
Alpine, using Angie packages#
FROM alpine:3.19

LABEL org.opencontainers.image.authors="Release Engineering Team <devops@tech.wbsrv.ru>"

RUN set -x \
     && apk add --no-cache ca-certificates curl \
     && curl -o /etc/apk/keys/angie-signing.rsa https://angie.software/keys/angie-signing.rsa \
     && echo "https://download.angie.software/angie/alpine/v$(egrep -o \
          '[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
     && apk add --no-cache angie angie-module-geoip2 angie-module-njs \
     && rm /etc/apk/keys/angie-signing.rsa \
     && ln -sf /dev/stdout /var/log/angie/access.log \
     && ln -sf /dev/stderr /var/log/angie/error.log

EXPOSE 80

CMD ["angie", "-g", "daemon off;"]

To build a myangie image in the Dockerfile's directory and start a container in the same way as described above:

$ docker build -t myangie .
$ docker run --rm --name myangie -v /var/www:/usr/share/angie/html:ro \
    -v $(pwd)/angie.conf:/etc/angie/angie.conf:ro -p 8080:80 -d myangie