Skip to content

Commit

Permalink
Add entrypoint script for Docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaguiar authored Oct 1, 2024
1 parent bf795c0 commit 0e9f396
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ RUN gzip /etc/imgutils\
COPY USAGE.md /USAGE.md
COPY EXAMPLES.md /EXAMPLES.md
COPY status.sh /status
COPY entrypoint.sh /.entrypoint.sh
RUN gzip /USAGE.md\
&& gzip /EXAMPLES.md\
&& echo "#!/bin/sh" > /usr/bin/usage-help\
Expand All @@ -134,4 +135,5 @@ ENV PATH=$PATH:$OAF_HOME:$OAF_HOME/ojobs
USER openaf

WORKDIR /imgutils
CMD ["/usr/bin/usage-help"]
#CMD ["/usr/bin/usage-help"]
ENTRYPOINT ["/.entrypoint.sh"]
8 changes: 8 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# Execute /usr/bin/usage-help if no argument is provided otherwise execute the provided command
if [ $# -eq 0 ]; then
/usr/bin/usage-help
else
exec "$@"
fi

0 comments on commit 0e9f396

Please sign in to comment.