-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
36 lines (25 loc) · 1.04 KB
/
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
36
FROM public.ecr.aws/r5b3e0r5/3box/rust-builder:latest as builder
RUN mkdir -p /home/builder/keramik/
WORKDIR /home/builder/keramik/
# Copy in source code
COPY . .
# Build application using a docker cache
# To clear the cache use:
# docker builder prune --filter type=exec.cachemount
RUN --mount=type=cache,target=/home/builder/.cargo \
--mount=type=cache,target=/home/builder/keramik/target \
make build && \
cp ./target/release/keramik-runner ./target/release/keramik-operator ./
# This image needs to be the same as the parent image of rust-builder
FROM debian:bookworm-slim as exec
RUN apt-get update && apt-get install -y \
openssl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
FROM exec as runner
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /home/builder/keramik/keramik-runner /usr/bin
ENTRYPOINT ["/usr/bin/keramik-runner"]
FROM exec as operator
COPY --from=builder /home/builder/keramik/keramik-operator /usr/bin
ENTRYPOINT ["/usr/bin/keramik-operator"]