TinySkin/Dockerfile
thehrz 5b10e2fc38
Some checks failed
CI / release-image (push) Failing after 3m12s
pref: updare ci.yml
2025-04-13 00:24:34 +08:00

26 lines
518 B
Docker

FROM node:20-alpine AS frontend-stage
WORKDIR /app
RUN corepack enable
COPY frontend/package.json frontend/pnpm-lock.yaml ./
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \
pnpm install --frozen-lockfile
COPY frontend .
RUN pnpm build
FROM golang:1.23-alpine AS build-stage
WORKDIR /app
ENV GOPROXY https://goproxy.cn,direct
COPY --from=frontend-stage /app/dist ./server/static/files
COPY . .
RUN go build -o app .
VOLUME /app/config
ENTRYPOINT ["/app/app", "-c", "./config/config.toml"]