Skip to content

Commit 4c444e2

Browse files
committed
Adopt multi-stage build to eliminate test files from final resource
1 parent 4ab6576 commit 4c444e2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ LABEL maintainer="Gstack <https://github.com/gstackio>" \
1313
org.label-schema.vcs-ref=$VCS_REF \
1414
org.label-schema.schema-version="1.0.0"
1515

16+
# Notice: the 'gettext-dev' package provides the required 'envsubst' binary
1617
RUN apk add --no-cache curl bash jq gettext-dev
1718

1819
COPY check /opt/resource/check
@@ -21,6 +22,14 @@ COPY out /opt/resource/out
2122

2223
RUN chmod +x /opt/resource/out /opt/resource/in /opt/resource/check
2324

25+
26+
27+
FROM resource AS tests
28+
2429
ADD test/ /opt/resource-tests/
2530
RUN /opt/resource-tests/all.sh \
2631
&& rm -rf /tmp/*
32+
33+
34+
35+
FROM resource

0 commit comments

Comments
 (0)