Skip to content

Commit 12d28f7

Browse files
authored
fix(Dockerfile): Build stripe-mock binary inside docker instead of copying from host (stripe#430)
1 parent 6099c69 commit 12d28f7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Dockerfile

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
# -*- mode: dockerfile -*-
22

3+
FROM golang:alpine as builder
4+
WORKDIR /app
5+
COPY . .
6+
7+
RUN go build -mod=vendor -o stripe-mock
8+
39
FROM alpine:latest
410
RUN apk --no-cache add ca-certificates
5-
COPY stripe-mock /bin/stripe-mock
11+
COPY --from=builder /app/stripe-mock /bin/stripe-mock
612
ENTRYPOINT ["/bin/stripe-mock", "-http-port", "12111", "-https-port", "12112"]
713
EXPOSE 12111
814
EXPOSE 12112

0 commit comments

Comments
 (0)