Last active
December 6, 2022 08:22
-
-
Save badri/4c8be4d7e5a9469d05e70d43111cb412 to your computer and use it in GitHub Desktop.
Ubuntu working version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:focal | |
LABEL maintainer="Kong Docker Maintainers <[email protected]> (@team-gateway-bot)" | |
ARG ASSET=ce | |
ENV ASSET $ASSET | |
ARG EE_PORTS | |
COPY kong-enterprise-edition-2.8.2.2.all.deb /tmp/kong.deb | |
ARG KONG_VERSION=2.8.2 | |
ENV KONG_VERSION $KONG_VERSION | |
RUN apt update -y | |
# hadolint ignore=DL3015 | |
RUN apt-get install -y --no-install-recommends curl unzip git \ | |
# Please update the ubuntu install docs if the below line is changed so that | |
# end users can properly install Kong along with its required dependencies | |
# and that our CI does not diverge from our docs. | |
&& apt 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 \ | |
&& if [ "$ASSET" = "ce" ] ; then \ | |
kong version ; \ | |
fi | |
COPY docker-entrypoint.sh /docker-entrypoint.sh | |
## --- Start custom plugin stuff | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt update -y && apt install -y gcc libxml2-dev libxml2 autoconf libtool build-essential | |
# RUN apt install -y gcc make libtool libtool-bin autoconf libxml2-dev | |
RUN mkdir /expat /rocks | |
COPY R_2_5_0.tar.gz /expat | |
# https://luarocks.org/manifests/lunarmodules/luaexpat-1.5.1-1.src.rock | |
COPY luaexpat-1.5.1-1.src.rock /rocks | |
COPY expadom-0.1.0-1.src.rock /rocks | |
COPY luautf8-0.1.5-1.src.rock /rocks | |
COPY luacs-1.0.2-0.src.rock /rocks | |
COPY xmlua-1.2.0-0.src.rock /rocks | |
COPY kong-plugin-e2e-token-verifier-0.1.7-0.all.rock /rocks | |
WORKDIR /expat | |
RUN tar zxf R_2_5_0.tar.gz | |
RUN cd ./libexpat-R_2_5_0/expat && ./buildconf.sh && ./configure --build=$(uname -m)-linux-gnu --enable-static=no --libdir=/usr/local/lib && make install -j 4 | |
WORKDIR /rocks | |
RUN luarocks install luaexpat-1.5.1-1.src.rock | |
RUN luarocks install expadom-0.1.0-1.src.rock | |
RUN luarocks install luautf8-0.1.5-1.src.rock | |
RUN luarocks install luacs-1.0.2-0.src.rock | |
RUN luarocks install xmlua-1.2.0-0.src.rock | |
RUN luarocks install kong-plugin-e2e-token-verifier-0.1.7-0.all.rock | |
## --- End custom plugin stuff | |
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"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment