Skip to content

Commit 16d7d4d

Browse files
[PATCH] Tweak dockerfile to use dash by default
1 parent 92cd5e0 commit 16d7d4d

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

dockerfile

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Use the official Alpine Linux image as the base image
2-
FROM --platform="linux/${TARGETARCH}" alpine:latest as featherhash-bellows
2+
FROM --platform="linux/${TARGETARCH}" alpine:latest AS base-plus-dash
3+
LABEL version="3.0"
4+
LABEL org.opencontainers.image.title="base-plus-dash"
5+
LABEL org.opencontainers.image.description="Custom Alpine image with the dash shell installed."
6+
LABEL org.opencontainers.image.vendor="individual"
7+
LABEL org.opencontainers.image.licenses="BSD-2-Clause"
8+
SHELL [ "/bin/sh", "-c" ]
9+
10+
RUN --mount=type=cache,target=/var/cache/apk,sharing=locked --network=default \
11+
apk update \
12+
&& apk add cmd:dash
13+
SHELL [ "/bin/dash", "-l", "-c" ]
14+
ENTRYPOINT ["/bin/dash"]
15+
ENV DASH='/bin/dash'
16+
ENV HOSTNAME="base-plus-dash"
17+
# default to double login
18+
CMD [ "/bin/dash", "-l", "-c", "'exec -a dash /bin/dash -il'" ]
19+
20+
FROM --platform="linux/${TARGETARCH}" base-plus-dash as featherhash-bellows
321

422
RUN mkdir -p /FeatherHash/FeatherHash && \
523
mkdir -p /FeatherHash/tests
@@ -45,7 +63,7 @@ ENTRYPOINT ["./out/bin/sha256sum"]
4563
FROM --platform="linux/${TARGETARCH}" scratch AS featherhash-shasum
4664

4765
# set inherited values
48-
LABEL version="1.0"
66+
LABEL version="1.1"
4967
LABEL org.opencontainers.image.title="FeatherHash-shasum"
5068
LABEL org.opencontainers.image.description="Empty image with stage0 sha256sum, sha384sum, and sha512sum installed"
5169
LABEL org.opencontainers.image.vendor="individual"

0 commit comments

Comments
 (0)