2023-07-16 06:05:41 +08:00
|
|
|
#### Building (example)
|
2024-03-24 15:23:24 +08:00
|
|
|
FROM setup-cpp-ubuntu-llvm AS builder
|
2023-07-16 09:06:32 +08:00
|
|
|
|
2023-01-19 22:02:27 +08:00
|
|
|
COPY ./dev/cpp_vcpkg_project /home/app
|
2022-04-27 13:33:36 +08:00
|
|
|
WORKDIR /home/app
|
2022-05-13 10:10:55 +08:00
|
|
|
RUN bash -c 'source ~/.cpprc \
|
2022-05-15 18:53:26 +08:00
|
|
|
&& task build'
|
2022-04-27 13:33:36 +08:00
|
|
|
|
2023-07-16 09:06:32 +08:00
|
|
|
#### Running environment
|
|
|
|
# use a fresh image as the runner
|
|
|
|
FROM ubuntu:22.04 as runner
|
2023-01-19 22:02:27 +08:00
|
|
|
|
2022-04-27 13:33:36 +08:00
|
|
|
# copy the built binaries and their runtime dependencies
|
|
|
|
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
|
|
|
WORKDIR /home/app/
|
|
|
|
ENTRYPOINT ["./my_exe"]
|