-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
45 lines (41 loc) · 943 Bytes
/
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
FROM alpine:3.18 AS s3fs-builder
ARG S3FS_VERSION=v1.93
RUN apk --no-cache add \
ca-certificates \
build-base \
git \
alpine-sdk \
libcurl \
automake \
autoconf \
libxml2-dev \
mailcap \
fuse-dev \
curl-dev \
&& git clone https://github.com/s3fs-fuse/s3fs-fuse.git \
&& cd s3fs-fuse \
&& git checkout tags/${S3FS_VERSION} \
&& ./autogen.sh \
&&./configure --prefix=/usr \
&& make -j \
&& make install \
&& strip /usr/bin/s3fs
FROM golang:1.21-alpine as builder
RUN apk add git make binutils
COPY / /work
WORKDIR /work
RUN make
FROM alpine:3.18
RUN apk --no-cache add \
ca-certificates \
mailcap \
fuse \
libxml2 \
libcurl \
libgcc \
libstdc++ \
util-linux
COPY --from=s3fs-builder /usr/bin/s3fs /usr/bin/s3fs
RUN /usr/bin/s3fs --version
COPY --from=builder /work/bin/s3driver /s3driver
ENTRYPOINT ["/s3driver"]