From e7f882484548f3b3c8074b5b71d3d0d379406f22 Mon Sep 17 00:00:00 2001 From: Paul Tirk Date: Sun, 17 Mar 2024 21:30:01 +0100 Subject: [PATCH 1/2] add argument for architecture to dockerfile --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8dc8a5f..ed481a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,8 @@ ARG GOPROXY ENV GOPROXY=${GOPROXY:-"https://proxy.golang.org,direct"} ARG JUICEFS_CE_VERSION ENV JUICEFS_CE_VERSION=${JUICEFS_CE_VERSION:-"1.0.4"} +ARG ARCH +ENV ARCH=${ARCH:-"amd64"} WORKDIR /docker-volume-juicefs COPY . . @@ -11,7 +13,7 @@ RUN apt-get update && apt-get install -y curl musl-tools tar gzip upx-ucl && \ CC=/usr/bin/musl-gcc go build -o bin/docker-volume-juicefs --ldflags '-linkmode external -extldflags "-static"' . WORKDIR /workspace -RUN curl -fsSL -o juicefs-ce.tar.gz https://github.com/juicedata/juicefs/releases/download/v${JUICEFS_CE_VERSION}/juicefs-${JUICEFS_CE_VERSION}-linux-amd64.tar.gz && \ +RUN curl -fsSL -o juicefs-ce.tar.gz https://github.com/juicedata/juicefs/releases/download/v${JUICEFS_CE_VERSION}/juicefs-${JUICEFS_CE_VERSION}-linux-${ARCH}.tar.gz && \ tar -zxf juicefs-ce.tar.gz -C /tmp && \ curl -fsSL -o /juicefs https://s.juicefs.com/static/juicefs && \ chmod +x /juicefs From 7a5f105f7e16d31dadd0b3552033ddc613bbd42a Mon Sep 17 00:00:00 2001 From: Paul Tirk Date: Sun, 17 Mar 2024 21:30:39 +0100 Subject: [PATCH 2/2] use python:2.7 docker image to fix arm64 support --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ed481a5..e2c173e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN curl -fsSL -o juicefs-ce.tar.gz https://github.com/juicedata/juicefs/release curl -fsSL -o /juicefs https://s.juicefs.com/static/juicefs && \ chmod +x /juicefs -FROM python:2.7-alpine +FROM python:2.7 RUN mkdir -p /run/docker/plugins /jfs/state /jfs/volumes COPY --from=builder /docker-volume-juicefs/bin/docker-volume-juicefs / COPY --from=builder /tmp/juicefs /bin/