justlog/Dockerfile

24 lines
474 B
Text
Raw Normal View History

2021-11-23 08:13:46 -03:00
FROM quay.io/goswagger/swagger:latest
WORKDIR /app
2019-05-17 15:24:35 -04:00
COPY . .
2021-11-23 08:13:46 -03:00
RUN make docs
FROM node:16-alpine
WORKDIR /app
COPY --from=0 /app .
WORKDIR /app/web
RUN yarn install
RUN yarn build
FROM golang:latest
WORKDIR /app
2021-11-23 08:13:46 -03:00
COPY --from=1 /app .
2019-05-17 15:24:35 -04:00
RUN go get ./...
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
2021-11-23 08:13:46 -03:00
COPY --from=2 /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