File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,16 +33,11 @@ FROM debian:bookworm-slim AS builder
3333 RUN mkdir -p /deps/opt/shvr && \
3434 find /opt \( -type l -o -type f \) | sort -t'_' -k1,1 -k2Vr > /deps/opt/shvr/manifest.txt
3535
36- # Find first shell in TARGETS and symlink it to /deps/bin/sh
37- RUN first_shell=$(echo $TARGETS | cut -d' ' -f1) && \
38- first_shell_opt_path=$(find /opt -type d -name "$first_shell*" | head -n1) && \
39- first_shell_executable=$(find "$first_shell_opt_path" -type f -executable | head -n1) && \
40- ln -s "$first_shell_executable" /deps/bin/sh
4136
42- FROM scratch
37+ FROM busybox:stable-musl
4338
4439 # Copy helper script
45- COPY "entrypoint.sh" "entrypoint.sh"
40+ COPY "entrypoint.sh" "/opt/shvr/ entrypoint.sh"
4641
4742 # Setup environment
4843 ENV SHVR_DIR_OUT=/opt
@@ -52,4 +47,4 @@ FROM scratch
5247 COPY --from=builder "$SHVR_DIR_OUT" "$SHVR_DIR_OUT"
5348 COPY --from=builder /deps /
5449
55- ENTRYPOINT [ "/bin/sh" , "entrypoint.sh" ]
50+ ENTRYPOINT [ "/bin/sh" , "/opt/shvr/ entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ Multiple versions of multiple shells. Ideal for testing portable shell scripts.
1212 - ** latest** - Contains the two most recent versions of each shell. Ideal for testing up to date scripts.
1313 - ** all** - Everything we can build in a single image. Ideal for testing legacy and backwards compatible scripts.
1414
15+ Shells are built on debian-slim, and copied during multi-stage to a barebones
16+ busybox image (you get busybox tools + all shells).
17+
1518## Basic Usage
1619
1720List all shells:
@@ -80,9 +83,6 @@ $ docker run -it --rm "mymultishell"
8083
8184You can pass a shorter list of versions instead of the full ` $(sh shvr.sh targets) ` .
8285
83- The first shell in the list will be chosen to run the entrypoint.sh file for
84- the image.
85-
8686This is particularly useful if you want to test a version that we don't bundle
8787by default, such as an old patch. Our scripts are able to build most
8888intermediate versions without modifications, but we can't include them all in
You can’t perform that action at this time.
0 commit comments