-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (35 loc) · 988 Bytes
/
Dockerfile
File metadata and controls
39 lines (35 loc) · 988 Bytes
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
FROM debian:stable-20250317 AS builder
ARG VERSION="dev"
ENV VERSION=${VERSION}
# Install system dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
git opam ca-certificates wget m4 build-essential && \
rm -rf /var/lib/apt/lists/*
# Initialize OPAM and install packages
RUN opam init --disable-sandboxing -a -y && \
eval "$(opam env)" && \
opam install -y \
ISO8601 \
cmdliner \
containers \
csv \
duration \
logs \
pds \
ppx_blob \
ppx_deriving \
ppx_deriving_yojson \
uri \
yojson
# Copy the source code and build
WORKDIR /oiq
COPY ./ /oiq
RUN eval "$(opam env)" && \
pds && \
echo "${VERSION}" > version && \
make release
# Final image
FROM gcr.io/distroless/base-debian12
COPY --from=builder /oiq/build/release/oiq_cli/oiq_cli.native /usr/local/bin/oiq
ENTRYPOINT ["/usr/local/bin/oiq"]