angie docker 镜像试用

主要是试用下官方的docker 镜像

环境准备

  • docker-compose
version: "3"
services:
  angie:
    image: docker.angie.software/angie:1.3.1-rocky
    ports:
      - "80:80"
      - "443:443"

启动&效果

  • 启动
docker-compose up -d
  • 效果

 


默认构建信息

 
Angie version: Angie/1.3.1
built with OpenSSL 3.1.3 19 Sep 2023
TLS SNI support enabled
configure arguments: --prefix=/etc/angie --conf-path=/etc/angie/angie.conf --error-log-path=/var/log/angie/error.log --http-log-path=/var/log/angie/access.log --lock-path=/run/angie/angie.lock --modules-path=/usr/lib/angie/modules --pid-path=/run/angie/angie.pid --sbin-path=/usr/sbin/angie --http-client-body-temp-path=/var/cache/angie/client_temp --http-fastcgi-temp-path=/var/cache/angie/fastcgi_temp --http-proxy-temp-path=/var/cache/angie/proxy_temp --http-scgi-temp-path=/var/cache/angie/scgi_temp --http-uwsgi-temp-path=/var/cache/angie/uwsgi_temp --user=angie --group=angie --with-file-aio --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_v3_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-threads --with-ld-opt='-Wl,--as-needed,-O1,--sort-common -Wl,-z,pack-relative-relocs'

镜像包含的模块(很全了)

ndk_http_module-debug.so                      ngx_http_keyval_module-debug.so
ndk_http_module.so                            ngx_http_keyval_module.so
ngx_http_auth_jwt_module-debug.so             ngx_http_lua_module-debug.so
ngx_http_auth_jwt_module.so                   ngx_http_lua_module.so
ngx_http_auth_spnego_module-debug.so          ngx_http_perl_module-debug.so
ngx_http_auth_spnego_module.so                ngx_http_perl_module.so
ngx_http_brotli_filter_module-debug.so        ngx_http_redis2_module-debug.so
ngx_http_brotli_filter_module.so              ngx_http_redis2_module.so
ngx_http_brotli_static_module-debug.so        ngx_http_set_misc_module-debug.so
ngx_http_brotli_static_module.so              ngx_http_set_misc_module.so
ngx_http_cache_purge_module-debug.so          ngx_http_subs_filter_module-debug.so
ngx_http_cache_purge_module.so                ngx_http_subs_filter_module.so
ngx_http_dav_ext_module-debug.so              ngx_http_upload_module-debug.so
ngx_http_dav_ext_module.so                    ngx_http_upload_module.so
ngx_http_echo_module-debug.so                 ngx_http_vod_module-debug.so
ngx_http_echo_module.so                       ngx_http_vod_module.so
ngx_http_enhanced_memcached_module-debug.so   ngx_http_xslt_filter_module-debug.so
ngx_http_enhanced_memcached_module.so         ngx_http_xslt_filter_module.so
ngx_http_eval_module-debug.so                 ngx_postgres_module-debug.so
ngx_http_eval_module.so                       ngx_postgres_module.so
ngx_http_geoip2_module-debug.so               ngx_rtmp_module-debug.so
ngx_http_geoip2_module.so                     ngx_rtmp_module.so
ngx_http_headers_more_filter_module-debug.so  ngx_stream_geoip2_module-debug.so
ngx_http_headers_more_filter_module.so        ngx_stream_geoip2_module.so
ngx_http_image_filter_module-debug.so         ngx_stream_js_module-debug.so
ngx_http_image_filter_module.so               ngx_stream_js_module.so
ngx_http_js_module-debug.so                   ngx_stream_lua_module-debug.so
ngx_http_js_module.so                         ngx_stream_lua_module.so

参考docker 镜像

因为angie提供了各种操作系统的安装包,自己制作镜像实际上很方便,以下是debian 的,实际上我们也直接基于官方的基础镜像修改

FROM alpine:3.18
 
LABEL maintainer="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;"]

说明

对于一些一些需要多以来模块的nginx 入口服务angie 是一个不错的选择,毕竟都是官方自己构建好的模块,直接可以使用

参考资料

https://angie.software/en/install/#install-docker
https://github.com/webserver-llc/angie

posted on 2023-11-02 16:28  荣锋亮  阅读(54)  评论(0编辑  收藏  举报

导航