diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2024-02-12 23:56:29 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2024-02-12 23:56:29 +0100 |
| commit | 452fe86288fa5ad396cac6af84e8fc7a680b15d7 (patch) | |
| tree | 003dfad134d7dbd6c4bcd74442e1fcc79f015e57 /cJSON | |
| parent | 8c104a497d9dee7e65aec260748f2e265138555c (diff) | |
| download | spm-packages-452fe86288fa5ad396cac6af84e8fc7a680b15d7.tar.gz | |
Use scratch on final step
This reduce the final image size significantly.
Diffstat (limited to 'cJSON')
| -rw-r--r-- | cJSON/1.7.16/Dockerfile | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cJSON/1.7.16/Dockerfile b/cJSON/1.7.16/Dockerfile index e14a706..bb83f99 100644 --- a/cJSON/1.7.16/Dockerfile +++ b/cJSON/1.7.16/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine +FROM alpine as base ARG PREFIX=/opt/spm/cjson-1.7.16 RUN apk update && apk add \ git \ @@ -15,3 +15,5 @@ RUN cmake -B build \ -DCMAKE_C_FLAGS="-ffunction-sections -fdata-sections" RUN cmake --build build/ --parallel $(nproc --all) RUN cmake --install build/ +FROM scratch +COPY --from=base /opt/spm/cjson-1.7.16 /opt/spm/cjson-1.7.16 |
