tstor/Dockerfile

34 lines
584 B
Text
Raw Normal View History

#===============
# Stage 1: Build
#===============
FROM golang:1.20-alpine as builder
2023-10-08 16:46:03 +00:00
ENV BIN_REPO=git.kmsign.ru/royalcat/tstor
ENV BIN_PATH=$GOPATH/src/$BIN_REPO
COPY . $BIN_PATH
WORKDIR $BIN_PATH
RUN apk add fuse-dev git gcc libc-dev g++ make
2023-10-08 16:46:03 +00:00
RUN BIN_OUTPUT=/bin/tstor make build
#===============
# Stage 2: Run
#===============
FROM alpine:3
RUN apk add gcc libc-dev fuse-dev
2023-10-08 16:46:03 +00:00
COPY --from=builder /bin/tstor /bin/tstor
RUN chmod +x /bin/tstor
2023-10-08 16:46:03 +00:00
RUN mkdir /tstor-data
RUN echo "user_allow_other" >> /etc/fuse.conf
2023-10-08 16:46:03 +00:00
ENV tstor_FUSE_ALLOW_OTHER=true
2023-10-08 16:46:03 +00:00
ENTRYPOINT ["./bin/tstor"]