diff --git a/docker/Dockerfile b/docker/Dockerfile index 9e288bfa11..ab84d21ab0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -20,23 +20,21 @@ ARG JUICEFS_REPO_BRANCH=main ARG JUICEFS_REPO_REF=${JUICEFS_REPO_BRANCH} ARG JUICEFS_CSI_REPO_REF=master -RUN apt update && apt install -y software-properties-common && apt update && \ - wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add - && \ - apt-add-repository 'deb https://download.ceph.com/debian-pacific/ buster main' && \ +RUN if [ ${TARGETARCH} -eq amd64 ]; then mkdir -p /home/travis/.m2 && \ + wget -O /home/travis/.m2/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb && \ + dpkg -i /home/travis/.m2/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb && \ wget -O - https://download.gluster.org/pub/gluster/glusterfs/7/rsa.pub | apt-key add - && \ echo deb [arch=${TARGETARCH}] https://download.gluster.org/pub/gluster/glusterfs/7/LATEST/Debian/buster/${TARGETARCH}/apt buster main > /etc/apt/sources.list.d/gluster.list && \ - apt update + apt-get update && apt-get install -y uuid-dev libglusterfs-dev glusterfs-common; fi WORKDIR /workspace ENV GOPROXY=${GOPROXY:-https://proxy.golang.org} -RUN apt-get update && apt-get install -y musl-tools upx-ucl librados-dev libcephfs-dev librbd-dev uuid-dev libglusterfs-dev glusterfs-common && mkdir -p /home/travis/.m2 && \ - wget -O /home/travis/.m2/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb && \ - dpkg -i /home/travis/.m2/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb && \ +RUN apt-get update && apt-get install -y musl-tools upx-ucl librados-dev libcephfs-dev librbd-dev && \ git clone https://github.com/juicedata/juicefs-csi-driver && \ cd juicefs-csi-driver && git checkout $JUICEFS_CSI_REPO_REF && make && \ cd /workspace && git clone --branch=$JUICEFS_REPO_BRANCH https://github.com/juicedata/juicefs && \ cd juicefs && git checkout $JUICEFS_REPO_REF && go get github.com/ceph/go-ceph@v0.4.0 && go mod tidy && \ - make juicefs.all && mv juicefs.all juicefs + if [ ${TARGETARCH} -eq amd64 ]; then make juicefs.all && mv juicefs.all juicefs; else make juicefs.ceph && mv juicefs.ceph juicefs; fi FROM python:3.8-slim-buster @@ -58,14 +56,15 @@ RUN chmod +x /tini RUN apt update && apt install -y software-properties-common wget gnupg gnupg2 && apt update && \ wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add - && \ - apt-add-repository 'deb https://download.ceph.com/debian-pacific/ buster main' && \ + apt-add-repository 'deb https://download.ceph.com/debian-pacific/ buster main' && apt update && \ + if [ ${TARGETARCH} -eq amd64 ]; then mkdir -p /home/travis/.m2 && \ + wget -O /home/travis/.m2/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb && \ + dpkg -i /home/travis/.m2/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb && \ wget -O - https://download.gluster.org/pub/gluster/glusterfs/7/rsa.pub | apt-key add - && \ echo deb [arch=${TARGETARCH}] https://download.gluster.org/pub/gluster/glusterfs/7/LATEST/Debian/buster/${TARGETARCH}/apt buster main > /etc/apt/sources.list.d/gluster.list && \ - apt update + apt-get update && apt-get install -y uuid-dev libglusterfs-dev glusterfs-common; fi -RUN apt-get update && apt-get install -y librados2 librados-dev libcephfs-dev librbd-dev curl fuse procps iputils-ping strace iproute2 net-tools tcpdump lsof uuid-dev libglusterfs-dev glusterfs-common && \ - mkdir -p /home/travis/.m2 && wget -O /home/travis/.m2/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb && \ - dpkg -i /home/travis/.m2/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb && \ +RUN apt-get update && apt-get install -y librados2 librados-dev libcephfs-dev librbd-dev curl fuse procps iputils-ping strace iproute2 net-tools tcpdump lsof && \ rm -rf /var/cache/apt/* && \ curl -sSL https://juicefs.com/static/juicefs -o ${JUICEFS_CLI} && chmod +x ${JUICEFS_CLI} && \ mkdir -p /root/.juicefs && \ diff --git a/docker/ce.juicefs.Dockerfile b/docker/ce.juicefs.Dockerfile index b935649f54..0b8d1a1542 100644 --- a/docker/ce.juicefs.Dockerfile +++ b/docker/ce.juicefs.Dockerfile @@ -20,16 +20,18 @@ ARG JUICEFS_REPO_URL=https://github.com/juicedata/juicefs ARG JUICEFS_REPO_BRANCH=main ARG JUICEFS_REPO_REF=${JUICEFS_REPO_BRANCH} -WORKDIR /workspace -ENV GOPROXY=${GOPROXY:-https://proxy.golang.org} -RUN mkdir -p /home/travis/.m2 && \ +RUN if [ ${TARGETARCH} -eq amd64 ]; then mkdir -p /home/travis/.m2 && \ wget -O /home/travis/.m2/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb && \ dpkg -i /home/travis/.m2/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb && \ wget -O - https://download.gluster.org/pub/gluster/glusterfs/7/rsa.pub | apt-key add - && \ echo deb [arch=${TARGETARCH}] https://download.gluster.org/pub/gluster/glusterfs/7/LATEST/Debian/buster/${TARGETARCH}/apt buster main > /etc/apt/sources.list.d/gluster.list && \ - apt-get update && apt-get install -y musl-tools upx-ucl librados-dev libcephfs-dev librbd-dev uuid-dev libglusterfs-dev glusterfs-common && \ + apt-get update && apt-get install -y uuid-dev libglusterfs-dev glusterfs-common; fi + +WORKDIR /workspace +ENV GOPROXY=${GOPROXY:-https://proxy.golang.org} +RUN apt-get update && apt-get install -y musl-tools upx-ucl librados-dev libcephfs-dev librbd-dev && \ cd /workspace && git clone --branch=$JUICEFS_REPO_BRANCH $JUICEFS_REPO_URL && \ cd juicefs && git checkout $JUICEFS_REPO_REF && go get github.com/ceph/go-ceph@v0.4.0 && go mod tidy && \ - make juicefs.all && mv juicefs.all juicefs && mv juicefs /usr/local/bin/juicefs + if [ ${TARGETARCH} -eq amd64 ]; then make juicefs.all && mv juicefs.all juicefs; else make juicefs.ceph && mv juicefs.ceph juicefs; fi && mv juicefs /usr/local/bin/juicefs RUN ln -s /usr/local/bin/juicefs /bin/mount.juicefs && /usr/local/bin/juicefs --version diff --git a/docker/dev.juicefs.Dockerfile b/docker/dev.juicefs.Dockerfile index 682e596978..c0849e7885 100644 --- a/docker/dev.juicefs.Dockerfile +++ b/docker/dev.juicefs.Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.18-buster as builder +FROM golang:1.19-buster as builder ARG GOPROXY diff --git a/docker/fuse.Dockerfile b/docker/fuse.Dockerfile index 3dad84e7ce..e9e7decf2a 100644 --- a/docker/fuse.Dockerfile +++ b/docker/fuse.Dockerfile @@ -1,19 +1,23 @@ -FROM golang:1.18-buster as builder +FROM golang:1.19-buster as builder ARG GOPROXY +ARG TARGETARCH ARG JUICEFS_REPO_BRANCH=main ARG JUICEFS_REPO_REF=${JUICEFS_REPO_BRANCH} -RUN apt update && apt install -y software-properties-common wget gnupg gnupg2 && apt update && \ - wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add - && \ - apt-add-repository 'deb https://download.ceph.com/debian-pacific/ buster main' && \ - apt update +RUN if [ ${TARGETARCH} -eq amd64 ]; then mkdir -p /home/travis/.m2 && \ + wget -O /home/travis/.m2/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb && \ + dpkg -i /home/travis/.m2/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb && \ + wget -O - https://download.gluster.org/pub/gluster/glusterfs/7/rsa.pub | apt-key add - && \ + echo deb [arch=${TARGETARCH}] https://download.gluster.org/pub/gluster/glusterfs/7/LATEST/Debian/buster/${TARGETARCH}/apt buster main > /etc/apt/sources.list.d/gluster.list && \ + apt-get update && apt-get install -y uuid-dev libglusterfs-dev glusterfs-common; fi WORKDIR /workspace ENV GOPROXY=${GOPROXY:-https://proxy.golang.org} RUN apt-get update && apt-get install -y musl-tools upx-ucl librados-dev libcephfs-dev librbd-dev && \ cd /workspace && git clone --branch=$JUICEFS_REPO_BRANCH https://github.com/juicedata/juicefs && \ - cd juicefs && git checkout $JUICEFS_REPO_REF && make juicefs.ceph && mv juicefs.ceph juicefs + cd juicefs && git checkout $JUICEFS_REPO_REF && go get github.com/ceph/go-ceph@v0.4.0 && go mod tidy && \ + if [ ${TARGETARCH} -eq amd64 ]; then make juicefs.all && mv juicefs.all juicefs; else make juicefs.ceph && mv juicefs.ceph juicefs; fi FROM python:3.8-slim-buster @@ -30,9 +34,15 @@ ENV JFSCHAN=${JFSCHAN} RUN apt update && apt install -y software-properties-common wget gnupg gnupg2 && apt update && \ wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add - && \ - apt-add-repository 'deb https://download.ceph.com/debian-pacific/ buster main' && \ - apt update -RUN apt-get update && apt-get install -y librados2 curl fuse librados-dev libcephfs-dev librbd-dev && \ + apt-add-repository 'deb https://download.ceph.com/debian-pacific/ buster main' && apt update && \ + if [ ${TARGETARCH} -eq amd64 ]; then mkdir -p /home/travis/.m2 && \ + wget -O /home/travis/.m2/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb https://github.com/apple/foundationdb/releases/download/6.3.23/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb && \ + dpkg -i /home/travis/.m2/foundationdb-clients_6.3.23-1_${TARGETARCH}.deb && \ + wget -O - https://download.gluster.org/pub/gluster/glusterfs/7/rsa.pub | apt-key add - && \ + echo deb [arch=${TARGETARCH}] https://download.gluster.org/pub/gluster/glusterfs/7/LATEST/Debian/buster/${TARGETARCH}/apt buster main > /etc/apt/sources.list.d/gluster.list && \ + apt-get update && apt-get install -y uuid-dev libglusterfs-dev glusterfs-common; fi + +RUN apt-get update && apt-get install -y librados2 librados-dev libcephfs-dev librbd-dev curl fuse procps iputils-ping strace iproute2 net-tools tcpdump lsof && \ rm -rf /var/cache/apt/* && \ curl -sSL https://juicefs.com/static/juicefs -o ${JUICEFS_CLI} && chmod +x ${JUICEFS_CLI} && \ mkdir -p /root/.juicefs && \