-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (30 loc) · 940 Bytes
/
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
FROM kong:3.0.0-alpine
USER root
ENV PACKAGES="openssl-devel kernel-headers gcc git openssh" \
LUA_BASE_DIR="/usr/local/share/lua/5.1" \
KONG_PLUGIN_SESSION_VER="2.4.4" \
NGX_DISTRIBUTED_SHM_VER="1.0.7"
RUN set -ex \
&& apk --no-cache add \
libssl1.1 \
openssl \
curl \
wget \
unzip \
tar \
git \
lua5.3 \
luarocks \
&& apk --no-cache add --virtual .build-dependencies \
make \
gcc \
openssl-dev \
&& curl -sL https://raw.githubusercontent.com/grrolland/ngx-distributed-shm/${NGX_DISTRIBUTED_SHM_VER}/lua/dshm.lua > ${LUA_BASE_DIR}/resty/dshm.lua \
&& TPL=${LUA_BASE_DIR}/kong/templates/nginx_kong.lua \
&& mkdir -p /usr/local/kong \
&& chown -R kong:`id -gn kong` /usr/local/kong \
&& setcap 'cap_net_bind_service=+ep' /usr/local/bin/kong \
&& setcap 'cap_net_bind_service=+ep' /usr/local/openresty/nginx/sbin/nginx
RUN luarocks install lunajson
ENV term xterm
RUN apk add --update vim nano