-
Notifications
You must be signed in to change notification settings - Fork 2.5k
kong 2.0.1 entrypoint adjustment #7440
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
Merged
Merged
Conversation
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
Member
Diff:diff --git a/kong_alpine/Dockerfile b/kong_alpine/Dockerfile
index d516627..afa42ee 100644
--- a/kong_alpine/Dockerfile
+++ b/kong_alpine/Dockerfile
@@ -7,6 +7,8 @@ ENV KONG_SHA256 170e3f230640cef9e307fd8411287b05a1ba9162b3fc1b53417f199869dcf065
RUN adduser -S kong \
&& mkdir -p "/usr/local/kong" \
+ && chown -R kong:0 /usr/local/kong \
+ && chmod -R g=u /usr/local/kong \
&& apk add --no-cache --virtual .build-deps curl wget tar ca-certificates \
&& apk add --no-cache libgcc openssl pcre perl tzdata libcap su-exec zip \
&& wget -O kong.tar.gz "https://bintray.com/kong/kong-alpine-tar/download_file?file_path=kong-$KONG_VERSION.amd64.apk.tar.gz" \
@@ -16,9 +18,7 @@ RUN adduser -S kong \
&& cp -R /tmp/usr / \
&& rm -rf /tmp/usr \
&& cp -R /tmp/etc / \
- && rm -rf /tmp/etc \
- && chown -R kong:0 /usr/local/kong \
- && chmod -R g=u /usr/local/kong
+ && rm -rf /tmp/etc
USER kong
diff --git a/kong_alpine/docker-entrypoint.sh b/kong_alpine/docker-entrypoint.sh
index 326eef5..7fd6d99 100755
--- a/kong_alpine/docker-entrypoint.sh
+++ b/kong_alpine/docker-entrypoint.sh
@@ -7,7 +7,7 @@ if [[ "$1" == "kong" ]]; then
PREFIX=${KONG_PREFIX:=/usr/local/kong}
if [[ "$2" == "docker-start" ]]; then
- kong prepare -p "$PREFIX"
+ kong prepare -p "$PREFIX" "$@"
ln -sf /dev/stdout $PREFIX/logs/access.log
ln -sf /dev/stdout $PREFIX/logs/admin_access.log
diff --git a/kong_centos/Dockerfile b/kong_centos/Dockerfile
index dcfd322..ce99a77 100644
--- a/kong_centos/Dockerfile
+++ b/kong_centos/Dockerfile
@@ -9,10 +9,10 @@ RUN yum install -y -q unzip \
RUN useradd kong \
&& mkdir -p "/usr/local/kong" \
- && yum install -y https://bintray.com/kong/kong-rpm/download_file?file_path=centos/7/kong-$KONG_VERSION.el7.amd64.rpm \
- && yum clean all \
&& chown -R kong:0 /usr/local/kong \
- && chmod -R g=u /usr/local/kong
+ && chmod -R g=u /usr/local/kong \
+ && yum install -y https://bintray.com/kong/kong-rpm/download_file?file_path=centos/7/kong-$KONG_VERSION.el7.amd64.rpm \
+ && yum clean all
USER kong
diff --git a/kong_centos/docker-entrypoint.sh b/kong_centos/docker-entrypoint.sh
index 326eef5..7fd6d99 100755
--- a/kong_centos/docker-entrypoint.sh
+++ b/kong_centos/docker-entrypoint.sh
@@ -7,7 +7,7 @@ if [[ "$1" == "kong" ]]; then
PREFIX=${KONG_PREFIX:=/usr/local/kong}
if [[ "$2" == "docker-start" ]]; then
- kong prepare -p "$PREFIX"
+ kong prepare -p "$PREFIX" "$@"
ln -sf /dev/stdout $PREFIX/logs/access.log
ln -sf /dev/stdout $PREFIX/logs/admin_access.log
diff --git a/kong_ubuntu/Dockerfile b/kong_ubuntu/Dockerfile
index 76fe0e2..807235b 100644
--- a/kong_ubuntu/Dockerfile
+++ b/kong_ubuntu/Dockerfile
@@ -3,7 +3,11 @@ LABEL maintainer="Kong Core Team <team-core@konghq.com>"
ENV KONG_VERSION 2.0.1
-RUN apt-get update \
+RUN useradd kong \
+ && mkdir -p "/usr/local/kong" \
+ && chown -R kong:0 /usr/local/kong \
+ && chmod -R g=u /usr/local/kong \
+ && apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl perl unzip \
&& rm -rf /var/lib/apt/lists/* \
&& curl -fsSLo kong.deb https://bintray.com/kong/kong-deb/download_file?file_path=kong-${KONG_VERSION}.xenial.$(dpkg --print-architecture).deb \
diff --git a/kong_ubuntu/docker-entrypoint.sh b/kong_ubuntu/docker-entrypoint.sh
index 52c9ca2..974e41c 100755
--- a/kong_ubuntu/docker-entrypoint.sh
+++ b/kong_ubuntu/docker-entrypoint.sh
@@ -7,7 +7,7 @@ if [[ "$1" == "kong" ]]; then
PREFIX=${KONG_PREFIX:=/usr/local/kong}
if [[ "$2" == "docker-start" ]]; then
- kong prepare -p "$PREFIX"
+ kong prepare -p "$PREFIX" "$@"
exec /usr/local/openresty/nginx/sbin/nginx \
-p "$PREFIX" \ |
Member
|
Build test of #7440; 4b381f5; $ bashbrew build kong:2.0.1-alpine
Building bashbrew/cache:d343ee6425c1b40b2e12851ac7f36fe0c6fcc2c46b02331449ea104277c8a06d (kong:2.0.1-alpine)
Tagging kong:2.0.1-alpine
Tagging kong:2.0.1
Tagging kong:2.0
Tagging kong:latest
Tagging kong:alpine
$ test/run.sh kong:2.0.1-alpine
testing kong:2.0.1-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:2.0.1-ubuntu
Building bashbrew/cache:d2e156653e8ad1d294bcb2a19cb6854e7757e19f6a51d07f7b98ab86920717a5 (kong:2.0.1-ubuntu)
Tagging kong:2.0.1-ubuntu
Tagging kong:2.0-ubuntu
Tagging kong:ubuntu
$ test/run.sh kong:2.0.1-ubuntu
testing kong:2.0.1-ubuntu
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:2.0.1-centos
Building bashbrew/cache:133a2d25917a97beeabb0d4dabe527ee08ddbac6fd9caa67c5b3f607c5a552d2 (kong:2.0.1-centos)
Tagging kong:2.0.1-centos
Tagging kong:2.0-centos
Tagging kong:centos
$ test/run.sh kong:2.0.1-centos
testing kong:2.0.1-centos
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...warning: garbage password detected for 'root': 'locked'
passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:1.5.0-alpine
Using bashbrew/cache:a5a846277a9e8b7f3eacd53750cb37eb183a0cbe939dee5bf384a52427d299e1 (kong:1.5.0-alpine)
Tagging kong:1.5.0-alpine
Tagging kong:1.5.0
Tagging kong:1.5
$ test/run.sh kong:1.5.0-alpine
testing kong:1.5.0-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:1.5.0-ubuntu
Using bashbrew/cache:0003b04b77c62f9da9385c46653b5462be0e513b629a9cc7f42dd38d28312ef3 (kong:1.5.0-ubuntu)
Tagging kong:1.5.0-ubuntu
Tagging kong:1.5-ubuntu
$ test/run.sh kong:1.5.0-ubuntu
testing kong:1.5.0-ubuntu
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:1.5.0-centos
Using bashbrew/cache:af91d0a7f0ec922920ec200df51cb77044d73eff1d3c3bdeb4d48a7cb5d6636c (kong:1.5.0-centos)
Tagging kong:1.5.0-centos
Tagging kong:1.5-centos
$ test/run.sh kong:1.5.0-centos
testing kong:1.5.0-centos
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...warning: garbage password detected for 'root': 'locked'
passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:1.4.3-alpine
Using bashbrew/cache:3ec456be7c5ce0ce5776f31bf42ae4c2178a290db4f3c2d3ff31526d893376a7 (kong:1.4.3-alpine)
Tagging kong:1.4.3-alpine
Tagging kong:1.4.3
Tagging kong:1.4
$ test/run.sh kong:1.4.3-alpine
testing kong:1.4.3-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:1.4.3-ubuntu
Using bashbrew/cache:fa036a79e2b55be122b1f06c23cc68b6f34a0e004074c67ab1d78384e65c48e1 (kong:1.4.3-ubuntu)
Tagging kong:1.4.3-ubuntu
Tagging kong:1.4-ubuntu
$ test/run.sh kong:1.4.3-ubuntu
testing kong:1.4.3-ubuntu
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:1.4.3-centos
Using bashbrew/cache:ee28defa8d35573a2833a868c16fcdd02eb1c464d8d6dcd0e2f428fe46c425be (kong:1.4.3-centos)
Tagging kong:1.4.3-centos
Tagging kong:1.4-centos
$ test/run.sh kong:1.4.3-centos
testing kong:1.4.3-centos
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...warning: garbage password detected for 'root': 'locked'
passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:1.3.1-alpine
Using bashbrew/cache:b180180199ea333b8b5d6d978ed168ea5e48c092c971b1f98ebb4dd4ecb2bf37 (kong:1.3.1-alpine)
Tagging kong:1.3.1-alpine
Tagging kong:1.3.1
Tagging kong:1.3
$ test/run.sh kong:1.3.1-alpine
testing kong:1.3.1-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:1.3.1-ubuntu
Using bashbrew/cache:a2cc09141b0a81e882e1eeef6ea77b8e2ad9ed674d016c0b3bded39d41ce0ef8 (kong:1.3.1-ubuntu)
Tagging kong:1.3.1-ubuntu
Tagging kong:1.3-ubuntu
$ test/run.sh kong:1.3.1-ubuntu
testing kong:1.3.1-ubuntu
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:1.3.1-centos
Using bashbrew/cache:a52ab87fb77150752c321e1df3ad89353a5c0e4d3d6d683e0ca33930e6f80bba (kong:1.3.1-centos)
Tagging kong:1.3.1-centos
Tagging kong:1.3-centos
$ test/run.sh kong:1.3.1-centos
testing kong:1.3.1-centos
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...warning: garbage password detected for 'root': 'locked'
passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:1.2.3-alpine
Using bashbrew/cache:db00a017b754e9cce089475f382d42cd824e53e13141ef476fc4875452cfc479 (kong:1.2.3-alpine)
Tagging kong:1.2.3-alpine
Tagging kong:1.2.3
Tagging kong:1.2
$ test/run.sh kong:1.2.3-alpine
testing kong:1.2.3-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:1.2.3-centos
Using bashbrew/cache:c261ca753fa208e75459677fec2264a26f225fce0ffe038e5b9fc3b53670334b (kong:1.2.3-centos)
Tagging kong:1.2.3-centos
Tagging kong:1.2-centos
$ test/run.sh kong:1.2.3-centos
testing kong:1.2.3-centos
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...warning: garbage password detected for 'root': 'locked'
passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:1.1.3-alpine
Using bashbrew/cache:255606734f9e6830f88983cea6ee0bb636bb28d32bf8d0407622c03578304d74 (kong:1.1.3-alpine)
Tagging kong:1.1.3-alpine
Tagging kong:1.1.3
Tagging kong:1.1
$ test/run.sh kong:1.1.3-alpine
testing kong:1.1.3-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:1.1.3-centos
Using bashbrew/cache:b7bf72ee1fe48a2701a69f52f6a0ca3bfe6cb5c33f9c2a0fefa38e622ffc214c (kong:1.1.3-centos)
Tagging kong:1.1.3-centos
Tagging kong:1.1-centos
$ test/run.sh kong:1.1.3-centos
testing kong:1.1.3-centos
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...warning: garbage password detected for 'root': 'locked'
passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:1.0.4-alpine
Using bashbrew/cache:39c2349b87c1527cf55e2088fded815a17decdd372dd1033c9c42a9b277aec8a (kong:1.0.4-alpine)
Tagging kong:1.0.4-alpine
Tagging kong:1.0.4
Tagging kong:1.0
$ test/run.sh kong:1.0.4-alpine
testing kong:1.0.4-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build kong:1.0.4-centos
Using bashbrew/cache:a5f2f9c006ebfc6460c0e3e5da57853519f5e075f8d85c17c75c28d28812a07e (kong:1.0.4-centos)
Tagging kong:1.0.4-centos
Tagging kong:1.0-centos
$ test/run.sh kong:1.0.4-centos
testing kong:1.0.4-centos
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...warning: garbage password detected for 'root': 'locked'
passed
'override-cmd' [4/4]...passed
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
entrypoint change per Kong/docker-kong#332
which closes Kong/docker-kong#317