Dockerfile: use script rather than alias so that bash doesn't need to be interactive shell with a TTY
authoretisserant <edouard.tisserant@gmail.com>
Tue, 17 May 2022 16:03:04 +0200
changeset 41 77b38c4d0d7f
parent 40 87e6588ad4c8
child 47 be6d0d610f84
Dockerfile: use script rather than alias so that bash doesn't need to be interactive shell with a TTY
Dockerfile
--- a/Dockerfile	Sat Oct 02 00:15:37 2021 +0200
+++ b/Dockerfile	Tue May 17 16:03:04 2022 +0200
@@ -18,11 +18,14 @@
 ARG GID=1000
 RUN groupadd -g $GID $UNAME
 RUN useradd -m -u $UID -g $GID -s /bin/bash $UNAME
+
+# easy to remember 'build' alias to invoke main makefile
+ARG OWNDIRBASENAME=beremiz_public_dist
+ENV OWNDIRBASENAME ${OWNDIRBASENAME}
+RUN echo -e '#!/bin/bash\nmake -f /home/devel/src/'$OWNDIRBASENAME'/Makefile $*' > /usr/local/bin/build
+RUN chmod +x /usr/local/bin/build
+
 USER $UNAME
 
 RUN mkdir /home/$UNAME/build /home/$UNAME/src
 
-# easy to remember 'build' alias to invoke main makefile
-ARG OWNDIRBASENAME=beremiz_public_dist
-ENV OWNDIRBASENAME ${OWNDIRBASENAME}
-RUN echo "alias build='make -C /home/"$UNAME"/build -f /home/devel/src/"$OWNDIRBASENAME"/Makefile'">/home/$UNAME/.bash_aliases