official-images icon indicating copy to clipboard operation
official-images copied to clipboard

Add official image for KrakenD Api Gateway

Open taik0 opened this issue 3 years ago • 19 comments

Signed-off-by: Daniel Ortiz [email protected]

KrakenD is a stateless Open Source API Gateway built on top of the Lura Framework (formerly KrakenD Framework). To know more about KrakenD, please read our documentation

https://github.com/krakendio/krakend-ce

Checklist for Review

NOTE: This checklist is intended for the use of the Official Images maintainers both to track the status of your PR and to help inform you and others of where we're at. As such, please leave the "checking" of items to the repository maintainers. If there is a point below for which you would like to provide additional information or note completion, please do so by commenting on the PR. Thanks! (and thanks for staying patient with us :heart:)

  • [x] associated with or contacted upstream?
  • [x] available under an OSI-approved license?
    • Apache 2.0: https://github.com/krakendio/krakend-ce/blob/master/LICENSE
  • [x] does it fit into one of the common categories? ("service", "language stack", "base distribution")
  • [ ] is it reasonably popular, or does it solve a particular use case well?
  • [x] does a documentation PR exist? (should be reviewed and merged at roughly the same time so that we don't have an empty image page on the Hub for very long)
  • [ ] official-images maintainer dockerization review for best practices and cache gotchas/improvements (ala the official review guidelines)?
  • [ ] 2+ official-images maintainer dockerization review?
  • [x] existing official images have been considered as a base? (ie, if foobar needs Node.js, has FROM node:... instead of grabbing node via other means been considered?)
  • [ ] ~if FROM scratch, tarballs only exist in a single commit within the associated history?~
  • [ ] passes current tests? any simple new tests that might be appropriate to add? (https://github.com/docker-library/official-images/tree/master/test)

taik0 avatar Nov 25 '22 14:11 taik0

Documentation PR: https://github.com/docker-library/docs/pull/2082

taik0 avatar Nov 25 '22 14:11 taik0

I didn't realize that that repository used the main branch instead of master. I pushed a master branch, so we don't have to change anything on this PR. A re-run should work now.

taik0 avatar Nov 25 '22 21:11 taik0

Hi, there's something in my hand that can be done to unblock this PR?

Thank you!

taik0 avatar Dec 13 '22 11:12 taik0

Hello! :sparkles:

Thanks for your interest in contributing to the official images program. :thought_balloon:

As you may have noticed, we've usually got a pretty decently sized queue of new images (not to mention image updates and maintenance of images under @docker-library which are maintained by the core official images team). As such, it may be some time before we get to reviewing this image (image updates get priority both because users expect them and because reviewing new images is a more involved process than reviewing updates), so we apologize in advance! Please be patient with us -- rest assured, we've seen your PR and it's in the queue. :heart:

We do try to proactively add and update the "new image checklist" on each PR, so if you haven't looked at it yet, that's a good use of time while you wait. :umbrella:

Thanks! :sparkling_heart: :blue_heart: :green_heart: :heart:

yosifkit avatar Jan 10 '23 00:01 yosifkit

Diff for 46c6430b6fff1113a506be3997665542abf1153d:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index bdfae4a..c3c15dd 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1 +1,17 @@
-Maintainers: New Image! :D (@docker-library-bot)
+Maintainers: Daniel Ortiz <[email protected]> (@taik0), Daniel López <[email protected]> (@kpacha)
+GitRepo: https://github.com/krakendio/docker-library.git
+
+Tags: 2.1.3
+Architectures: amd64, arm64v8
+GitCommit: e92521810fa076e0b3ecd78ba02d13c9f62768ed
+Directory: 2.1.3
+
+Tags: 2.1.4, 2.1
+Architectures: amd64, arm64v8
+GitCommit: 937bf688775ba6c10be628f3b87751c6aef9340c
+Directory: 2.1.4
+
+Tags: 2.2.0, 2.2, 2, latest
+Architectures: amd64, arm64v8
+GitCommit: f9974333b47008bb8e60fa818065b1080d5d77b7
+Directory: 2.2.0
diff --git a/_bashbrew-list b/_bashbrew-list
index e69de29..cf733bf 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -0,0 +1,7 @@
+krakend:2
+krakend:2.1
+krakend:2.1.3
+krakend:2.1.4
+krakend:2.2
+krakend:2.2.0
+krakend:latest
diff --git a/_bashbrew-list-build-order b/_bashbrew-list-build-order
index e69de29..7f449c6 100644
--- a/_bashbrew-list-build-order
+++ b/_bashbrew-list-build-order
@@ -0,0 +1,3 @@
+krakend:2.1.3
+krakend:2.1
+krakend:latest
diff --git a/krakend_2.1.3/Dockerfile b/krakend_2.1.3/Dockerfile
new file mode 100644
index 0000000..f18efa0
--- /dev/null
+++ b/krakend_2.1.3/Dockerfile
@@ -0,0 +1,46 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+FROM alpine:3.16
+
+LABEL maintainer="[email protected]"
+
+WORKDIR /
+
+RUN apk add --no-cache --virtual .build-deps gnupg
+RUN set -eux; \
+    arch="$(apk --print-arch)"; \
+	case "$arch" in \
+		'x86_64') \
+			export GOARCH='amd64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=a3e350bf7627ece93e6a299d7ffea83c48cc41bad5013b772fc8d6c6bc113d397d29e8e5572c57c3edf38439940165219146912889bf12ba36d1a4abe20e6ed1; \
+			;; \
+		'aarch64') \
+			export GOARCH='arm64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=630a462aa0b7050d28efcd7863d92592035558ad585d7c8da6809ccdb135764fce860b60cd6aad72f55182faf9298827a3cd078111e92bdaa7e35ded8f67b317; \
+			;; \
+		*) echo >&2 "error: unsupported architecture '$TARGETARCH' (likely packaging update needed)"; exit 1 ;; \
+	esac; \
+    wget -O krakend.tar.gz "https://github.com/krakendio/krakend-ce/releases/download/v2.1.3/krakend_2.1.3_${GOARCH}_alpine.tar.gz"; \
+    wget -O krakend.tar.gz.asc "https://github.com/krakendio/krakend-ce/releases/download/v2.1.3/krakend_2.1.3_${GOARCH}_alpine.tar.gz.asc"; \
+    export GNUPGHOME="$(mktemp -d)"; \
+    gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5B270F2E01E375FD9D5635E25DE6FD698AD6FDD2; \
+    gpg --batch --verify krakend.tar.gz.asc krakend.tar.gz; \
+    tar xzf krakend.tar.gz -C / --strip-components 1; \
+	echo "$KRAKEND_DOWNLOAD_SHA512 *krakend.tar.gz" | sha512sum -c; \
+	rm -f krakend.tar.gz krakend.tar.gz.asc; \
+	apk del --no-network .build-deps
+
+RUN apk add --no-cache --virtual .run-deps ca-certificates su-exec tzdata && \
+	adduser -u 1000 -S -D -H krakend && \
+	echo '{ "version": 3 }' > /etc/krakend/krakend.json
+
+WORKDIR /etc/krakend
+
+COPY docker-entrypoint.sh /
+ENTRYPOINT [ "/docker-entrypoint.sh" ]
+
+EXPOSE 8080 8090
+CMD [ "krakend", "run", "-c", "/etc/krakend/krakend.json" ]
diff --git a/krakend_2.1.3/docker-entrypoint.sh b/krakend_2.1.3/docker-entrypoint.sh
new file mode 100755
index 0000000..fa802f0
--- /dev/null
+++ b/krakend_2.1.3/docker-entrypoint.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+set -e
+
+commandRun="run"
+commandVersion="version"
+commandCheck="check"
+commandPlugin="check-plugin"
+commandHelp="help"
+commandValidate="validate"
+
+# this if will check if the first argument is a flag
+# but only works if all arguments require a hyphenated flag
+# -v; -SL; -f arg; Also check if the first argument is any
+# of the KrakenD commands
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] ||
+   [ "$1" = "${commandRun}" ] || 
+   [ "$1" = "${commandVersion}" ] || 
+   [ "$1" = "${commandCheck}" ] || 
+   [ "$1" = "${commandPlugin}" ] ||
+   [ "$1" = "${commandValidate}" ] ||
+   [ "$1" = "${commandHelp}" ]; then
+    set -- krakend "$@"
+fi
+
+# check for the expected command
+if [ "$1" = 'krakend' ]; then
+    # use gosu (or su-exec) to drop to a non-root user
+    exec su-exec krakend "$@"
+fi
+
+# else default to run whatever the user wanted like "bash" or "sh"
+exec "$@"
diff --git a/krakend_2.1/Dockerfile b/krakend_2.1/Dockerfile
new file mode 100644
index 0000000..545e929
--- /dev/null
+++ b/krakend_2.1/Dockerfile
@@ -0,0 +1,46 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+FROM alpine:3.17
+
+LABEL maintainer="[email protected]"
+
+WORKDIR /
+
+RUN apk add --no-cache --virtual .build-deps gnupg
+RUN set -eux; \
+    arch="$(apk --print-arch)"; \
+	case "$arch" in \
+		'x86_64') \
+			export GOARCH='amd64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=b890db5172b6a9add480291f233bff01e678323bd49d638dbdaa8fe02bf512307c62e39841f3b0736ff44eab6ee070a7724f03fe385f67a47b11fbd81a3bd039; \
+			;; \
+		'aarch64') \
+			export GOARCH='arm64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=a6b1dc5127c4a13cf64d98e5e85ec7febf2b6fc1c3d131dd77398caa37de4eac2ca7c28771333e6b9eb635ace2e4dc7cc979f3890acbcd62b277f551e6bc7834; \
+			;; \
+		*) echo >&2 "error: unsupported architecture '$TARGETARCH' (likely packaging update needed)"; exit 1 ;; \
+	esac; \
+    wget -O krakend.tar.gz "https://github.com/krakendio/krakend-ce/releases/download/v2.1.4/krakend_2.1.4_${GOARCH}_alpine.tar.gz"; \
+    wget -O krakend.tar.gz.asc "https://github.com/krakendio/krakend-ce/releases/download/v2.1.4/krakend_2.1.4_${GOARCH}_alpine.tar.gz.asc"; \
+    export GNUPGHOME="$(mktemp -d)"; \
+    gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5B270F2E01E375FD9D5635E25DE6FD698AD6FDD2; \
+    gpg --batch --verify krakend.tar.gz.asc krakend.tar.gz; \
+    tar xzf krakend.tar.gz -C / --strip-components 1; \
+	echo "$KRAKEND_DOWNLOAD_SHA512 *krakend.tar.gz" | sha512sum -c; \
+	rm -f krakend.tar.gz krakend.tar.gz.asc; \
+	apk del --no-network .build-deps
+
+RUN apk add --no-cache --virtual .run-deps ca-certificates su-exec tzdata && \
+	adduser -u 1000 -S -D -H krakend && \
+	echo '{ "version": 3 }' > /etc/krakend/krakend.json
+
+WORKDIR /etc/krakend
+
+COPY docker-entrypoint.sh /
+ENTRYPOINT [ "/docker-entrypoint.sh" ]
+
+EXPOSE 8080 8090
+CMD [ "krakend", "run", "-c", "/etc/krakend/krakend.json" ]
diff --git a/krakend_2.1/docker-entrypoint.sh b/krakend_2.1/docker-entrypoint.sh
new file mode 100755
index 0000000..fa802f0
--- /dev/null
+++ b/krakend_2.1/docker-entrypoint.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+set -e
+
+commandRun="run"
+commandVersion="version"
+commandCheck="check"
+commandPlugin="check-plugin"
+commandHelp="help"
+commandValidate="validate"
+
+# this if will check if the first argument is a flag
+# but only works if all arguments require a hyphenated flag
+# -v; -SL; -f arg; Also check if the first argument is any
+# of the KrakenD commands
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] ||
+   [ "$1" = "${commandRun}" ] || 
+   [ "$1" = "${commandVersion}" ] || 
+   [ "$1" = "${commandCheck}" ] || 
+   [ "$1" = "${commandPlugin}" ] ||
+   [ "$1" = "${commandValidate}" ] ||
+   [ "$1" = "${commandHelp}" ]; then
+    set -- krakend "$@"
+fi
+
+# check for the expected command
+if [ "$1" = 'krakend' ]; then
+    # use gosu (or su-exec) to drop to a non-root user
+    exec su-exec krakend "$@"
+fi
+
+# else default to run whatever the user wanted like "bash" or "sh"
+exec "$@"
diff --git a/krakend_latest/Dockerfile b/krakend_latest/Dockerfile
new file mode 100644
index 0000000..50cf1c7
--- /dev/null
+++ b/krakend_latest/Dockerfile
@@ -0,0 +1,46 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+FROM alpine:3.17
+
+LABEL maintainer="[email protected]"
+
+WORKDIR /
+
+RUN apk add --no-cache --virtual .build-deps gnupg
+RUN set -eux; \
+    arch="$(apk --print-arch)"; \
+	case "$arch" in \
+		'x86_64') \
+			export GOARCH='amd64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=c0e585aec91adacfc9d16f06307705874e12ee4b7177140c46b71e705db708e785a392c937437bf59baa7a836d4a95ec8c53072c74dcb2f06f54d232e91ba8b3; \
+			;; \
+		'aarch64') \
+			export GOARCH='arm64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=9d6ebd5514366a030f53b2c01c8e1860bf17ee88eeae276ca829f24482bb7d0bfde870f66feab35090dbbceb057ed6d29fc00dea1e3355e3779b80e1c2a4e23f; \
+			;; \
+		*) echo >&2 "error: unsupported architecture '$TARGETARCH' (likely packaging update needed)"; exit 1 ;; \
+	esac; \
+    wget -O krakend.tar.gz "https://github.com/krakendio/krakend-ce/releases/download/v2.2.0/krakend_2.2.0_${GOARCH}_alpine.tar.gz"; \
+    wget -O krakend.tar.gz.asc "https://github.com/krakendio/krakend-ce/releases/download/v2.2.0/krakend_2.2.0_${GOARCH}_alpine.tar.gz.asc"; \
+    export GNUPGHOME="$(mktemp -d)"; \
+    gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5B270F2E01E375FD9D5635E25DE6FD698AD6FDD2; \
+    gpg --batch --verify krakend.tar.gz.asc krakend.tar.gz; \
+    tar xzf krakend.tar.gz -C / --strip-components 1; \
+	echo "$KRAKEND_DOWNLOAD_SHA512 *krakend.tar.gz" | sha512sum -c; \
+	rm -f krakend.tar.gz krakend.tar.gz.asc; \
+	apk del --no-network .build-deps
+
+RUN apk add --no-cache --virtual .run-deps ca-certificates su-exec tzdata && \
+	adduser -u 1000 -S -D -H krakend && \
+	echo '{ "version": 3 }' > /etc/krakend/krakend.json
+
+WORKDIR /etc/krakend
+
+COPY docker-entrypoint.sh /
+ENTRYPOINT [ "/docker-entrypoint.sh" ]
+
+EXPOSE 8080 8090
+CMD [ "krakend", "run", "-c", "/etc/krakend/krakend.json" ]
diff --git a/krakend_latest/docker-entrypoint.sh b/krakend_latest/docker-entrypoint.sh
new file mode 100755
index 0000000..a1612b8
--- /dev/null
+++ b/krakend_latest/docker-entrypoint.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+set -e
+
+commandRun="run"
+commandVersion="version"
+commandCheck="check"
+commandPlugin="check-plugin"
+commandHelp="help"
+commandValidate="validate"
+commandAudit="audit"
+
+# this if will check if the first argument is a flag
+# but only works if all arguments require a hyphenated flag
+# -v; -SL; -f arg; Also check if the first argument is any
+# of the KrakenD commands
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] ||
+   [ "$1" = "${commandRun}" ] || 
+   [ "$1" = "${commandVersion}" ] || 
+   [ "$1" = "${commandCheck}" ] || 
+   [ "$1" = "${commandPlugin}" ] ||
+   [ "$1" = "${commandValidate}" ] ||
+   [ "$1" = "${commandAudit}" ] ||
+   [ "$1" = "${commandHelp}" ]; then
+    set -- krakend "$@"
+fi
+
+# check for the expected command
+if [ "$1" = 'krakend' ]; then
+    # use gosu (or su-exec) to drop to a non-root user
+    exec su-exec krakend "$@"
+fi
+
+# else default to run whatever the user wanted like "bash" or "sh"
+exec "$@"

