hibiscus/Dockerfile

28 lines
482 B
Docker
Raw Permalink Normal View History

2024-03-18 18:37:38 +03:00
# syntax=docker/dockerfile:1
2024-06-02 01:22:08 +03:00
FROM golang:1.22-alpine AS build-stage
2024-03-18 18:37:38 +03:00
WORKDIR /app
2024-05-18 18:43:05 +03:00
# Copy embeded dirs
COPY public public/
COPY pages pages/
COPY i18n i18n/
2024-03-18 18:37:38 +03:00
# Setup and compile Go
COPY go.mod go.sum ./
RUN go mod download
COPY *.go ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /hibiscus
2024-06-02 01:22:08 +03:00
FROM alpine:3.20 AS deploy-stage
2024-03-18 18:37:38 +03:00
WORKDIR /
# Bring over the executable
COPY --from=build-stage /hibiscus /hibiscus
2024-05-18 16:15:20 +03:00
# Data dirs
2024-05-04 15:56:04 +03:00
VOLUME /data
VOLUME /config
2024-03-18 18:37:38 +03:00
EXPOSE 7101
ENTRYPOINT ["/hibiscus"]