2023-01-31 16:16:21 +00:00
|
|
|
# syntax=docker/dockerfile:1
|
2024-08-12 10:26:53 +00:00
|
|
|
FROM --platform=$BUILDPLATFORM node:20.16.0-alpine AS frontendbuilder
|
2018-09-08 13:08:33 +00:00
|
|
|
|
2024-02-09 12:41:34 +00:00
|
|
|
WORKDIR /build
|
|
|
|
|
2024-08-29 09:19:46 +00:00
|
|
|
ENV PNPM_CACHE_FOLDER=.cache/pnpm/
|
|
|
|
ENV PUPPETEER_SKIP_DOWNLOAD=true
|
|
|
|
ENV CYPRESS_INSTALL_BINARY=0
|
2024-02-09 12:41:34 +00:00
|
|
|
|
|
|
|
COPY frontend/ ./
|
|
|
|
|
|
|
|
RUN corepack enable && \
|
|
|
|
pnpm install && \
|
|
|
|
pnpm run build
|
|
|
|
|
|
|
|
FROM --platform=$BUILDPLATFORM techknowlogick/xgo:go-1.21.x AS apibuilder
|
2022-08-03 15:54:21 +00:00
|
|
|
|
2023-01-31 16:16:21 +00:00
|
|
|
RUN go install github.com/magefile/mage@latest && \
|
|
|
|
mv /go/bin/mage /usr/local/go/bin
|
2018-09-08 13:08:33 +00:00
|
|
|
|
2022-08-03 10:44:18 +00:00
|
|
|
WORKDIR /go/src/code.vikunja.io/api
|
2023-01-31 16:16:21 +00:00
|
|
|
COPY . ./
|
2024-02-09 12:41:34 +00:00
|
|
|
COPY --from=frontendbuilder /build/dist ./frontend/dist
|
2018-09-08 13:08:33 +00:00
|
|
|
|
2022-11-12 13:29:57 +00:00
|
|
|
ARG TARGETOS TARGETARCH TARGETVARIANT
|
2018-09-08 13:08:33 +00:00
|
|
|
|
2024-08-29 09:19:46 +00:00
|
|
|
ENV GOPROXY=https://goproxy.kolaente.de
|
2023-04-02 16:55:30 +00:00
|
|
|
RUN export PATH=$PATH:$GOPATH/bin && \
|
|
|
|
mage build:clean && \
|
2023-01-31 16:16:21 +00:00
|
|
|
mage release:xgo "${TARGETOS}/${TARGETARCH}/${TARGETVARIANT}"
|
|
|
|
|
|
|
|
# ┬─┐┬ ┐┌┐┐┌┐┐┬─┐┬─┐
|
|
|
|
# │┬┘│ │││││││├─ │┬┘
|
|
|
|
# ┘└┘┘─┘┘└┘┘└┘┴─┘┘└┘
|
|
|
|
|
2019-06-02 14:37:10 +00:00
|
|
|
# The actual image
|
2024-02-25 21:49:04 +00:00
|
|
|
FROM scratch
|
2024-08-29 09:19:21 +00:00
|
|
|
|
|
|
|
LABEL org.opencontainers.image.authors='maintainers@vikunja.io'
|
|
|
|
LABEL org.opencontainers.image.url='https://vikunja.io'
|
|
|
|
LABEL org.opencontainers.image.documentation='https://vikunja.io/docs'
|
|
|
|
LABEL org.opencontainers.image.source='https://code.vikunja.io/vikunja'
|
|
|
|
LABEL org.opencontainers.image.licenses='AGPLv3'
|
|
|
|
LABEL org.opencontainers.image.title='Vikunja'
|
|
|
|
|
2023-01-31 16:16:21 +00:00
|
|
|
WORKDIR /app/vikunja
|
2024-02-25 21:49:04 +00:00
|
|
|
ENTRYPOINT [ "/app/vikunja/vikunja" ]
|
2023-02-01 17:39:57 +00:00
|
|
|
EXPOSE 3456
|
2024-02-25 21:49:04 +00:00
|
|
|
USER 1000
|
2018-09-08 13:08:33 +00:00
|
|
|
|
2018-11-02 10:01:28 +00:00
|
|
|
ENV VIKUNJA_SERVICE_ROOTPATH=/app/vikunja/
|
2024-02-25 21:49:04 +00:00
|
|
|
ENV VIKUNJA_DATABASE_PATH=/db/vikunja.db
|
2023-01-31 16:16:21 +00:00
|
|
|
|
2024-02-09 12:41:34 +00:00
|
|
|
COPY --from=apibuilder /build/vikunja-* vikunja
|
2024-03-02 10:48:14 +00:00
|
|
|
COPY --from=apibuilder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|