You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
podgrab/Dockerfile

38 lines
653 B

ARG GO_VERSION=1.15.2
FROM golang:${GO_VERSION}-alpine AS builder
RUN apk update && apk add alpine-sdk git && rm -rf /var/cache/apk/*
RUN mkdir -p /api
WORKDIR /api
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN go build -o ./app ./main.go
FROM alpine:latest
ENV CONFIG=/config
ENV DATA=/assets
ENV UID=998
ENV PID=100
VOLUME ["/config", "/assets"]
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
RUN mkdir -p /config; \
mkdir -p /assets; \
mkdir -p /api
RUN chmod 777 /config; \
chmod 777 /assets
WORKDIR /api
COPY --from=builder /api/app .
COPY client ./client
EXPOSE 8080
ENTRYPOINT ["./app"]