Skip to content

Commit

Permalink
fix: use bash instead of shebang
Browse files Browse the repository at this point in the history
  • Loading branch information
ImSoZRious committed Jan 6, 2024
1 parent a2ed178 commit 9978411
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
FROM node:20-bookworm-slim

RUN apt-get update && apt-get install -y --no-install-recommends --no-install-suggests nginx
RUN apt-get update && apt-get install -y --no-install-recommends --no-install-suggests nginx && mkdir -p /docker

COPY nginx.conf /etc/nginx/nginx.conf

COPY container-start.sh start.sh /usr/local/bin

RUN chmod +x /usr/local/bin/container-start.sh /usr/local/bin/start.sh
COPY container-start.sh start.sh /docker

STOPSIGNAL SIGQUIT

ENTRYPOINT [ "start.sh" ]
ENTRYPOINT [ "bash", "/docker/start.sh" ]

CMD [ "serve" ]
7 changes: 6 additions & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -e

SCRIPT_PATH=$(realpath $0)
SCRIPT_DIR=$(dirname $SCRIPT_PATH)

cd $SCRIPT_DIR

[ $# -gt 0 ] && case $1 in
serve)
;;
Expand All @@ -10,6 +15,6 @@ set -e
;;
esac

container-start.sh
sh container-start.sh

nginx -g 'daemon off;'

0 comments on commit 9978411

Please sign in to comment.