tstor/Dockerfile
Antonio Navarro Perez 0a4438b1ad
Docker image (#22)
- Config file now is inside a config folder by default, to make easier
docker integration.
- File not found errors now are debug log outputs.
- Added dependabot integration for github action versions.

Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2020-11-14 16:28:50 +01:00

33 lines
632 B
Docker

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