github-actions[bot] avatar Feb 03 '23 13:02 github-actions[bot]

Diff for 2c409d578a4b92f1776f0ad4941d3487c02a4ceb:
diff --git a/_bashbrew-arches b/_bashbrew-arches
index 8b13789..e85a97f 100644
--- a/_bashbrew-arches
+++ b/_bashbrew-arches
@@ -1 +1,2 @@
-
+amd64
+arm64v8
diff --git a/_bashbrew-cat b/_bashbrew-cat
index bdfae4a..8cb3985 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1 +1,17 @@
-Maintainers: New Image! :D (@docker-library-bot)
+Maintainers: Daniel Ortiz <[email protected]> (@taik0), Daniel López <[email protected]> (@kpacha)
+GitRepo: https://github.com/krakendio/docker-library.git
+
+Tags: 2.1.4, 2.1
+Architectures: amd64, arm64v8
+GitCommit: 937bf688775ba6c10be628f3b87751c6aef9340c
+Directory: 2.1.4
+
+Tags: 2.2.0
+Architectures: amd64, arm64v8
+GitCommit: f9974333b47008bb8e60fa818065b1080d5d77b7
+Directory: 2.2.0
+
+Tags: 2.2.1, 2.2, 2, latest
+Architectures: amd64, arm64v8
+GitCommit: cd1bec37f1606a7d1609dda7d99f2ed0f4433dbe
+Directory: 2.2.1
diff --git a/_bashbrew-list b/_bashbrew-list
index e69de29..e5b0946 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -0,0 +1,7 @@
+krakend:2
+krakend:2.1
+krakend:2.1.4
+krakend:2.2
+krakend:2.2.0
+krakend:2.2.1
+krakend:latest
diff --git a/_bashbrew-list-build-order b/_bashbrew-list-build-order
index e69de29..9acd283 100644
--- a/_bashbrew-list-build-order
+++ b/_bashbrew-list-build-order
@@ -0,0 +1,3 @@
+krakend:2.1
+krakend:2.2.0
+krakend:latest
diff --git a/krakend_2.1/Dockerfile b/krakend_2.1/Dockerfile
new file mode 100644
index 0000000..545e929
--- /dev/null
+++ b/krakend_2.1/Dockerfile
@@ -0,0 +1,46 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+FROM alpine:3.17
+
+LABEL maintainer="[email protected]"
+
+WORKDIR /
+
+RUN apk add --no-cache --virtual .build-deps gnupg
+RUN set -eux; \
+    arch="$(apk --print-arch)"; \
+	case "$arch" in \
+		'x86_64') \
+			export GOARCH='amd64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=b890db5172b6a9add480291f233bff01e678323bd49d638dbdaa8fe02bf512307c62e39841f3b0736ff44eab6ee070a7724f03fe385f67a47b11fbd81a3bd039; \
+			;; \
+		'aarch64') \
+			export GOARCH='arm64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=a6b1dc5127c4a13cf64d98e5e85ec7febf2b6fc1c3d131dd77398caa37de4eac2ca7c28771333e6b9eb635ace2e4dc7cc979f3890acbcd62b277f551e6bc7834; \
+			;; \
+		*) echo >&2 "error: unsupported architecture '$TARGETARCH' (likely packaging update needed)"; exit 1 ;; \
+	esac; \
+    wget -O krakend.tar.gz "https://github.com/krakendio/krakend-ce/releases/download/v2.1.4/krakend_2.1.4_${GOARCH}_alpine.tar.gz"; \
+    wget -O krakend.tar.gz.asc "https://github.com/krakendio/krakend-ce/releases/download/v2.1.4/krakend_2.1.4_${GOARCH}_alpine.tar.gz.asc"; \
+    export GNUPGHOME="$(mktemp -d)"; \
+    gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5B270F2E01E375FD9D5635E25DE6FD698AD6FDD2; \
+    gpg --batch --verify krakend.tar.gz.asc krakend.tar.gz; \
+    tar xzf krakend.tar.gz -C / --strip-components 1; \
+	echo "$KRAKEND_DOWNLOAD_SHA512 *krakend.tar.gz" | sha512sum -c; \
+	rm -f krakend.tar.gz krakend.tar.gz.asc; \
+	apk del --no-network .build-deps
+
+RUN apk add --no-cache --virtual .run-deps ca-certificates su-exec tzdata && \
+	adduser -u 1000 -S -D -H krakend && \
+	echo '{ "version": 3 }' > /etc/krakend/krakend.json
+
+WORKDIR /etc/krakend
+
+COPY docker-entrypoint.sh /
+ENTRYPOINT [ "/docker-entrypoint.sh" ]
+
+EXPOSE 8080 8090
+CMD [ "krakend", "run", "-c", "/etc/krakend/krakend.json" ]
diff --git a/krakend_2.1/docker-entrypoint.sh b/krakend_2.1/docker-entrypoint.sh
new file mode 100755
index 0000000..fa802f0
--- /dev/null
+++ b/krakend_2.1/docker-entrypoint.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+set -e
+
+commandRun="run"
+commandVersion="version"
+commandCheck="check"
+commandPlugin="check-plugin"
+commandHelp="help"
+commandValidate="validate"
+
+# this if will check if the first argument is a flag
+# but only works if all arguments require a hyphenated flag
+# -v; -SL; -f arg; Also check if the first argument is any
+# of the KrakenD commands
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] ||
+   [ "$1" = "${commandRun}" ] || 
+   [ "$1" = "${commandVersion}" ] || 
+   [ "$1" = "${commandCheck}" ] || 
+   [ "$1" = "${commandPlugin}" ] ||
+   [ "$1" = "${commandValidate}" ] ||
+   [ "$1" = "${commandHelp}" ]; then
+    set -- krakend "$@"
+fi
+
+# check for the expected command
+if [ "$1" = 'krakend' ]; then
+    # use gosu (or su-exec) to drop to a non-root user
+    exec su-exec krakend "$@"
+fi
+
+# else default to run whatever the user wanted like "bash" or "sh"
+exec "$@"
diff --git a/krakend_2.2.0/Dockerfile b/krakend_2.2.0/Dockerfile
new file mode 100644
index 0000000..50cf1c7
--- /dev/null
+++ b/krakend_2.2.0/Dockerfile
@@ -0,0 +1,46 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+FROM alpine:3.17
+
+LABEL maintainer="[email protected]"
+
+WORKDIR /
+
+RUN apk add --no-cache --virtual .build-deps gnupg
+RUN set -eux; \
+    arch="$(apk --print-arch)"; \
+	case "$arch" in \
+		'x86_64') \
+			export GOARCH='amd64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=c0e585aec91adacfc9d16f06307705874e12ee4b7177140c46b71e705db708e785a392c937437bf59baa7a836d4a95ec8c53072c74dcb2f06f54d232e91ba8b3; \
+			;; \
+		'aarch64') \
+			export GOARCH='arm64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=9d6ebd5514366a030f53b2c01c8e1860bf17ee88eeae276ca829f24482bb7d0bfde870f66feab35090dbbceb057ed6d29fc00dea1e3355e3779b80e1c2a4e23f; \
+			;; \
+		*) echo >&2 "error: unsupported architecture '$TARGETARCH' (likely packaging update needed)"; exit 1 ;; \
+	esac; \
+    wget -O krakend.tar.gz "https://github.com/krakendio/krakend-ce/releases/download/v2.2.0/krakend_2.2.0_${GOARCH}_alpine.tar.gz"; \
+    wget -O krakend.tar.gz.asc "https://github.com/krakendio/krakend-ce/releases/download/v2.2.0/krakend_2.2.0_${GOARCH}_alpine.tar.gz.asc"; \
+    export GNUPGHOME="$(mktemp -d)"; \
+    gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5B270F2E01E375FD9D5635E25DE6FD698AD6FDD2; \
+    gpg --batch --verify krakend.tar.gz.asc krakend.tar.gz; \
+    tar xzf krakend.tar.gz -C / --strip-components 1; \
+	echo "$KRAKEND_DOWNLOAD_SHA512 *krakend.tar.gz" | sha512sum -c; \
+	rm -f krakend.tar.gz krakend.tar.gz.asc; \
+	apk del --no-network .build-deps
+
+RUN apk add --no-cache --virtual .run-deps ca-certificates su-exec tzdata && \
+	adduser -u 1000 -S -D -H krakend && \
+	echo '{ "version": 3 }' > /etc/krakend/krakend.json
+
+WORKDIR /etc/krakend
+
+COPY docker-entrypoint.sh /
+ENTRYPOINT [ "/docker-entrypoint.sh" ]
+
+EXPOSE 8080 8090
+CMD [ "krakend", "run", "-c", "/etc/krakend/krakend.json" ]
diff --git a/krakend_2.2.0/docker-entrypoint.sh b/krakend_2.2.0/docker-entrypoint.sh
new file mode 100755
index 0000000..a1612b8
--- /dev/null
+++ b/krakend_2.2.0/docker-entrypoint.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+set -e
+
+commandRun="run"
+commandVersion="version"
+commandCheck="check"
+commandPlugin="check-plugin"
+commandHelp="help"
+commandValidate="validate"
+commandAudit="audit"
+
+# this if will check if the first argument is a flag
+# but only works if all arguments require a hyphenated flag
+# -v; -SL; -f arg; Also check if the first argument is any
+# of the KrakenD commands
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] ||
+   [ "$1" = "${commandRun}" ] || 
+   [ "$1" = "${commandVersion}" ] || 
+   [ "$1" = "${commandCheck}" ] || 
+   [ "$1" = "${commandPlugin}" ] ||
+   [ "$1" = "${commandValidate}" ] ||
+   [ "$1" = "${commandAudit}" ] ||
+   [ "$1" = "${commandHelp}" ]; then
+    set -- krakend "$@"
+fi
+
+# check for the expected command
+if [ "$1" = 'krakend' ]; then
+    # use gosu (or su-exec) to drop to a non-root user
+    exec su-exec krakend "$@"
+fi
+
+# else default to run whatever the user wanted like "bash" or "sh"
+exec "$@"
diff --git a/krakend_latest/Dockerfile b/krakend_latest/Dockerfile
new file mode 100644
index 0000000..fb97bab
--- /dev/null
+++ b/krakend_latest/Dockerfile
@@ -0,0 +1,46 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+FROM alpine:3.17
+
+LABEL maintainer="[email protected]"
+
+WORKDIR /
+
+RUN apk add --no-cache --virtual .build-deps gnupg
+RUN set -eux; \
+    arch="$(apk --print-arch)"; \
+	case "$arch" in \
+		'x86_64') \
+			export GOARCH='amd64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=5271ce3c9c28712261b4f3f161578a5eff5c0876448b5594ce02d860bc0b55dbb7c6eb9530b552c13c269aaa64c48fedb95bf5f9646aa3be7515406d33d913bb; \
+			;; \
+		'aarch64') \
+			export GOARCH='arm64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=7e329d4db6c6c1aaa2812a2fc6c796880245a492692d7b26603de39c196165b2e000fb19313643b2431db2fb870c9ede1aa9d6d559619384e2888721524dfa22; \
+			;; \
+		*) echo >&2 "error: unsupported architecture '$TARGETARCH' (likely packaging update needed)"; exit 1 ;; \
+	esac; \
+    wget -O krakend.tar.gz "https://github.com/krakendio/krakend-ce/releases/download/v2.2.1/krakend_2.2.1_${GOARCH}_alpine.tar.gz"; \
+    wget -O krakend.tar.gz.asc "https://github.com/krakendio/krakend-ce/releases/download/v2.2.1/krakend_2.2.1_${GOARCH}_alpine.tar.gz.asc"; \
+    export GNUPGHOME="$(mktemp -d)"; \
+    gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5B270F2E01E375FD9D5635E25DE6FD698AD6FDD2; \
+    gpg --batch --verify krakend.tar.gz.asc krakend.tar.gz; \
+    tar xzf krakend.tar.gz -C / --strip-components 1; \
+	echo "$KRAKEND_DOWNLOAD_SHA512 *krakend.tar.gz" | sha512sum -c; \
+	rm -f krakend.tar.gz krakend.tar.gz.asc; \
+	apk del --no-network .build-deps
+
+RUN apk add --no-cache --virtual .run-deps ca-certificates su-exec tzdata && \
+	adduser -u 1000 -S -D -H krakend && \
+	echo '{ "version": 3 }' > /etc/krakend/krakend.json
+
+WORKDIR /etc/krakend
+
+COPY docker-entrypoint.sh /
+ENTRYPOINT [ "/docker-entrypoint.sh" ]
+
+EXPOSE 8080 8090
+CMD [ "krakend", "run", "-c", "/etc/krakend/krakend.json" ]
diff --git a/krakend_latest/docker-entrypoint.sh b/krakend_latest/docker-entrypoint.sh
new file mode 100755
index 0000000..a1612b8
--- /dev/null
+++ b/krakend_latest/docker-entrypoint.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+set -e
+
+commandRun="run"
+commandVersion="version"
+commandCheck="check"
+commandPlugin="check-plugin"
+commandHelp="help"
+commandValidate="validate"
+commandAudit="audit"
+
+# this if will check if the first argument is a flag
+# but only works if all arguments require a hyphenated flag
+# -v; -SL; -f arg; Also check if the first argument is any
+# of the KrakenD commands
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] ||
+   [ "$1" = "${commandRun}" ] || 
+   [ "$1" = "${commandVersion}" ] || 
+   [ "$1" = "${commandCheck}" ] || 
+   [ "$1" = "${commandPlugin}" ] ||
+   [ "$1" = "${commandValidate}" ] ||
+   [ "$1" = "${commandAudit}" ] ||
+   [ "$1" = "${commandHelp}" ]; then
+    set -- krakend "$@"
+fi
+
+# check for the expected command
+if [ "$1" = 'krakend' ]; then
+    # use gosu (or su-exec) to drop to a non-root user
+    exec su-exec krakend "$@"
+fi
+
+# else default to run whatever the user wanted like "bash" or "sh"
+exec "$@"

