Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

Commit

Permalink
Add chmod and relative path for COPY and ENTRYPOINT.
Browse files Browse the repository at this point in the history
So far, actions failed with `python: can't open file 'main.py': [Errno 2] No such file or directory`
  • Loading branch information
Nathanmalnoury committed Jul 22, 2021
1 parent cd2d9dc commit 8acd7ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
FROM python:3.8-slim-buster

# Copies your code file from your action repository to the filesystem path `/` of the container
COPY src/main.py /main.py
COPY src/main.py ./main.py

# Code file to execute when the docker container starts up (`entrypoint.sh`)
RUN ls
ENTRYPOINT ["python", "main.py"]
RUN chmod +x main.py
ENTRYPOINT ["python", "./main.py"]

0 comments on commit 8acd7ce

Please sign in to comment.