forked from newscred/webhook-broker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (28 loc) · 849 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM golang:1.19.3-alpine3.17 AS build-env
RUN apk update && apk add bash make git
RUN mkdir -p /go/src/github.com/newscred/webhook-broker/
WORKDIR /go/src/github.com/newscred/webhook-broker/
RUN mkdir -p ./dist/
ADD Makefile .
RUN make os-deps dep-tools
ADD go.mod .
ADD go.sum .
RUN make deps
ADD main.go .
ADD main_test.go .
ADD wire.go .
ADD wire_gen.go .
ADD testdatadir ./testdatadir
ADD config ./config
ADD controllers ./controllers
ADD migration ./migration
ADD storage ./storage
ADD dispatcher ./dispatcher
RUN make build
RUN make test
FROM alpine:3.17
RUN apk update && apk add curl
WORKDIR /
COPY --from=build-env /go/src/github.com/newscred/webhook-broker/webhook-broker /webhook-broker
COPY --from=build-env /go/src/github.com/newscred/webhook-broker/migration /migration
CMD [ "webhook-broker", "-migrate", "/migration/sqls/" ]