forked from pact-foundation/pact-core-mock-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (17 loc) · 662 Bytes
/
Copy pathDockerfile
File metadata and controls
22 lines (17 loc) · 662 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
ARG ARCH=
FROM rust:1-alpine3.15 AS builder
ARG BIN_ARCH=x86_64
ARG VERSION=1.0.5
RUN apk --no-cache add wget
RUN wget -O pact-mock-server.gz https://github.com/pact-foundation/pact-reference/releases/download/pact_mock_server_cli-v${VERSION}/pact-mock-server-linux-${BIN_ARCH}.gz
RUN gunzip pact-mock-server.gz
RUN chmod +x pact-mock-server
# Now, we need to build our _real_ Docker container, copying in the executable.
FROM ${ARCH}alpine:3.16
RUN apk --no-cache add ca-certificates
COPY --from=builder \
/pact-mock-server \
/usr/local/bin/
EXPOSE 8080 9000-9020
ENTRYPOINT ["/usr/local/bin/pact-mock-server"]
CMD ["start", "--base-port", "9000"]