Skip to content

Commit 8e3397d

Browse files
authored
Merge pull request #20 from tim-devereux/patch-2
Update Dockerfile
2 parents 7706b03 + cec6bd2 commit 8e3397d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

docker/Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,13 @@ RUN rm -rf /build
108108
# Set the working directory
109109
WORKDIR /workspace
110110

111-
# Set the entrypoint
112-
ENTRYPOINT ["/bin/bash"]
111+
# Handle entrypoint for interactive and non-interactive
112+
RUN echo '#!/bin/bash\n\
113+
if [ $# -eq 0 ]; then\n\
114+
exec /bin/bash\n\
115+
else\n\
116+
exec "$@"\n\
117+
fi' > /entrypoint.sh && chmod +x /entrypoint.sh
118+
119+
# Set the entrypoint to script
120+
ENTRYPOINT ["/entrypoint.sh"]

0 commit comments

Comments
 (0)