github-actions[bot] avatar Feb 27 '23 12:02 github-actions[bot]

Hey folks! As a krakend user we'd really benefit from getting this PR accepted. The project is growing fast and this would be very beneficial not only for the project itself but for the community that's growing around it.

JAORMX avatar Mar 14 '23 09:03 JAORMX

Diff for 1fc4529520ddbdc0cac61bcbb99ba4710cd8b938:
diff --git a/_bashbrew-arches b/_bashbrew-arches
index 8b13789..e85a97f 100644
--- a/_bashbrew-arches
+++ b/_bashbrew-arches
@@ -1 +1,2 @@
-
+amd64
+arm64v8
diff --git a/_bashbrew-cat b/_bashbrew-cat
index bdfae4a..18d636d 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1 +1,12 @@
-Maintainers: New Image! :D (@docker-library-bot)
+Maintainers: Daniel Ortiz <[email protected]> (@taik0), Daniel López <[email protected]> (@kpacha)
+GitRepo: https://github.com/krakendio/docker-library.git
+
+Tags: 2.3.3
+Architectures: amd64, arm64v8
+GitCommit: 4380c98d0b4d3ea3c14ff26c87b99f40f03cb6a0
+Directory: 2.3.3
+
+Tags: 2.4.0, 2.4, 2, latest
+Architectures: amd64, arm64v8
+GitCommit: 4380c98d0b4d3ea3c14ff26c87b99f40f03cb6a0
+Directory: 2.4.0
diff --git a/_bashbrew-list b/_bashbrew-list
index e69de29..8eb9b2a 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -0,0 +1,5 @@
+krakend:2
+krakend:2.3.3
+krakend:2.4
+krakend:2.4.0
+krakend:latest
diff --git a/_bashbrew-list-build-order b/_bashbrew-list-build-order
index e69de29..bf995b6 100644
--- a/_bashbrew-list-build-order
+++ b/_bashbrew-list-build-order
@@ -0,0 +1,2 @@
+krakend:2.3.3
+krakend:latest
diff --git a/krakend_2.3.3/Dockerfile b/krakend_2.3.3/Dockerfile
new file mode 100644
index 0000000..b9d3d6a
--- /dev/null
+++ b/krakend_2.3.3/Dockerfile
@@ -0,0 +1,46 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+FROM alpine:3.18
+
+LABEL maintainer="[email protected]"
+
+WORKDIR /
+
+RUN apk add --no-cache --virtual .build-deps gnupg
+RUN set -eux; \
+    arch="$(apk --print-arch)"; \
+	case "$arch" in \
+		'x86_64') \
+			export GOARCH='amd64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=018f902d19068f289ab3b2abd9f153911b4a6f8792cd215ee7c4a52d8f674728d7d516e868f1cc6d8e946035f5f7b3f4fa5ac6aa99688af117662a5c33702910; \
+			;; \
+		'aarch64') \
+			export GOARCH='arm64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=ac4de90ae59a4b7ad8e494d40239caeda4e03c27e978e75a3e06c2599abe60fafcb6585610e2debdfc98194d12b115913d2101bfeb4fc31a59a953d8975bd69a; \
+			;; \
+		*) echo >&2 "error: unsupported architecture '$TARGETARCH' (likely packaging update needed)"; exit 1 ;; \
+	esac; \
+    wget -O krakend.tar.gz "https://github.com/krakendio/krakend-ce/releases/download/v2.3.3/krakend_2.3.3_${GOARCH}_alpine.tar.gz"; \
+    wget -O krakend.tar.gz.asc "https://github.com/krakendio/krakend-ce/releases/download/v2.3.3/krakend_2.3.3_${GOARCH}_alpine.tar.gz.asc"; \
+    export GNUPGHOME="$(mktemp -d)"; \
+    gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5B270F2E01E375FD9D5635E25DE6FD698AD6FDD2; \
+    gpg --batch --verify krakend.tar.gz.asc krakend.tar.gz; \
+    tar xzf krakend.tar.gz -C / --strip-components 1; \
+	echo "$KRAKEND_DOWNLOAD_SHA512 *krakend.tar.gz" | sha512sum -c; \
+	rm -f krakend.tar.gz krakend.tar.gz.asc; \
+	apk del --no-network .build-deps
+
+RUN apk add --no-cache --virtual .run-deps ca-certificates su-exec tzdata && \
+	adduser -u 1000 -S -D -H krakend && \
+	echo '{ "version": 3 }' > /etc/krakend/krakend.json
+
+WORKDIR /etc/krakend
+
+COPY docker-entrypoint.sh /
+ENTRYPOINT [ "/docker-entrypoint.sh" ]
+
+EXPOSE 8080 8090
+CMD [ "krakend", "run", "-c", "/etc/krakend/krakend.json" ]
diff --git a/krakend_2.3.3/docker-entrypoint.sh b/krakend_2.3.3/docker-entrypoint.sh
new file mode 100755
index 0000000..2b9c5c2
--- /dev/null
+++ b/krakend_2.3.3/docker-entrypoint.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+set -e
+
+commandRun="run"
+commandVersion="version"
+commandCheck="check"
+commandPlugin="check-plugin"
+commandHelp="help"
+commandValidate="validate"
+commandAudit="audit"
+
+# this if will check if the first argument is a flag
+# but only works if all arguments require a hyphenated flag
+# -v; -SL; -f arg; Also check if the first argument is any
+# of the KrakenD commands
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] ||
+   [ "$1" = "${commandRun}" ] || 
+   [ "$1" = "${commandVersion}" ] || 
+   [ "$1" = "${commandCheck}" ] || 
+   [ "$1" = "${commandPlugin}" ] ||
+   [ "$1" = "${commandValidate}" ] ||
+   [ "$1" = "${commandAudit}" ] ||
+   [ "$1" = "${commandHelp}" ]; then
+    set -- krakend "$@"
+fi
+
+# check for the expected command
+if [ "$1" = 'krakend' ]; then
+    # krakend user has uid 1000
+    # https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+    # runAsUser: 1000
+    if [ "$(id -u)" = 1000 ]; then
+        exec "$@"    
+    else
+        # use su-exec to drop to a non-root user
+        exec su-exec krakend "$@"
+    fi
+fi
+
+# else default to run whatever the user wanted like "bash" or "sh"
+exec "$@"
diff --git a/krakend_latest/Dockerfile b/krakend_latest/Dockerfile
new file mode 100644
index 0000000..51e456a
--- /dev/null
+++ b/krakend_latest/Dockerfile
@@ -0,0 +1,46 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+FROM alpine:3.18
+
+LABEL maintainer="[email protected]"
+
+WORKDIR /
+
+RUN apk add --no-cache --virtual .build-deps gnupg
+RUN set -eux; \
+    arch="$(apk --print-arch)"; \
+	case "$arch" in \
+		'x86_64') \
+			export GOARCH='amd64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=b5879bd41b0a6e66cabf6d11b2aa92b372f57e50abd64993cd3a9ef7a8f8bcb78726d4d5fcac63e31f6ee6d0d57dbf984fafd6c87c523e474efb0e270568b846; \
+			;; \
+		'aarch64') \
+			export GOARCH='arm64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=166e7dbf5450752191c08dc5cdba1a2f41e6a2ee825c93f4b5f7b7dbeecd2b5ec4f5282abc5ae9d7172ff5a86348e12a56cf963ad3fe1053b2dfac088433b15d; \
+			;; \
+		*) echo >&2 "error: unsupported architecture '$TARGETARCH' (likely packaging update needed)"; exit 1 ;; \
+	esac; \
+    wget -O krakend.tar.gz "https://github.com/krakendio/krakend-ce/releases/download/v2.4.0/krakend_2.4.0_${GOARCH}_alpine.tar.gz"; \
+    wget -O krakend.tar.gz.asc "https://github.com/krakendio/krakend-ce/releases/download/v2.4.0/krakend_2.4.0_${GOARCH}_alpine.tar.gz.asc"; \
+    export GNUPGHOME="$(mktemp -d)"; \
+    gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5B270F2E01E375FD9D5635E25DE6FD698AD6FDD2; \
+    gpg --batch --verify krakend.tar.gz.asc krakend.tar.gz; \
+    tar xzf krakend.tar.gz -C / --strip-components 1; \
+	echo "$KRAKEND_DOWNLOAD_SHA512 *krakend.tar.gz" | sha512sum -c; \
+	rm -f krakend.tar.gz krakend.tar.gz.asc; \
+	apk del --no-network .build-deps
+
+RUN apk add --no-cache --virtual .run-deps ca-certificates su-exec tzdata && \
+	adduser -u 1000 -S -D -H krakend && \
+	echo '{ "version": 3 }' > /etc/krakend/krakend.json
+
+WORKDIR /etc/krakend
+
+COPY docker-entrypoint.sh /
+ENTRYPOINT [ "/docker-entrypoint.sh" ]
+
+EXPOSE 8080 8090
+CMD [ "krakend", "run", "-c", "/etc/krakend/krakend.json" ]
diff --git a/krakend_latest/docker-entrypoint.sh b/krakend_latest/docker-entrypoint.sh
new file mode 100755
index 0000000..2b9c5c2
--- /dev/null
+++ b/krakend_latest/docker-entrypoint.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+set -e
+
+commandRun="run"
+commandVersion="version"
+commandCheck="check"
+commandPlugin="check-plugin"
+commandHelp="help"
+commandValidate="validate"
+commandAudit="audit"
+
+# this if will check if the first argument is a flag
+# but only works if all arguments require a hyphenated flag
+# -v; -SL; -f arg; Also check if the first argument is any
+# of the KrakenD commands
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] ||
+   [ "$1" = "${commandRun}" ] || 
+   [ "$1" = "${commandVersion}" ] || 
+   [ "$1" = "${commandCheck}" ] || 
+   [ "$1" = "${commandPlugin}" ] ||
+   [ "$1" = "${commandValidate}" ] ||
+   [ "$1" = "${commandAudit}" ] ||
+   [ "$1" = "${commandHelp}" ]; then
+    set -- krakend "$@"
+fi
+
+# check for the expected command
+if [ "$1" = 'krakend' ]; then
+    # krakend user has uid 1000
+    # https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+    # runAsUser: 1000
+    if [ "$(id -u)" = 1000 ]; then
+        exec "$@"    
+    else
+        # use su-exec to drop to a non-root user
+        exec su-exec krakend "$@"
+    fi
+fi
+
+# else default to run whatever the user wanted like "bash" or "sh"
+exec "$@"

