-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
50 lines (33 loc) · 1.22 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
ARG BUILDER_IMAGE=alpine:3.21.2
ARG RUNTIME_IMAGE=alpine:3.21.2
FROM $BUILDER_IMAGE AS builder
RUN apk add --no-cache --update-cache --upgrade \
autoconf \
automake \
curl \
fuse-dev \
g++ \
make \
tar
ARG UNRAR_VERSION=7.1.3
ARG RAR2FS_VERSION=1.29.7
RUN curl --location --remote-name --remote-header-name "https://www.rarlab.com/rar/unrarsrc-$UNRAR_VERSION.tar.gz"
RUN curl --location --remote-name --remote-header-name "https://github.com/hasse69/rar2fs/archive/refs/tags/v$RAR2FS_VERSION.tar.gz"
WORKDIR /rar2fs
RUN tar --strip-components 1 --extract --gzip --verbose --file "/rar2fs-$RAR2FS_VERSION.tar.gz"
RUN tar --extract --gzip --verbose --file "/unrarsrc-$UNRAR_VERSION.tar.gz"
WORKDIR /rar2fs/unrar
RUN make lib
WORKDIR /rar2fs
RUN autoreconf --force --install && ./configure && make
FROM $RUNTIME_IMAGE
ARG FUSE_THREAD_STACK=320000
ENV FUSE_THREAD_STACK=$FUSE_THREAD_STACK
RUN apk add --no-cache --update-cache --upgrade \
fuse \
libstdc++
COPY --from=builder /rar2fs/src/rar2fs /usr/local/bin/rar2fs
ENTRYPOINT [ "rar2fs" ]
HEALTHCHECK --interval=5s --timeout=3s \
CMD grep -qs rar2fs /proc/mounts
CMD [ "-f", "-o", "allow_other", "-o", "auto_unmount", "--seek-length=1", "/source", "/destination" ]