Skip to content

Commit

Permalink
chore: Fix script not found (#91)
Browse files Browse the repository at this point in the history
# Pull Request

## Description

This change optimises the Dockerfile and run script:

- Simplifies the `COPY` command for `run.sh` by using the `--chmod` flag to set permissions in a single step.
- Updates the `ENTRYPOINT` to directly execute `run.sh` without invoking `sh`.
- Changes the shebang in `run.sh` from `#!/bin/bash` to `#!/bin/sh` for better compatibility with Alpine Linux.

These modifications streamline the Docker image build process and improve the execution of the entry point script.

fixes #92
  • Loading branch information
JackPlowman authored Sep 30, 2024
1 parent 3a647db commit 74547b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ WORKDIR /
RUN mkdir -p /statistics && \
apk add --no-cache git=2.45.2-r0

COPY run.sh /
RUN chmod +x /run.sh
COPY --chmod=755 run.sh run.sh

COPY pyproject.toml poetry.lock /

Expand All @@ -17,4 +16,4 @@ RUN pip install --no-cache-dir poetry==1.8.3 \

ENV PYTHONPATH=/

ENTRYPOINT [ "sh", "run.sh" ]
ENTRYPOINT [ "/run.sh" ]
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

# Show files
ls -la
Expand Down

0 comments on commit 74547b7

Please sign in to comment.