forked from Kong/docker-kong
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.deb
50 lines (37 loc) · 1.65 KB
/
Dockerfile.deb
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
48
49
50
# When you update this file substantially, please update build_your_own_images.md as well.
FROM debian:bullseye-20220509-slim
LABEL maintainer="Kong Docker Maintainers <[email protected]> (@team-gateway-bot)"
ARG KONG_VERSION=3.0.1
ENV KONG_VERSION $KONG_VERSION
ARG KONG_SHA256="8e978f5f21c7996a889bbadbf25d001cdb2f486470ce61959b79c8d701ccedb4"
ARG ASSET=remote
ARG EE_PORTS
COPY kong.deb /tmp/kong.deb
RUN set -ex; \
apt-get update; \
apt-get install -y curl; \
if [ "$ASSET" = "remote" ] ; then \
CODENAME=$(cat /etc/os-release | grep VERSION_CODENAME | cut -d = -f 2) \
&& DOWNLOAD_URL="https://download.konghq.com/gateway-${KONG_VERSION%%.*}.x-debian-${CODENAME}/pool/all/k/kong/kong_${KONG_VERSION}_amd64.deb" \
&& curl -fL $DOWNLOAD_URL -o /tmp/kong.deb \
&& echo "$KONG_SHA256 /tmp/kong.deb" | sha256sum -c -; \
fi \
&& apt-get update \
&& apt-get install --yes /tmp/kong.deb \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/kong.deb \
&& chown kong:0 /usr/local/bin/kong \
&& chown -R kong:0 /usr/local/kong \
&& ln -s /usr/local/openresty/bin/resty /usr/local/bin/resty \
&& ln -s /usr/local/openresty/luajit/bin/luajit /usr/local/bin/luajit \
&& ln -s /usr/local/openresty/luajit/bin/luajit /usr/local/bin/lua \
&& ln -s /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx \
&& kong version \
&& apt-get purge curl -y
COPY docker-entrypoint.sh /docker-entrypoint.sh
USER kong
ENTRYPOINT ["/docker-entrypoint.sh"]
EXPOSE 8000 8443 8001 8444 $EE_PORTS
STOPSIGNAL SIGQUIT
HEALTHCHECK --interval=10s --timeout=10s --retries=10 CMD kong health
CMD ["kong", "docker-start"]