GoBlog/Dockerfile

20 lines
615 B
Docker
Raw Normal View History

2021-02-17 07:23:03 +00:00
FROM golang:1.16-alpine3.13 as build
2020-09-24 17:04:28 +00:00
WORKDIR /app
2021-04-14 19:59:40 +00:00
RUN apk add --no-cache git gcc musl-dev
RUN apk add --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main sqlite-dev
ADD *.go go.mod go.sum /app/
2020-11-15 10:34:48 +00:00
RUN go build --tags "libsqlite3 linux sqlite_fts5"
2020-09-24 17:04:28 +00:00
2021-02-08 19:33:48 +00:00
FROM alpine:3.13
2020-09-24 17:04:28 +00:00
WORKDIR /app
VOLUME /app/config
VOLUME /app/data
EXPOSE 80
EXPOSE 443
EXPOSE 8080
CMD ["GoBlog"]
2021-04-11 14:08:29 +00:00
HEALTHCHECK --interval=1m --timeout=10s CMD GoBlog healthcheck
2021-04-14 19:59:40 +00:00
RUN apk add --no-cache tzdata tor
RUN apk add --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main sqlite-dev
2021-04-11 14:08:29 +00:00
COPY templates/ /app/templates/
COPY --from=build /app/GoBlog /bin/