Shioriko/Dockerfile

25 lines
520 B
Docker
Raw Normal View History

2021-05-09 15:07:23 +00:00
FROM golang:1.16-alpine AS build
WORKDIR /go/src/shioriko
COPY . .
RUN go get -d -v ./...
2021-05-10 15:47:35 +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
FROM alpine AS runtime
2021-05-10 02:45:40 +00:00
2021-05-10 15:47:35 +00:00
RUN mkdir -p /app/web
WORKDIR /app
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"]