File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,16 @@ jobs:
22
22
run : docker save --output /tmp/image.tar test:latest
23
23
-
24
24
name : Extract layer
25
- run : tar -C /tmp -x -f /tmp/image.tar --wildcards '*layer.tar' --strip-components=1
25
+ run : |
26
+ tar -C /tmp -x -f /tmp/image.tar --strip-components=1
27
+ if [ ! -d /tmp/sha256 ]; then
28
+ echo 'Cannot extract docker archive.'
29
+ exit 1
30
+ fi
26
31
-
27
32
name : Check layer contents
28
33
run : |
29
- ENTRY="$(tar -v -t -f /tmp/layer. tar --wildcards '*bin/ install-php-extensions' )"
34
+ ENTRY="$(find /tmp/sha256 -type f -exec tar -vtf {} \; 2>/dev/null | grep install-php-extensions)"
30
35
if [ -z "$ENTRY" ]; then
31
36
echo 'File not found'
32
37
exit 1
Original file line number Diff line number Diff line change 1
- FROM bash AS build
2
-
3
- COPY install-php-extensions /tmp/install-php-extensions
4
- RUN chmod +x /tmp/install-php-extensions
5
-
6
1
FROM scratch
7
2
8
- LABEL org.opencontainers.image.source="https://github.com/mlocati/docker-php-extension-installer" \
9
- org.opencontainers.image.licenses="MIT"
3
+ LABEL org.opencontainers.image.source="https://github.com/mlocati/docker-php-extension-installer"
4
+ LABEL org.opencontainers.image.licenses="MIT"
10
5
11
- COPY --from=build /tmp/ install-php-extensions /usr/bin/install-php-extensions
6
+ COPY --chmod=755 install-php-extensions /usr/bin/install-php-extensions
You can’t perform that action at this time.
0 commit comments