github-actions[bot] avatar Jun 29 '23 14:06 github-actions[bot]

Diff for 703cced3ae806551445fc28824367e06fee3d31d:
diff --git a/_bashbrew-arches b/_bashbrew-arches
index 8b13789..e85a97f 100644
--- a/_bashbrew-arches
+++ b/_bashbrew-arches
@@ -1 +1,2 @@
-
+amd64
+arm64v8
diff --git a/_bashbrew-cat b/_bashbrew-cat
index bdfae4a..66bb4d8 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1 +1,12 @@
-Maintainers: New Image! :D (@docker-library-bot)
+Maintainers: Daniel Ortiz <[email protected]> (@taik0), Daniel López <[email protected]> (@kpacha)
+GitRepo: https://github.com/krakendio/docker-library.git
+
+Tags: 2.4.6
+Architectures: amd64, arm64v8
+GitCommit: b3f1f2632b42582d66a986c90368548be194dd5c
+Directory: 2.4.6
+
+Tags: 2.5.0, 2.5, 2, latest
+Architectures: amd64, arm64v8
+GitCommit: 0db87a0eec4a9413fa12e6c6fa8f4cf561c38d0e
+Directory: 2.5.0
diff --git a/_bashbrew-list b/_bashbrew-list
index e69de29..75002e5 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -0,0 +1,5 @@
+krakend:2
+krakend:2.4.6
+krakend:2.5
+krakend:2.5.0
+krakend:latest
diff --git a/krakend_2.4.6/Dockerfile b/krakend_2.4.6/Dockerfile
new file mode 100644
index 0000000..350f600
--- /dev/null
+++ b/krakend_2.4.6/Dockerfile
@@ -0,0 +1,46 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+FROM alpine:3.18
+
+LABEL maintainer="[email protected]"
+
+WORKDIR /
+
+RUN apk add --no-cache --virtual .build-deps gnupg
+RUN set -eux; \
+    arch="$(apk --print-arch)"; \
+	case "$arch" in \
+		'x86_64') \
+			export GOARCH='amd64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=061a6b49969a06ab627629cfaa8e7a76f035c5f6d01448ce64d6e8cefba2716b98532906fd4d3101167f6e8d8c2925c6e0bc7fc1fb76c06e842814c922a7b982; \
+			;; \
+		'aarch64') \
+			export GOARCH='arm64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=3d64fddb34aa71f0ea5e4693b0f88a59356ec9bac01fce3c82389edcafaed9f703ec451862f116de858a5e2546f17d3efe1a9bf2be8200162bc4f525d0615df1; \
+			;; \
+		*) echo >&2 "error: unsupported architecture '$TARGETARCH' (likely packaging update needed)"; exit 1 ;; \
+	esac; \
+    wget -O krakend.tar.gz "https://github.com/krakendio/krakend-ce/releases/download/v2.4.6/krakend_2.4.6_${GOARCH}_alpine.tar.gz"; \
+    wget -O krakend.tar.gz.asc "https://github.com/krakendio/krakend-ce/releases/download/v2.4.6/krakend_2.4.6_${GOARCH}_alpine.tar.gz.asc"; \
+    export GNUPGHOME="$(mktemp -d)"; \
+    gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5B270F2E01E375FD9D5635E25DE6FD698AD6FDD2; \
+    gpg --batch --verify krakend.tar.gz.asc krakend.tar.gz; \
+    tar xzf krakend.tar.gz -C / --strip-components 1; \
+	echo "$KRAKEND_DOWNLOAD_SHA512 *krakend.tar.gz" | sha512sum -c; \
+	rm -f krakend.tar.gz krakend.tar.gz.asc; \
+	apk del --no-network .build-deps
+
+RUN apk add --no-cache --virtual .run-deps ca-certificates su-exec tzdata && \
+	adduser -u 1000 -S -D -H krakend && \
+	echo '{ "version": 3 }' > /etc/krakend/krakend.json
+
+WORKDIR /etc/krakend
+
+COPY docker-entrypoint.sh /
+ENTRYPOINT [ "/docker-entrypoint.sh" ]
+
+EXPOSE 8080 8090
+CMD [ "krakend", "run", "-c", "/etc/krakend/krakend.json" ]
diff --git a/krakend_2.4.6/docker-entrypoint.sh b/krakend_2.4.6/docker-entrypoint.sh
new file mode 100755
index 0000000..2b9c5c2
--- /dev/null
+++ b/krakend_2.4.6/docker-entrypoint.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+set -e
+
+commandRun="run"
+commandVersion="version"
+commandCheck="check"
+commandPlugin="check-plugin"
+commandHelp="help"
+commandValidate="validate"
+commandAudit="audit"
+
+# this if will check if the first argument is a flag
+# but only works if all arguments require a hyphenated flag
+# -v; -SL; -f arg; Also check if the first argument is any
+# of the KrakenD commands
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] ||
+   [ "$1" = "${commandRun}" ] || 
+   [ "$1" = "${commandVersion}" ] || 
+   [ "$1" = "${commandCheck}" ] || 
+   [ "$1" = "${commandPlugin}" ] ||
+   [ "$1" = "${commandValidate}" ] ||
+   [ "$1" = "${commandAudit}" ] ||
+   [ "$1" = "${commandHelp}" ]; then
+    set -- krakend "$@"
+fi
+
+# check for the expected command
+if [ "$1" = 'krakend' ]; then
+    # krakend user has uid 1000
+    # https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+    # runAsUser: 1000
+    if [ "$(id -u)" = 1000 ]; then
+        exec "$@"    
+    else
+        # use su-exec to drop to a non-root user
+        exec su-exec krakend "$@"
+    fi
+fi
+
+# else default to run whatever the user wanted like "bash" or "sh"
+exec "$@"
diff --git a/krakend_latest/Dockerfile b/krakend_latest/Dockerfile
new file mode 100644
index 0000000..da200f2
--- /dev/null
+++ b/krakend_latest/Dockerfile
@@ -0,0 +1,46 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+FROM alpine:3.18
+
+LABEL maintainer="[email protected]"
+
+WORKDIR /
+
+RUN apk add --no-cache --virtual .build-deps gnupg
+RUN set -eux; \
+    arch="$(apk --print-arch)"; \
+	case "$arch" in \
+		'x86_64') \
+			export GOARCH='amd64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=afae9685b51d29c853e7bb03f886fd9592e8c89c16172b7c14eb1db6790b42294cff70873fee3fd0f8bdcdb3019761c2c3adf747a6c8c52edb460e5bad4d6218; \
+			;; \
+		'aarch64') \
+			export GOARCH='arm64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=c64d6abf232578b71258d4a7da995a60b3b0c4aa2cd35221ec6261f3db5aeb759860c8f8602ebabb6d1322c1ee820d5bcde30f1f93abd2e8c9ca1a5fb44429cd; \
+			;; \
+		*) echo >&2 "error: unsupported architecture '$TARGETARCH' (likely packaging update needed)"; exit 1 ;; \
+	esac; \
+    wget -O krakend.tar.gz "https://github.com/krakendio/krakend-ce/releases/download/v2.5.0/krakend_2.5.0_${GOARCH}_alpine.tar.gz"; \
+    wget -O krakend.tar.gz.asc "https://github.com/krakendio/krakend-ce/releases/download/v2.5.0/krakend_2.5.0_${GOARCH}_alpine.tar.gz.asc"; \
+    export GNUPGHOME="$(mktemp -d)"; \
+    gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5B270F2E01E375FD9D5635E25DE6FD698AD6FDD2; \
+    gpg --batch --verify krakend.tar.gz.asc krakend.tar.gz; \
+    tar xzf krakend.tar.gz -C / --strip-components 1; \
+	echo "$KRAKEND_DOWNLOAD_SHA512 *krakend.tar.gz" | sha512sum -c; \
+	rm -f krakend.tar.gz krakend.tar.gz.asc; \
+	apk del --no-network .build-deps
+
+RUN apk upgrade --no-cache --no-interactive && apk add --no-cache --virtual .run-deps ca-certificates su-exec tzdata && \
+	adduser -u 1000 -S -D -H krakend && \
+	echo '{ "version": 3 }' > /etc/krakend/krakend.json
+
+WORKDIR /etc/krakend
+
+COPY docker-entrypoint.sh /
+ENTRYPOINT [ "/docker-entrypoint.sh" ]
+
+EXPOSE 8080 8090
+CMD [ "krakend", "run", "-c", "/etc/krakend/krakend.json" ]
diff --git a/krakend_latest/docker-entrypoint.sh b/krakend_latest/docker-entrypoint.sh
new file mode 100755
index 0000000..2b9c5c2
--- /dev/null
+++ b/krakend_latest/docker-entrypoint.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+set -e
+
+commandRun="run"
+commandVersion="version"
+commandCheck="check"
+commandPlugin="check-plugin"
+commandHelp="help"
+commandValidate="validate"
+commandAudit="audit"
+
+# this if will check if the first argument is a flag
+# but only works if all arguments require a hyphenated flag
+# -v; -SL; -f arg; Also check if the first argument is any
+# of the KrakenD commands
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] ||
+   [ "$1" = "${commandRun}" ] || 
+   [ "$1" = "${commandVersion}" ] || 
+   [ "$1" = "${commandCheck}" ] || 
+   [ "$1" = "${commandPlugin}" ] ||
+   [ "$1" = "${commandValidate}" ] ||
+   [ "$1" = "${commandAudit}" ] ||
+   [ "$1" = "${commandHelp}" ]; then
+    set -- krakend "$@"
+fi
+
+# check for the expected command
+if [ "$1" = 'krakend' ]; then
+    # krakend user has uid 1000
+    # https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+    # runAsUser: 1000
+    if [ "$(id -u)" = 1000 ]; then
+        exec "$@"    
+    else
+        # use su-exec to drop to a non-root user
+        exec su-exec krakend "$@"
+    fi
+fi
+
+# else default to run whatever the user wanted like "bash" or "sh"
+exec "$@"

