Skip to content

Commit

Permalink
feat(docker): distinguish static and dynamic binary on Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
pplmx committed Sep 20, 2022
1 parent 3befc49 commit 8247b93
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions template/cxx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ WORKDIR ./build
RUN cmake .. && cmake --build . --target {{project-name}} --config Release --parallel 8

# DEPLOYING
{% if bin_type == "static" -%}
FROM scratch
{%- else -%}
FROM rockylinux:9-minimal
{%- endif %}

COPY --from=builder /app/build/{{project-name}} /{{project-name}}

Expand Down

0 comments on commit 8247b93

Please sign in to comment.