tstor/Dockerfile
royalcat 5a77fa5e9c
Some checks failed
CodeQL / Analyze (go) (push) Failing after 3m5s
CodeQL / Analyze (javascript) (push) Failing after 1m19s
mkdocs / mkdocs (push) Failing after 1m19s
docker / build-docker (inux/arm/v6) (push) Failing after 6s
docker / build-docker (linux/386) (push) Failing after 5s
docker / build-docker (linux/amd64) (push) Failing after 4s
docker / build-docker (linux/arm/v7) (push) Failing after 5s
docker / build-docker (linux/arm64) (push) Failing after 5s
[ci] update and refactor
2023-10-13 11:03:02 +03:00

33 lines
577 B
Docker

#===============
# Stage 1: Build
#===============
FROM golang:1.20 as builder
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
RUN BIN_OUTPUT=/bin/tstor make build
#===============
# Stage 2: Run
#===============
FROM alpine:3
RUN apk add gcc libc-dev fuse-dev
COPY --from=builder /bin/tstor /bin/tstor
RUN chmod +x /bin/tstor
RUN mkdir /tstor-data
RUN echo "user_allow_other" >> /etc/fuse.conf
ENV tstor_FUSE_ALLOW_OTHER=true
ENTRYPOINT ["./bin/tstor"]