Shioriko/Dockerfile

26 lines
564 B
Docker
Raw 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
2021-05-09 15:07:23 +00:00
RUN mkdir -p /web && cp -r web/static web/template /web
2021-05-10 15:47:35 +00:00
FROM node:14-alpine AS node_build
WORKDIR /src
COPY . .
WORKDIR /src/web/app
RUN yarn install && yarn build
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/
COPY --from=node_build /src/web/template/ /app/web/template/
2021-05-09 15:07:23 +00:00
2021-05-10 15:47:35 +00:00
ENTRYPOINT ["/app/shioriko"]