wiki/Dockerfile

17 lines
456 B
Docker
Raw Normal View History

2019-02-05 20:28:37 +00:00
# build stage
FROM golang:1.10.2-alpine3.7 AS build-env
RUN apk --no-cache add git
2019-03-16 19:07:14 +00:00
RUN go get -u p83.nl/go/wiki/...
RUN go test p83.nl/go/wiki/...
2019-02-05 20:28:37 +00:00
# final stage
FROM alpine
RUN apk --no-cache add ca-certificates git
2019-02-25 17:55:06 +00:00
RUN adduser --disabled-password --uid 1005 wiki
2019-02-05 20:28:37 +00:00
EXPOSE 80
COPY --from=build-env /go/bin/wiki /app/
RUN ["mkdir", "/app/templates"]
COPY --from=build-env /go/src/p83.nl/go/wiki/templates /app/templates
WORKDIR /app
ENTRYPOINT ["/app/wiki"]