Skip to content

Commit

Permalink
Using venv and relative path
Browse files Browse the repository at this point in the history
The action isn't running right during workflow runs
so hopefully using relative path might help
  • Loading branch information
aceberle committed May 24, 2021
1 parent 5a1e4b7 commit ced72bd
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# Container image that runs your code
# based on:
# https://pythonspeed.com/articles/activate-virtualenv-dockerfile/
FROM python:3.8-slim-buster

# We copy just the requirements.txt first to leverage Docker cache
COPY ./requirements.txt /app/requirements.txt

WORKDIR /app
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN pip3 install -r requirements.txt
# We copy just the requirements.txt first to leverage Docker cache
COPY ./requirements.txt .
RUN python -m pip install --upgrade pip && pip install -r requirements.txt

# Copies your code file from your action repository to the filesystem path `/` of the container
COPY deadseeker /app/deadseeker/
COPY deadseeker ./deadseeker

# Code file to execute when the docker container starts up (`deadseeker.py`)
CMD [ "python", "-m", "deadseeker.action" ]

0 comments on commit ced72bd

Please sign in to comment.