From 020efcba70fe0233c13ab61971fbaa5c6be6ffb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=98eho=C5=99?= Date: Wed, 3 Jul 2024 22:30:44 +0200 Subject: [PATCH] feat: remove alpine base image, add alpine-toolbox --- apps/{alpine => alpine-toolbox}/Dockerfile | 3 ++- apps/alpine-toolbox/README.md | 3 +++ apps/{alpine => alpine-toolbox}/ci/latest.sh | 0 apps/{alpine => alpine-toolbox}/entrypoint.sh | 0 apps/{alpine => alpine-toolbox}/metadata.yaml | 2 +- apps/alpine/README.md | 3 --- apps/emqx-init/Dockerfile | 24 +++++++++++++++++-- apps/usbip/Dockerfile | 20 +++++++++++++++- 8 files changed, 47 insertions(+), 8 deletions(-) rename apps/{alpine => alpine-toolbox}/Dockerfile (96%) create mode 100644 apps/alpine-toolbox/README.md rename apps/{alpine => alpine-toolbox}/ci/latest.sh (100%) rename apps/{alpine => alpine-toolbox}/entrypoint.sh (100%) rename apps/{alpine => alpine-toolbox}/metadata.yaml (86%) delete mode 100644 apps/alpine/README.md diff --git a/apps/alpine/Dockerfile b/apps/alpine-toolbox/Dockerfile similarity index 96% rename from apps/alpine/Dockerfile rename to apps/alpine-toolbox/Dockerfile index b10e3d0..ab972a7 100644 --- a/apps/alpine/Dockerfile +++ b/apps/alpine-toolbox/Dockerfile @@ -1,4 +1,3 @@ -ARG VERSION FROM docker.io/library/alpine:3.20@sha256:b89d9c93e9ed3597455c90a0b88a8bbb5cb7188438f70953fede212a0c4394e0 ARG TARGETPLATFORM @@ -21,6 +20,8 @@ RUN \ ca-certificates \ catatonit \ curl \ + \ + git \ grep \ less diff --git a/apps/alpine-toolbox/README.md b/apps/alpine-toolbox/README.md new file mode 100644 index 0000000..399db8b --- /dev/null +++ b/apps/alpine-toolbox/README.md @@ -0,0 +1,3 @@ +# Alpine Linux Toolbox + +[Alpine Linux](https://alpinelinux.org) Toolbox image. diff --git a/apps/alpine/ci/latest.sh b/apps/alpine-toolbox/ci/latest.sh similarity index 100% rename from apps/alpine/ci/latest.sh rename to apps/alpine-toolbox/ci/latest.sh diff --git a/apps/alpine/entrypoint.sh b/apps/alpine-toolbox/entrypoint.sh similarity index 100% rename from apps/alpine/entrypoint.sh rename to apps/alpine-toolbox/entrypoint.sh diff --git a/apps/alpine/metadata.yaml b/apps/alpine-toolbox/metadata.yaml similarity index 86% rename from apps/alpine/metadata.yaml rename to apps/alpine-toolbox/metadata.yaml index c764cdc..f58e71c 100644 --- a/apps/alpine/metadata.yaml +++ b/apps/alpine-toolbox/metadata.yaml @@ -1,5 +1,5 @@ --- -app: alpine +app: alpine-toolbox semver: true channels: - name: stable diff --git a/apps/alpine/README.md b/apps/alpine/README.md deleted file mode 100644 index b76b32a..0000000 --- a/apps/alpine/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Alpine Linux - -[Alpine Linux](https://alpinelinux.org) base image modified for Kubernetes friendliness. diff --git a/apps/emqx-init/Dockerfile b/apps/emqx-init/Dockerfile index d1f7708..b4b5cab 100644 --- a/apps/emqx-init/Dockerfile +++ b/apps/emqx-init/Dockerfile @@ -1,11 +1,31 @@ -FROM ghcr.io/prehor/alpine:3.20@sha256:3f10abffcc9280fe75c2598bf6260f7c7ce86e9cc25756fa8dabe0da8e3a954b +FROM docker.io/library/alpine:3.20@sha256:b89d9c93e9ed3597455c90a0b88a8bbb5cb7188438f70953fede212a0c4394e0 ARG TARGETPLATFORM ARG VERSION ARG CHANNEL +ENV CHARSET="UTF-8" \ + LANG="en_US.UTF-8" \ + TZ="Etc/UTC" + +RUN \ + mkdir /config \ + && \ + adduser app -D -u 568 -g 568 -h /config \ + && \ + chown 568:568 /config \ + && \ + apk add --no-cache \ + bash \ + ca-certificates \ + catatonit \ + curl + COPY ./apps/emqx-init/entrypoint.sh /entrypoint.sh -USER nobody +USER app + +ENTRYPOINT ["/usr/bin/catatonit", "--"] +CMD ["/entrypoint.sh"] LABEL org.opencontainers.image.source="https://www.emqx.com" diff --git a/apps/usbip/Dockerfile b/apps/usbip/Dockerfile index 553f855..0565b1b 100644 --- a/apps/usbip/Dockerfile +++ b/apps/usbip/Dockerfile @@ -1,14 +1,32 @@ -FROM ghcr.io/prehor/alpine:3.20@sha256:3f10abffcc9280fe75c2598bf6260f7c7ce86e9cc25756fa8dabe0da8e3a954b +FROM docker.io/library/alpine:3.20@sha256:b89d9c93e9ed3597455c90a0b88a8bbb5cb7188438f70953fede212a0c4394e0 ARG TARGETPLATFORM ARG VERSION ARG CHANNEL +ENV CHARSET="UTF-8" \ + LANG="en_US.UTF-8" \ + TZ="Etc/UTC" + RUN \ + mkdir /config \ + && \ + adduser app -D -u 568 -g 568 -h /config \ + && \ + chown 568:568 /config \ + && \ apk add --no-cache \ + bash \ + ca-certificates \ + catatonit \ + curl \ + \ hwdata-usb \ linux-tools-usbip~"${VERSION}" COPY ./apps/usbip/entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/usr/bin/catatonit", "--"] +CMD ["/entrypoint.sh"] + LABEL org.opencontainers.image.source="https://github.com/torvalds/linux/blob/master/tools/usb/usbip/README"