Skip to content

Commit 8247b93

Browse files
committed
feat(docker): distinguish static and dynamic binary on Dockerfile
1 parent 3befc49 commit 8247b93

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

template/cxx/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ WORKDIR ./build
2323
RUN cmake .. && cmake --build . --target {{project-name}} --config Release --parallel 8
2424

2525
# DEPLOYING
26+
{% if bin_type == "static" -%}
2627
FROM scratch
28+
{%- else -%}
29+
FROM rockylinux:9-minimal
30+
{%- endif %}
2731

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

0 commit comments

Comments
 (0)