justlog/Dockerfile

24 lines
474 B
Text
Raw Normal View History

2021-11-23 12:13:46 +01:00
FROM quay.io/goswagger/swagger:latest
WORKDIR /app
2019-05-17 21:24:35 +02:00
COPY . .
2021-11-23 12:13:46 +01: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 12:13:46 +01:00
COPY --from=1 /app .
2019-05-17 21:24:35 +02: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 12:13:46 +01:00
COPY --from=2 /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