Skip to content

Commit

Permalink
Fix Dockerfile so we can run via bundle exec
Browse files Browse the repository at this point in the history
I had originally planned to set WORKDIR in the Dockerfile to change to
the correct directory. However it turns out that Github actions has
other ideas and it is ignored.

Instead lets wrap everything in a shell script to change to the right
directory before running.
  • Loading branch information
cornet committed Mar 1, 2024
1 parent 02ce214 commit 7bce9cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ COPY . /usr/src/app

RUN cd /usr/src/app && bundle install

ENTRYPOINT ["ruby", "/usr/src/app/app.rb"]
ENTRYPOINT ["/usr/src/app/entrypoint.sh"]
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

cd /usr/src/app && bundle exec ruby app.rb

0 comments on commit 7bce9cd

Please sign in to comment.