-
Notifications
You must be signed in to change notification settings - Fork 838
/
Dockerfile
31 lines (24 loc) · 982 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
FROM alpine:latest
LABEL maintainer="Kong Core Team <team-core@konghq.com>"
ENV KONG_VERSION 1.0.4
ENV KONG_SHA256 65fd7df61cf526899e0197d78adbc42680a735eea261b2525f4b1d4f82d7503e
RUN adduser -Su 1337 kong \
&& mkdir -p "/usr/local/kong" \
&& apk add --no-cache --virtual .build-deps wget tar ca-certificates \
&& apk add --no-cache libgcc openssl pcre perl tzdata curl libcap su-exec \
&& wget -O kong.tar.gz "https://bintray.com/kong/kong-alpine-tar/download_file?file_path=kong-$KONG_VERSION.apk.tar.gz" \
&& echo "$KONG_SHA256 *kong.tar.gz" | sha256sum -c - \
&& tar -xzf kong.tar.gz -C /tmp \
&& rm -f kong.tar.gz \
&& cp -R /tmp/usr / \
&& rm -rf /tmp/usr \
&& cp -R /tmp/etc / \
&& rm -rf /tmp/etc \
&& apk del .build-deps \
&& chown -R kong:0 /usr/local/kong \
&& chmod -R g=u /usr/local/kong
COPY docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
EXPOSE 8000 8443 8001 8444
STOPSIGNAL SIGTERM
CMD ["kong", "docker-start"]