Skip to content

Commit

Permalink
fix Dockerfile for arm (#689)
Browse files Browse the repository at this point in the history
  • Loading branch information
zwwhdls authored Jul 13, 2023
1 parent 56f2440 commit 255200f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 28 deletions.
25 changes: 12 additions & 13 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected] && 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

Expand All @@ -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 && \
Expand Down
12 changes: 7 additions & 5 deletions docker/ce.juicefs.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected] && 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
2 changes: 1 addition & 1 deletion docker/dev.juicefs.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
28 changes: 19 additions & 9 deletions docker/fuse.Dockerfile
Original file line number Diff line number Diff line change
@@ -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/[email protected] && 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

Expand All @@ -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 && \
Expand Down

0 comments on commit 255200f

Please sign in to comment.