Shioriko/Dockerfile

25 lines
513 B
Docker
Raw Permalink Normal View History

2023-06-14 13:08:25 +00:00
FROM golang:1.20-alpine AS build
2021-05-09 15:07:23 +00:00
WORKDIR /go/src/shioriko
COPY . .
2021-05-11 12:49:00 +00:00
RUN apk add vips-dev pkgconfig gcc musl-dev
2021-05-09 15:07:23 +00:00
RUN go get -d -v ./...
2021-05-11 12:21:11 +00:00
RUN go build -o /shioriko
RUN mkdir -p /web && cp -r web/static /web
2021-05-09 15:07:23 +00:00
2023-08-08 17:29:38 +00:00
FROM node:18-alpine AS node_build
2021-05-10 15:47:35 +00:00
WORKDIR /src
COPY . .
WORKDIR /src/web/app
2023-08-08 17:30:53 +00:00
RUN npm install -g pnpm && pnpm install && pnpm build
2021-05-10 15:47:35 +00:00
2021-05-11 12:21:11 +00:00
FROM alpine AS runtime
2021-05-10 02:45:40 +00:00
2021-05-10 15:47:35 +00:00
WORKDIR /app
2021-05-11 12:21:11 +00:00
RUN apk add vips
2021-05-11 10:33:22 +00:00
COPY --from=build /shioriko /app/
COPY --from=node_build /src/web/static/ /app/web/static/
2021-05-09 15:07:23 +00:00
2021-05-10 15:47:35 +00:00
ENTRYPOINT ["/app/shioriko"]