justlog/Dockerfile

24 lines
545 B
Text
Raw Permalink Normal View History

FROM quay.io/goswagger/swagger:latest as build-docs
WORKDIR /app
2019-05-17 21:24:35 +02:00
COPY . .
2021-11-23 12:13:46 +01:00
RUN make docs
FROM node:18-alpine as build-web
WORKDIR /web
COPY web .
COPY --from=build-docs /app/web/public/swagger.json /web/public
RUN yarn install --ignore-optional
RUN yarn build
FROM golang:alpine as build-app
WORKDIR /app
COPY . .
COPY --from=build-web /web/dist /app/web/dist
RUN go build -o app .
2019-05-17 21:24:35 +02:00
FROM alpine:latest
2019-05-17 21:24:35 +02:00
RUN apk --no-cache add ca-certificates
COPY --from=build-app /app/app .
2021-11-23 12:40:31 +01:00
USER 1000:1000
2019-05-17 21:54:38 +02:00
CMD ["./app", "--config=/etc/justlog.json"]
2019-05-17 21:24:35 +02:00
EXPOSE 8025