Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(kong-ee) migrate the private kong-ee repository to here #336

Merged
merged 14 commits into from
Feb 14, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore(refactor) take a stab at moving the logic out of the Dockerfile…
… into build scripts
  • Loading branch information
hutchic committed Feb 13, 2020
commit 01d203f755f26036e80221770e2273a59b0af1b1
23 changes: 6 additions & 17 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,16 @@ ENV BINTRAY_USER $BINTRAY_USER
ARG BINTRAY_KEY
ENV BINTRAY_KEY $BINTRAY_KEY

ARG BUILD_SCRIPT=build-ce.sh
COPY $BUILD_SCRIPT /tmp/build.sh

ARG LOCAL_KONG_PACKAGE=empty-kong.tar.gz
COPY $LOCAL_KONG_PACKAGE kong.tar.gz

RUN set -eux; \
case "${EDITION##*-}" in \
community) \
VERSION='2.0.0'; \
KONG_SHA='5af1178111958b2e325c5b18690f4e7ddf064d28139ff38188b1e2e432ea99ff'; \
URL='https://bintray.com/kong/kong-alpine-tar/download_file?file_path=kong-'$VERSION'.amd64.apk.tar.gz' ;; \
enterprise) \
VERSION='1.3.0.1'; \
KONG_SHA='64a0ceabad26edfdab1173f3485859f14477485023ab6fdd2019fd6893c97bbb'; \
URL='https://kong.bintray.com/kong-enterprise-edition-alpine-tar/kong-enterprise-edition-'$VERSION'.apk.tar.gz' ;; \
local) \
exit 0 ;; \
esac; \
\
RUN if [ "$EDITION" = "local" ] ; then exit 0 ; fi; \
. /tmp/build.sh; \
curl -L -u$BINTRAY_USER:$BINTRAY_KEY "$URL" -o kong.tar.gz; \
echo "${KONG_SHA} kong.tar.gz" | sha256sum -c -
echo "${KONG_SHA}" | sha256sum -c -

RUN mkdir /kong; \
tar -C /kong -xzf kong.tar.gz
Expand All @@ -50,8 +41,6 @@ RUN apk add --no-cache libgcc openssl pcre perl tzdata libcap zip \

USER kong

RUN kong version

COPY docker-entrypoint.sh /docker-entrypoint.sh

ENTRYPOINT ["/docker-entrypoint.sh"]
Expand Down
2 changes: 2 additions & 0 deletions alpine/build-ce.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
KONG_SHA="5af1178111958b2e325c5b18690f4e7ddf064d28139ff38188b1e2e432ea99ff kong.tar.gz"
URL="https://bintray.com/kong/kong-alpine-tar/download_file?file_path=kong-2.0.0.amd64.apk.tar.gz"
2 changes: 2 additions & 0 deletions alpine/build-ee.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
KONG_SHA='64a0ceabad26edfdab1173f3485859f14477485023ab6fdd2019fd6893c97bbb kong.tar.gz'
URL='https://kong.bintray.com/kong-enterprise-edition-alpine-tar/kong-enterprise-edition-1.3.0.1.apk.tar.gz'