add production stage
This commit is contained in:
parent
08403ca845
commit
66d9ecf387
1 changed files with 11 additions and 2 deletions
13
Dockerfile
13
Dockerfile
|
@ -16,12 +16,21 @@ RUN mkdir -p \
|
||||||
cp -r templates/ pages/ static/ /home/writefreely && \
|
cp -r templates/ pages/ static/ /home/writefreely && \
|
||||||
cp config.ini.example /home/writefreely/config.ini
|
cp config.ini.example /home/writefreely/config.ini
|
||||||
|
|
||||||
FROM alpine AS final
|
FROM alpine AS dev
|
||||||
|
|
||||||
# TODO user nobody or similar
|
|
||||||
COPY --from=build /src/cmd/writefreely/writefreely /bin
|
COPY --from=build /src/cmd/writefreely/writefreely /bin
|
||||||
COPY --from=build /home /home
|
COPY --from=build /home /home
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
WORKDIR /home/writefreely
|
WORKDIR /home/writefreely
|
||||||
ENTRYPOINT [ "writefreely" ]
|
ENTRYPOINT [ "writefreely" ]
|
||||||
|
|
||||||
|
FROM alpine AS prod
|
||||||
|
|
||||||
|
|
||||||
|
RUN apk add ca-certificates openssl
|
||||||
|
COPY --from=dev . .
|
||||||
|
|
||||||
|
EXPOSE 80 443
|
||||||
|
WORKDIR /home/writefreely
|
||||||
|
ENTRYPOINT [ "writefreely" ]
|
Loading…
Add table
Reference in a new issue