Files
mochi/Dockerfile
Lawrence, Rendall 05fe8e113a Update README
2022-04-14 12:23:13 +03:00

27 lines
616 B
Docker

FROM golang:alpine AS build-env
LABEL maintainer "SOT-TECH <service@sot-te.ch>"
# Install OS-level dependencies.
RUN apk add --no-cache curl git
# Copy our source code into the container.
WORKDIR /go/src/github.com/sot-tech/mochi
COPY . /go/src/github.com/sot-tech/mochi
# Install our golang dependencies and compile our binary.
RUN CGO_ENABLED=0 go install ./cmd/mochi
FROM alpine:latest
RUN apk add --no-cache ca-certificates
COPY --from=build-env /go/bin/mochi /mochi
RUN adduser -D mochi
# Expose a docker interface to our binary.
EXPOSE 6880 6969
# Drop root privileges
USER mochi
ENTRYPOINT ["/mochi"]