webfs/Dockerfile

19 lines
369 B
Docker
Raw Permalink Normal View History

2023-03-04 13:27:15 -07:00
FROM golang:1-alpine AS build
2023-03-04 11:17:11 -07:00
WORKDIR /src
COPY go.* ./
2023-03-04 13:27:15 -07:00
RUN go mod download -x
2023-03-04 11:17:11 -07:00
COPY cmd ./cmd/
2023-04-02 13:04:30 -06:00
RUN go install ./...
2023-03-04 11:49:39 -07:00
2023-04-02 17:30:02 -06:00
FROM alpine:edge AS runtime
2023-03-04 11:49:39 -07:00
WORKDIR /target
2023-03-04 13:27:15 -07:00
COPY web web
2023-03-04 11:49:39 -07:00
COPY --from=build /go/bin/ .
2023-04-02 17:30:02 -06:00
# Alpine edge has ffmpeg 6 with jpeg rotation bugfix
FROM alpine:edge
RUN apk --no-cache add ffmpeg
2023-03-04 11:49:39 -07:00
COPY --from=runtime /target /
2023-03-04 13:27:15 -07:00
WORKDIR /web
2023-03-04 11:49:39 -07:00
ENTRYPOINT ["/webfs"]