-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (18 loc) · 761 Bytes
/
Copy pathDockerfile
File metadata and controls
27 lines (18 loc) · 761 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
# syntax=docker/dockerfile:1
# Build the C++ application with Chainguard's GCC image.
FROM cgr.dev/trineta.net/gcc-glibc:latest@sha256:c5b599c7a3168596e4ff81d64fc69ec87d39157f9425ef3734760d95f8dae1ab AS build
WORKDIR /src
COPY Makefile ./
COPY src ./src
RUN make
# Include runtime data when it exists. The app expects users.dat in its
# working directory.
RUN mkdir -p /out \
&& cp bin/main /out/main \
&& if [ -f users.dat ]; then cp users.dat /out/users.dat; fi
# Run with Chainguard's minimal glibc runtime image.
FROM cgr.dev/trineta.net/glibc-dynamic:latest@sha256:36d7e670c655f156d36f339d4aa14776e3a91003bfb1afc0072a9743a8b979e5
WORKDIR /app
COPY --from=build /out/ /app/
# Start the compiled banking application.
ENTRYPOINT ["/app/main"]