justlog/Dockerfile

24 lines
545 B
Text
Raw Normal View History

FROM quay.io/goswagger/swagger:latest as build-docs
WORKDIR /app
2019-05-17 15:24:35 -04:00
COPY . .
2021-11-23 08:13:46 -03: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 15:24:35 -04:00
FROM alpine:latest
2019-05-17 15:24:35 -04:00
RUN apk --no-cache add ca-certificates
COPY --from=build-app /app/app .
2021-11-23 08:40:31 -03:00
USER 1000:1000
2019-05-17 15:54:38 -04:00
CMD ["./app", "--config=/etc/justlog.json"]
2019-05-17 15:24:35 -04:00
EXPOSE 8025