-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
36 lines (28 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM ubuntu:22.04 as base
RUN set -eux; \
apt update; \
apt install -y wget gnupg; \
wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add -; \
echo 'deb http://mirrors.ustc.edu.cn/ceph/debian-reef/ jammy main' > /etc/apt/sources.list.d/ceph.list; \
apt update; \
apt install -y librados2 fuse; \
rm -rf /var/lib/apt/lists/*
FROM base as build
ENV GOPROXY=https://goproxy.cn
ENV PATH /usr/local/go/bin:$PATH
ENV GOVERSION=go1.22.5
ENV JFSVERSION=v1.2.0
WORKDIR /tmp
RUN set -eux; \
apt update; \
apt install -y librados-dev make gcc; \
wget https://go.dev/dl/${GOVERSION}.linux-amd64.tar.gz; \
tar -C /usr/local -xzf ${GOVERSION}.linux-amd64.tar.gz; \
wget https://github.com/juicedata/juicefs/archive/refs/tags/${JFSVERSION}.tar.gz; \
mkdir /usr/local/jfs; \
tar -C /usr/local/jfs -xzf ${JFSVERSION}.tar.gz --strip-components 1; \
cd /usr/local/jfs; \
make juicefs.ceph
FROM base
COPY --from=build /usr/local/jfs/juicefs.ceph /usr/local/bin/juicefs
ENTRYPOINT ["/usr/local/bin/juicefs"]