-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (23 loc) · 792 Bytes
/
Copy pathDockerfile
File metadata and controls
27 lines (23 loc) · 792 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
FROM gcc:12.3 AS build
RUN apt-get update && apt-get install -y \
catch2 \
cmake && \
apt-get autoremove && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/*
COPY . /usr/local/src/templatelib
WORKDIR /usr/local/src/templatelib
RUN make build && \
make test && \
make package
FROM scratch AS build-export
COPY --from=build /usr/local/src/templatelib/build/templatelib-Linux.deb /
WORKDIR /
FROM ubuntu:latest AS test
COPY --from=build /usr/local/src/templatelib/build/tests/integration/templatelib.i.t /usr/local/bin
WORKDIR /usr/local/bin
ENTRYPOINT [ "/usr/local/bin/templatelib.i.t" ]
FROM ubuntu:latest AS run
COPY --from=build /usr/local/src/templatelib/build/templatelib-Linux.deb /usr/local/bin
WORKDIR /usr/local/bin
RUN dpkg -i templatelib-Linux.deb