-
Notifications
You must be signed in to change notification settings - Fork 532
/
Copy pathDockerfile
47 lines (36 loc) · 1.72 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Dockerfile - alpine-apk
# https://github.com/openresty/docker-openresty
ARG RESTY_IMAGE_BASE="alpine"
ARG RESTY_IMAGE_TAG="3.18"
FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG}
LABEL maintainer="Evan Wies <[email protected]>"
# Docker Build Arguments
ARG RESTY_IMAGE_BASE="alpine"
ARG RESTY_IMAGE_TAG="3.18"
ARG RESTY_APK_KEY_URL="https://openresty.org/package/[email protected]"
ARG RESTY_APK_REPO_URL="https://openresty.org/package/alpine/v${RESTY_IMAGE_TAG}/main"
ARG RESTY_APK_VERSION="=1.27.1.1-r0"
LABEL resty_image_base="${RESTY_IMAGE_BASE}"
LABEL resty_image_tag="${RESTY_IMAGE_TAG}"
LABEL resty_apk_key_url="${RESTY_APK_KEY_URL}"
LABEL resty_apk_repo_url="${RESTY_APK_REPO_URL}"
LABEL resty_apk_version="${RESTY_APK_VERSION}"
RUN wget -O "/etc/apk/keys/$(basename ${RESTY_APK_KEY_URL})" "${RESTY_APK_KEY_URL}" \
&& echo "${RESTY_APK_REPO_URL}" >> /etc/apk/repositories \
&& apk update \
&& apk add --no-cache \
tzdata \
zlib \
&& apk add "openresty${RESTY_APK_VERSION}" \
&& mkdir -p /var/run/openresty \
&& ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \
&& ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log
# Add additional binaries into PATH for convenience
ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
# Copy nginx configuration files
COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf
CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"]
# Use SIGQUIT instead of default SIGTERM to cleanly drain requests
# See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls
STOPSIGNAL SIGQUIT