From ce9bf84987c22abd75d456f4eedbde58b8ece182 Mon Sep 17 00:00:00 2001 From: "Vincent Qiu (HOHO``)" Date: Sun, 17 Dec 2023 02:13:27 +0800 Subject: [PATCH] fixed unable to start with caddy, panic: runtime error: slice bounds out of range fixed #111 --- docker/Dockerfile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index ef59180..5c3a12f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -7,11 +7,21 @@ RUN apk add --no-cache ca-certificates wget \ && echo "progress = dot:giga" | tee /etc/wgetrc # Add and Setup Caddy webserver -RUN wget "https://github.com/caddyserver/caddy/releases/download/v0.10.11/caddy_v0.10.11_linux_amd64.tar.gz" -O /caddy.tgz \ +RUN ARCH=$(uname -m) \ + && if [ "$ARCH" = "x86_64" ]; then \ + CADDY_URL="https://github.com/caddyserver/caddy/releases/download/v0.11.5/caddy_v0.11.5_linux_amd64.tar.gz"; \ + elif [ "$ARCH" = "aarch64" ]; then \ + CADDY_URL="https://github.com/caddyserver/caddy/releases/download/v0.11.5/caddy_v0.11.5_linux_arm64.tar.gz"; \ + else \ + echo "Unsupported architecture: $ARCH"; \ + exit 1; \ + fi \ + && wget "$CADDY_URL" -O /caddy.tgz \ && mkdir caddy \ - && tar xzf caddy.tgz -C /caddy --no-same-owner \ + && tar xzf /caddy.tgz -C /caddy --no-same-owner \ && rm -f /caddy.tgz + # Add and Setup Kafka Connect UI ARG KAFKA_CONNECT_UI_VERSION="0.9.7" ARG KAFKA_CONNECT_UI_URL="https://github.com/Landoop/kafka-connect-ui/releases/download/v.${KAFKA_CONNECT_UI_VERSION}/kafka-connect-ui-${KAFKA_CONNECT_UI_VERSION}.tar.gz"