github-actions[bot] avatar Dec 14 '23 13:12 github-actions[bot]

Hi team,

Are new images still blocked?

taik0 avatar Dec 14 '23 13:12 taik0

Diff for 2c4a42d2c4fb0e6416785206e336003e92dec56d:
diff --git a/_bashbrew-arches b/_bashbrew-arches
index 8b13789..e85a97f 100644
--- a/_bashbrew-arches
+++ b/_bashbrew-arches
@@ -1 +1,2 @@
-
+amd64
+arm64v8
diff --git a/_bashbrew-cat b/_bashbrew-cat
index bdfae4a..4c73b3b 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1 +1,12 @@
-Maintainers: New Image! :D (@docker-library-bot)
+Maintainers: Daniel Ortiz <[email protected]> (@taik0), Daniel López <[email protected]> (@kpacha)
+GitRepo: https://github.com/krakendio/docker-library.git
+
+Tags: 2.6.1
+Architectures: amd64, arm64v8
+GitCommit: 737100a258b4df7a1f7ef9397655e7227e118128
+Directory: 2.6.1
+
+Tags: 2.6.2, 2.6, 2, latest
+Architectures: amd64, arm64v8
+GitCommit: 8078a2bded0951f43277b0a7a4a9e8cd3fe69b50
+Directory: 2.6.2
diff --git a/_bashbrew-list b/_bashbrew-list
index e69de29..4fcc30e 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -0,0 +1,5 @@
+krakend:2
+krakend:2.6
+krakend:2.6.1
+krakend:2.6.2
+krakend:latest
diff --git a/krakend_2.6.1/Dockerfile b/krakend_2.6.1/Dockerfile
new file mode 100644
index 0000000..bd8dec0
--- /dev/null
+++ b/krakend_2.6.1/Dockerfile
@@ -0,0 +1,46 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+FROM alpine:3.18
+
+LABEL maintainer="[email protected]"
+
+WORKDIR /
+
+RUN apk add --no-cache --virtual .build-deps gnupg
+RUN set -eux; \
+    arch="$(apk --print-arch)"; \
+	case "$arch" in \
+		'x86_64') \
+			export GOARCH='amd64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=d9355d33dc16f318f9a45d680e0c907df8c284abc06c810f35d377287ddc84d0761d5425ae41dd5a9f7cadbdf4ce546c45adb9583eaf6feb952e29984075cbfc; \
+			;; \
+		'aarch64') \
+			export GOARCH='arm64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=47a2b7cd576212af5011d5c32c7557eac0c74dba22091b6ef5c7de8ad851908681cf3b001a307c13b97b77a27317868839427fd0d4d9491691c02a8e2220b274; \
+			;; \
+		*) echo >&2 "error: unsupported architecture '$TARGETARCH' (likely packaging update needed)"; exit 1 ;; \
+	esac; \
+    wget -O krakend.tar.gz "https://github.com/krakendio/krakend-ce/releases/download/v2.6.1/krakend_2.6.1_${GOARCH}_alpine.tar.gz"; \
+    wget -O krakend.tar.gz.asc "https://github.com/krakendio/krakend-ce/releases/download/v2.6.1/krakend_2.6.1_${GOARCH}_alpine.tar.gz.asc"; \
+    export GNUPGHOME="$(mktemp -d)"; \
+    gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5B270F2E01E375FD9D5635E25DE6FD698AD6FDD2; \
+    gpg --batch --verify krakend.tar.gz.asc krakend.tar.gz; \
+    tar xzf krakend.tar.gz -C / --strip-components 1; \
+	echo "$KRAKEND_DOWNLOAD_SHA512 *krakend.tar.gz" | sha512sum -c; \
+	rm -f krakend.tar.gz krakend.tar.gz.asc; \
+	apk del --no-network .build-deps
+
+RUN apk upgrade --no-cache --no-interactive && apk add --no-cache --virtual .run-deps ca-certificates su-exec tzdata && \
+	adduser -u 1000 -S -D -H krakend && \
+	echo '{ "version": 3 }' > /etc/krakend/krakend.json
+
+WORKDIR /etc/krakend
+
+COPY docker-entrypoint.sh /
+ENTRYPOINT [ "/docker-entrypoint.sh" ]
+
+EXPOSE 8080 8090
+CMD [ "krakend", "run", "-c", "/etc/krakend/krakend.json" ]
diff --git a/krakend_2.6.1/docker-entrypoint.sh b/krakend_2.6.1/docker-entrypoint.sh
new file mode 100755
index 0000000..2b9c5c2
--- /dev/null
+++ b/krakend_2.6.1/docker-entrypoint.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+set -e
+
+commandRun="run"
+commandVersion="version"
+commandCheck="check"
+commandPlugin="check-plugin"
+commandHelp="help"
+commandValidate="validate"
+commandAudit="audit"
+
+# this if will check if the first argument is a flag
+# but only works if all arguments require a hyphenated flag
+# -v; -SL; -f arg; Also check if the first argument is any
+# of the KrakenD commands
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] ||
+   [ "$1" = "${commandRun}" ] || 
+   [ "$1" = "${commandVersion}" ] || 
+   [ "$1" = "${commandCheck}" ] || 
+   [ "$1" = "${commandPlugin}" ] ||
+   [ "$1" = "${commandValidate}" ] ||
+   [ "$1" = "${commandAudit}" ] ||
+   [ "$1" = "${commandHelp}" ]; then
+    set -- krakend "$@"
+fi
+
+# check for the expected command
+if [ "$1" = 'krakend' ]; then
+    # krakend user has uid 1000
+    # https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+    # runAsUser: 1000
+    if [ "$(id -u)" = 1000 ]; then
+        exec "$@"    
+    else
+        # use su-exec to drop to a non-root user
+        exec su-exec krakend "$@"
+    fi
+fi
+
+# else default to run whatever the user wanted like "bash" or "sh"
+exec "$@"
diff --git a/krakend_latest/Dockerfile b/krakend_latest/Dockerfile
new file mode 100644
index 0000000..1cc8ad3
--- /dev/null
+++ b/krakend_latest/Dockerfile
@@ -0,0 +1,46 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+FROM alpine:3.18
+
+LABEL maintainer="[email protected]"
+
+WORKDIR /
+
+RUN apk add --no-cache --virtual .build-deps gnupg
+RUN set -eux; \
+    arch="$(apk --print-arch)"; \
+	case "$arch" in \
+		'x86_64') \
+			export GOARCH='amd64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=c6ee4fcac397161f3dadd208b8c4a8aa2e4cf65c189086e80c8f4f364f72536c69fb5af7bd9ed273c3c978a82919f773eb32b1a6825078d945359d000c463e74; \
+			;; \
+		'aarch64') \
+			export GOARCH='arm64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=e9d297f252a6ab4761468dbe058b81ae8bc429f573841cda30bfc1d56900dbcffb8f6fce8eef75cf735d9cdd1ab161ea606f01f23e2a2c264668ec5205b47ecd; \
+			;; \
+		*) echo >&2 "error: unsupported architecture '$TARGETARCH' (likely packaging update needed)"; exit 1 ;; \
+	esac; \
+    wget -O krakend.tar.gz "https://github.com/krakendio/krakend-ce/releases/download/v2.6.2/krakend_2.6.2_${GOARCH}_alpine.tar.gz"; \
+    wget -O krakend.tar.gz.asc "https://github.com/krakendio/krakend-ce/releases/download/v2.6.2/krakend_2.6.2_${GOARCH}_alpine.tar.gz.asc"; \
+    export GNUPGHOME="$(mktemp -d)"; \
+    gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5B270F2E01E375FD9D5635E25DE6FD698AD6FDD2; \
+    gpg --batch --verify krakend.tar.gz.asc krakend.tar.gz; \
+    tar xzf krakend.tar.gz -C / --strip-components 1; \
+	echo "$KRAKEND_DOWNLOAD_SHA512 *krakend.tar.gz" | sha512sum -c; \
+	rm -f krakend.tar.gz krakend.tar.gz.asc; \
+	apk del --no-network .build-deps
+
+RUN apk upgrade --no-cache --no-interactive && apk add --no-cache --virtual .run-deps ca-certificates su-exec tzdata && \
+	adduser -u 1000 -S -D -H krakend && \
+	echo '{ "version": 3 }' > /etc/krakend/krakend.json
+
+WORKDIR /etc/krakend
+
+COPY docker-entrypoint.sh /
+ENTRYPOINT [ "/docker-entrypoint.sh" ]
+
+EXPOSE 8080 8090
+CMD [ "krakend", "run", "-c", "/etc/krakend/krakend.json" ]
diff --git a/krakend_latest/docker-entrypoint.sh b/krakend_latest/docker-entrypoint.sh
new file mode 100755
index 0000000..2b9c5c2
--- /dev/null
+++ b/krakend_latest/docker-entrypoint.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+set -e
+
+commandRun="run"
+commandVersion="version"
+commandCheck="check"
+commandPlugin="check-plugin"
+commandHelp="help"
+commandValidate="validate"
+commandAudit="audit"
+
+# this if will check if the first argument is a flag
+# but only works if all arguments require a hyphenated flag
+# -v; -SL; -f arg; Also check if the first argument is any
+# of the KrakenD commands
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] ||
+   [ "$1" = "${commandRun}" ] || 
+   [ "$1" = "${commandVersion}" ] || 
+   [ "$1" = "${commandCheck}" ] || 
+   [ "$1" = "${commandPlugin}" ] ||
+   [ "$1" = "${commandValidate}" ] ||
+   [ "$1" = "${commandAudit}" ] ||
+   [ "$1" = "${commandHelp}" ]; then
+    set -- krakend "$@"
+fi
+
+# check for the expected command
+if [ "$1" = 'krakend' ]; then
+    # krakend user has uid 1000
+    # https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+    # runAsUser: 1000
+    if [ "$(id -u)" = 1000 ]; then
+        exec "$@"    
+    else
+        # use su-exec to drop to a non-root user
+        exec su-exec krakend "$@"
+    fi
+fi
+
+# else default to run whatever the user wanted like "bash" or "sh"
+exec "$@"

