forked from keploy/keploy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.runtime
More file actions
41 lines (34 loc) · 1.59 KB
/
Copy pathDockerfile.runtime
File metadata and controls
41 lines (34 loc) · 1.59 KB
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
36
37
38
39
40
41
# syntax=docker/dockerfile:1.6
# Runtime-only image — expects a prebuilt keploy binary in the build
# context under dist/keploy-linux-<arch>/keploy. Used by CI (PR build
# + release) so the binary compiled in a preceding job is reused
# rather than rebuilt inside docker. Keeps image builds to ~10s
# (COPY + apt install) and avoids qemu-based arm64 cross-compilation
# on amd64 runners.
#
# External users who want to build from source should use the main
# Dockerfile, which is self-contained (runs `go build` internally).
FROM debian:trixie-slim
# TARGETARCH is auto-populated by BuildKit on multi-platform builds
# (linux/amd64 -> amd64, linux/arm64 -> arm64). Callers must ensure
# dist/keploy-linux-$TARGETARCH/keploy exists for every platform
# passed to --platform.
ARG TARGETARCH
ENV KEPLOY_INDOCKER=true
# --no-install-recommends (~3.6MB unpacked) and no apt-get clean, matching
# the main Dockerfile and tests/e2e/ca-bundle-merge/Dockerfile.setup - see
# the Dockerfile for the rationale. ca-certificates must stay in the
# explicit list; it is only a Recommends of libcurl4t64.
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
sudo && \
rm -rf /var/lib/apt/lists/*
COPY dist/keploy-linux-${TARGETARCH}/keploy /app/keploy
COPY entrypoint.sh /app/entrypoint.sh
# windows compatibility (strip CRLF if the file picked it up on a
# Windows checkout) + make executable.
RUN sed -i 's/\r$//' /app/entrypoint.sh && \
chmod +x /app/entrypoint.sh /app/keploy
ENTRYPOINT ["/app/entrypoint.sh", "/app/keploy", "agent", "--is-docker"]