netflux-homepage/Dockerfile

33 lines
574 B
Docker
Raw Normal View History

2024-11-20 19:36:36 +00:00
FROM golang:1.23-alpine3.20 AS go-builder
ENV GOPATH=""
2022-06-06 16:48:53 +00:00
RUN apk add git
WORKDIR /app
ADD go.mod go.sum ./
RUN go mod download
ADD ./ .
RUN go build -o ./server .
2024-11-20 19:36:36 +00:00
FROM hugomods/hugo:latest AS blog-builder
WORKDIR /app
RUN apk update && \
apk add git && \
git clone https://git.netflux.io/rob/netflux-blog blog && \
cd blog && \
git submodule update --init --recursive && \
hugo
2022-06-06 16:48:53 +00:00
FROM alpine:3.14
COPY --from=go-builder /app/server /app/server
2024-11-20 19:36:36 +00:00
COPY --from=blog-builder /app/blog/public /www/html
ENV NETFLUX_ROOT_PATH=/www/html
2022-06-06 16:48:53 +00:00
ENTRYPOINT ["/app/server"]