github-actions[bot] avatar Apr 23 '24 12:04 github-actions[bot]

Hi @yosifkit Is something wrong on our side? There hasn't been any response in almost 1.5 years, are new docker images still being accepted?

taik0 avatar Apr 23 '24 12:04 taik0

I opened a PR to optimize the image: https://github.com/krakend/docker-library/pull/4

Could you also open a docs PR as explained here: https://github.com/docker-library/docs/blob/master/README.md

LaurentGoderre avatar May 22 '24 15:05 LaurentGoderre

Diff for e5afdd729c785b83c5a537b06caf2534b31777b3:
diff --git a/_bashbrew-arches b/_bashbrew-arches
index 8b13789..e85a97f 100644
--- a/_bashbrew-arches
+++ b/_bashbrew-arches
@@ -1 +1,2 @@
-
+amd64
+arm64v8
diff --git a/_bashbrew-cat b/_bashbrew-cat
index bdfae4a..5f60418 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1 +1,12 @@
-Maintainers: New Image! :D (@docker-library-bot)
+Maintainers: Daniel Ortiz <[email protected]> (@taik0), Daniel López <[email protected]> (@kpacha)
+GitRepo: https://github.com/krakendio/docker-library.git
+
+Tags: 2.6.2
+Architectures: amd64, arm64v8
+GitCommit: b7b980f989c53a770f4722835c06d1addb81fbbd
+Directory: 2.6.2
+
+Tags: 2.6.3, 2.6, 2, latest
+Architectures: amd64, arm64v8
+GitCommit: b7b980f989c53a770f4722835c06d1addb81fbbd
+Directory: 2.6.3
diff --git a/_bashbrew-list b/_bashbrew-list
index e69de29..cc77abe 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -0,0 +1,5 @@
+krakend:2
+krakend:2.6
+krakend:2.6.2
+krakend:2.6.3
+krakend:latest
diff --git a/krakend_2.6.2/Dockerfile b/krakend_2.6.2/Dockerfile
new file mode 100644
index 0000000..4d390e4
--- /dev/null
+++ b/krakend_2.6.2/Dockerfile
@@ -0,0 +1,45 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+FROM alpine:3.18
+
+LABEL org.opencontainers.image.authors="[email protected]"
+
+RUN set -eux; \
+	apk add --no-cache --virtual .run-deps ca-certificates su-exec tzdata; \
+	adduser -u 1000 -S -D -H krakend;
+
+RUN set -eux; \
+    apk add --no-cache --virtual .build-deps gnupg; \
+    arch="$(apk --print-arch)"; \
+	case "$arch" in \
+		'x86_64') \
+			export GOARCH='amd64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=c6ee4fcac397161f3dadd208b8c4a8aa2e4cf65c189086e80c8f4f364f72536c69fb5af7bd9ed273c3c978a82919f773eb32b1a6825078d945359d000c463e74; \
+			;; \
+		'aarch64') \
+			export GOARCH='arm64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=e9d297f252a6ab4761468dbe058b81ae8bc429f573841cda30bfc1d56900dbcffb8f6fce8eef75cf735d9cdd1ab161ea606f01f23e2a2c264668ec5205b47ecd; \
+			;; \
+		*) echo >&2 "error: unsupported architecture '$TARGETARCH' (likely packaging update needed)"; exit 1 ;; \
+	esac; \
+    wget -O krakend.tar.gz "https://github.com/krakendio/krakend-ce/releases/download/v2.6.2/krakend_2.6.2_${GOARCH}_alpine.tar.gz"; \
+    wget -O krakend.tar.gz.asc "https://github.com/krakendio/krakend-ce/releases/download/v2.6.2/krakend_2.6.2_${GOARCH}_alpine.tar.gz.asc"; \
+    export GNUPGHOME="$(mktemp -d)"; \
+    gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5B270F2E01E375FD9D5635E25DE6FD698AD6FDD2; \
+    gpg --batch --verify krakend.tar.gz.asc krakend.tar.gz; \
+    tar xzf krakend.tar.gz -C / --strip-components 1; \
+	echo "$KRAKEND_DOWNLOAD_SHA512 *krakend.tar.gz" | sha512sum -c; \
+	rm -f krakend.tar.gz krakend.tar.gz.asc; \
+	apk del --no-network .build-deps; \
+	echo '{ "version": 3 }' > /etc/krakend/krakend.json
+
+WORKDIR /etc/krakend
+
+COPY docker-entrypoint.sh /
+ENTRYPOINT [ "/docker-entrypoint.sh" ]
+
+EXPOSE 8080 8090
+CMD [ "krakend", "run", "-c", "/etc/krakend/krakend.json" ]
diff --git a/krakend_2.6.2/docker-entrypoint.sh b/krakend_2.6.2/docker-entrypoint.sh
new file mode 100755
index 0000000..2b9c5c2
--- /dev/null
+++ b/krakend_2.6.2/docker-entrypoint.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+set -e
+
+commandRun="run"
+commandVersion="version"
+commandCheck="check"
+commandPlugin="check-plugin"
+commandHelp="help"
+commandValidate="validate"
+commandAudit="audit"
+
+# this if will check if the first argument is a flag
+# but only works if all arguments require a hyphenated flag
+# -v; -SL; -f arg; Also check if the first argument is any
+# of the KrakenD commands
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] ||
+   [ "$1" = "${commandRun}" ] || 
+   [ "$1" = "${commandVersion}" ] || 
+   [ "$1" = "${commandCheck}" ] || 
+   [ "$1" = "${commandPlugin}" ] ||
+   [ "$1" = "${commandValidate}" ] ||
+   [ "$1" = "${commandAudit}" ] ||
+   [ "$1" = "${commandHelp}" ]; then
+    set -- krakend "$@"
+fi
+
+# check for the expected command
+if [ "$1" = 'krakend' ]; then
+    # krakend user has uid 1000
+    # https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+    # runAsUser: 1000
+    if [ "$(id -u)" = 1000 ]; then
+        exec "$@"    
+    else
+        # use su-exec to drop to a non-root user
+        exec su-exec krakend "$@"
+    fi
+fi
+
+# else default to run whatever the user wanted like "bash" or "sh"
+exec "$@"
diff --git a/krakend_latest/Dockerfile b/krakend_latest/Dockerfile
new file mode 100644
index 0000000..474c180
--- /dev/null
+++ b/krakend_latest/Dockerfile
@@ -0,0 +1,45 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+FROM alpine:3.18
+
+LABEL org.opencontainers.image.authors="[email protected]"
+
+RUN set -eux; \
+	apk add --no-cache --virtual .run-deps ca-certificates su-exec tzdata; \
+	adduser -u 1000 -S -D -H krakend;
+
+RUN set -eux; \
+    apk add --no-cache --virtual .build-deps gnupg; \
+    arch="$(apk --print-arch)"; \
+	case "$arch" in \
+		'x86_64') \
+			export GOARCH='amd64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=fa1b40247c4e794a651f7dff09647a65e309775fe89d71ac90a2f3afef8767e0614119034c2c9c0d0fabf81b36825ae14d1860269293d36ad0f4ec9b3c2d7065; \
+			;; \
+		'aarch64') \
+			export GOARCH='arm64' GOOS='linux'; \
+			export KRAKEND_DOWNLOAD_SHA512=1334eb6508cf56224e59ce8ff31dd332b8258dd7d9b46fc7c9e0faf996753a950ddb41412e86c1a8f3457fb64f6c2b1b6db40e7f79a2d11c69a684d1c3b93596; \
+			;; \
+		*) echo >&2 "error: unsupported architecture '$TARGETARCH' (likely packaging update needed)"; exit 1 ;; \
+	esac; \
+    wget -O krakend.tar.gz "https://github.com/krakendio/krakend-ce/releases/download/v2.6.3/krakend_2.6.3_${GOARCH}_alpine.tar.gz"; \
+    wget -O krakend.tar.gz.asc "https://github.com/krakendio/krakend-ce/releases/download/v2.6.3/krakend_2.6.3_${GOARCH}_alpine.tar.gz.asc"; \
+    export GNUPGHOME="$(mktemp -d)"; \
+    gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5B270F2E01E375FD9D5635E25DE6FD698AD6FDD2; \
+    gpg --batch --verify krakend.tar.gz.asc krakend.tar.gz; \
+    tar xzf krakend.tar.gz -C / --strip-components 1; \
+	echo "$KRAKEND_DOWNLOAD_SHA512 *krakend.tar.gz" | sha512sum -c; \
+	rm -f krakend.tar.gz krakend.tar.gz.asc; \
+	apk del --no-network .build-deps; \
+	echo '{ "version": 3 }' > /etc/krakend/krakend.json
+
+WORKDIR /etc/krakend
+
+COPY docker-entrypoint.sh /
+ENTRYPOINT [ "/docker-entrypoint.sh" ]
+
+EXPOSE 8080 8090
+CMD [ "krakend", "run", "-c", "/etc/krakend/krakend.json" ]
diff --git a/krakend_latest/docker-entrypoint.sh b/krakend_latest/docker-entrypoint.sh
new file mode 100755
index 0000000..2b9c5c2
--- /dev/null
+++ b/krakend_latest/docker-entrypoint.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+set -e
+
+commandRun="run"
+commandVersion="version"
+commandCheck="check"
+commandPlugin="check-plugin"
+commandHelp="help"
+commandValidate="validate"
+commandAudit="audit"
+
+# this if will check if the first argument is a flag
+# but only works if all arguments require a hyphenated flag
+# -v; -SL; -f arg; Also check if the first argument is any
+# of the KrakenD commands
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] ||
+   [ "$1" = "${commandRun}" ] || 
+   [ "$1" = "${commandVersion}" ] || 
+   [ "$1" = "${commandCheck}" ] || 
+   [ "$1" = "${commandPlugin}" ] ||
+   [ "$1" = "${commandValidate}" ] ||
+   [ "$1" = "${commandAudit}" ] ||
+   [ "$1" = "${commandHelp}" ]; then
+    set -- krakend "$@"
+fi
+
+# check for the expected command
+if [ "$1" = 'krakend' ]; then
+    # krakend user has uid 1000
+    # https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+    # runAsUser: 1000
+    if [ "$(id -u)" = 1000 ]; then
+        exec "$@"    
+    else
+        # use su-exec to drop to a non-root user
+        exec su-exec krakend "$@"
+    fi
+fi
+
+# else default to run whatever the user wanted like "bash" or "sh"
+exec "$@"

github-actions[bot] avatar May 23 '24 15:05 github-actions[bot]

Hi @LaurentGoderre, thank you for the PR, it's already merged.

The doc PR is here https://github.com/docker-library/docs/pull/2082

taik0 avatar May 23 '24 15:05 taik0

Small comments on the docs

LaurentGoderre avatar May 23 '24 16:05 LaurentGoderre

Comments on the docs are addressed. Thank you very much for your review!

alombarte avatar May 23 '24 16:05 alombarte