2022-07-13 15:52:25 -07:00
|
|
|
FROM golang:1.18.4 as build
|
2022-04-02 12:05:32 -07:00
|
|
|
|
|
|
|
COPY . /app
|
|
|
|
WORKDIR /app
|
|
|
|
RUN go build .
|
2022-06-08 21:17:08 -07:00
|
|
|
RUN go install github.com/pressly/goose/v3/cmd/goose@latest
|
2022-04-02 12:05:32 -07:00
|
|
|
|
2022-07-13 15:52:25 -07:00
|
|
|
FROM alpine:latest as app
|
2022-04-02 12:05:32 -07:00
|
|
|
|
2022-07-14 14:27:40 -07:00
|
|
|
RUN apk --no-cache add bash
|
|
|
|
RUN apk --no-cache add libc6-compat
|
|
|
|
RUN apk --no-cache add chromium
|
|
|
|
|
2022-07-13 15:52:25 -07:00
|
|
|
RUN mkdir /app && mkdir /app/migrations
|
2022-04-02 12:09:43 -07:00
|
|
|
COPY --from=build /app/collector /app
|
2022-06-08 21:17:08 -07:00
|
|
|
COPY --from=build /go/bin/goose /app
|
|
|
|
COPY ./database/migrations/ /app/migrations
|
|
|
|
|
2022-07-13 15:52:25 -07:00
|
|
|
CMD [ "/app/collector" ]
|