GoBlog/Dockerfile

17 lines
408 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
RUN apk add --no-cache git gcc musl-dev sqlite-dev
WORKDIR /app
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
2021-03-19 09:10:47 +00:00
RUN apk add --no-cache sqlite-dev tzdata tor
2020-09-24 17:04:28 +00:00
COPY templates/ /app/templates/
WORKDIR /app
VOLUME /app/config
VOLUME /app/data
EXPOSE 80
EXPOSE 443
EXPOSE 8080
CMD ["GoBlog"]
COPY --from=build /app/GoBlog /bin/