-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (33 loc) · 1.21 KB
/
Dockerfile
File metadata and controls
40 lines (33 loc) · 1.21 KB
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
FROM golang:alpine AS build
WORKDIR /go/src/app
RUN mkdir -p /go/src/app/github.com/kahing/goofys/ && \
mkdir -p /mnt/s3 && \
export GOOFYS_HOME=/go/src/app/github.com/kahing/goofys/
RUN apk update && apk add git
RUN cd /go/src/app/github.com/kahing/ && \
git clone https://github.com/kahing/goofys.git && \
cd /go/src/app/github.com/ && \
go get github.com/Azure/azure-pipeline-go && \
cd /go/src/app/github.com/kahing/goofys && \
git submodule init && \
git submodule update && \
go install /go/src/app/github.com/kahing/goofys
FROM alpine:latest
ENV UID=0
ENV GID=0
ENV FILEMOD=0664
ENV DIRMODE=0664
ENV ENDPOINT=https://storage.yandexcloud.net
ENV BACKETNAME=goofys
ENV MOUNTPOINT=/mnt/s3
ENV CREDPOINT=/root/.aws/credentials
ENV HOME=/root
ENV S3FS_ARGS=''
VOLUME [ "/mnt/s3" ]
COPY --from=build /go/bin/goofys /bin/goofys
COPY --from=build /go/src/app/github.com/kahing/goofys /go/goofys
RUN apk add --no-cache fuse
RUN export GOOFYS_HOME=/go/src/app/github.com/kahing/goofys/ \
&& export HOME=${HOME}
ENTRYPOINT [ "/bin/sh", "-c" ]
CMD ["/bin/goofys -f --endpoint=${ENDPOINT} --uid=${UID} --gid=${GID} --file-mode=${FILEMOD} --dir-mode=${DIRMODE} ${S3FS_ARGS} ${BACKETNAME} ${MOUNTPOINT}"]