Skip to content

Commit a8f8fbd

Browse files
committed
Add a build argument for the default shell
[refs #bf31d9c2d568]
1 parent de35507 commit a8f8fbd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

myalpine/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
FROM alpine:latest
22

3+
ARG MYSHELL=bash
4+
ENV MYSHELL=$MYSHELL
5+
36
RUN apk update \
4-
&& apk add bash \
7+
&& apk add $MYSHELL \
58
&& rm -rf /var/cache/apk/*
69

710
ENV PS1="\h:\w# " PS2=">> "
811

9-
CMD bash
12+
CMD ["sh", "-c", "$MYSHELL"]

0 commit comments

Comments
 (0)