1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-30 03:36:16 +00:00
mycorrhiza/Dockerfile
decentral1se 5d8eaef6d7
Use -Ns for curl on healtcheck (#206)
Otherwise, it doesn't work.
2023-10-17 12:10:32 +03:00

21 lines
353 B
Docker

FROM golang:alpine as build
WORKDIR src
COPY . .
ENV CGO_ENABLED=0
RUN go build -o /out/mycorrhiza .
FROM alpine/git as app
EXPOSE 1737
RUN apk add --no-cache curl
HEALTHCHECK CMD curl -Ns localhost:1737 || exit 1
WORKDIR /
RUN mkdir wiki
COPY --from=build /out/mycorrhiza /usr/bin
WORKDIR /wiki
VOLUME /wiki
ENTRYPOINT ["mycorrhiza"]
CMD ["/wiki"]