2023-07-16 06:05:41 +08:00
|
|
|
#### Building (example)
|
2024-03-24 15:23:24 +08:00
|
|
|
FROM setup-cpp-arch-llvm AS builder
|
2023-07-16 09:06:32 +08:00
|
|
|
|
2023-07-16 06:05:41 +08:00
|
|
|
COPY ./dev/cpp_vcpkg_project /home/app
|
|
|
|
WORKDIR /home/app
|
|
|
|
RUN bash -c 'source ~/.cpprc \
|
|
|
|
&& task build'
|
|
|
|
|
|
|
|
#### Running environment
|
2023-07-16 09:06:32 +08:00
|
|
|
# use a fresh image as the runner
|
|
|
|
FROM archlinux:base as runner
|
|
|
|
|
2023-07-16 06:05:41 +08:00
|
|
|
# copy the built binaries and their runtime dependencies
|
2023-07-16 09:06:32 +08:00
|
|
|
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
|
2023-07-16 06:05:41 +08:00
|
|
|
WORKDIR /home/app/
|
|
|
|
ENTRYPOINT ["./my_exe"]
|