-
Notifications
You must be signed in to change notification settings - Fork 556
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #264 from lapwat/master
bug: Docker build
- Loading branch information
Showing
1 changed file
with
11 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
FROM golang:1.13-alpine as builder | ||
|
||
RUN apk update && apk --no-cache add git build-base | ||
RUN go get -u -v github.com/go-shiori/shiori | ||
|
||
# ========== END OF BUILDER ========== # | ||
|
||
FROM alpine:latest | ||
|
||
RUN apk update && apk --no-cache add dumb-init ca-certificates | ||
COPY --from=builder /go/bin/shiori /usr/local/bin/shiori | ||
|
||
# build stage | ||
FROM golang:alpine AS builder | ||
RUN apk add --no-cache build-base | ||
WORKDIR /src | ||
COPY . . | ||
RUN go build | ||
|
||
# server image | ||
FROM golang:alpine | ||
COPY --from=builder /src/shiori /usr/local/bin/ | ||
ENV SHIORI_DIR /srv/shiori/ | ||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] | ||
CMD ["/usr/local/bin/shiori", "serve"] | ||
CMD ["/usr/local/bin/shiori", "serve"] |