Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM instrumentisto/geckodriver
RUN apt-get update && \
apt-get install -y --no-install-recommends --no-install-suggests \
python3 python3-pip pipenv

ADD . /home/debbit

RUN cd /home/debbit/src && \
ln -s /usr/local/bin/geckodriver ./program_files/geckodriver && \
ln -s /opt/firefox/firefox /usr/local/bin/firefox && \
cp ./debbit.py /opt/firefox/ && \
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be necessary. I'm thinking there's something wrong with the python source but did not investigate.

pipenv install

# Overwrite entrypoint in base image with something innocuous
ENTRYPOINT ["/usr/bin/env"]

WORKDIR /home/debbit/src

CMD ["python3", "-m", "pipenv", "run", "python3", "./debbit.py"]
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love for someone to tell my why this is wrong. It looks wrong, but I don't know the python ecosystem well enough to say why.

8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
LOCATION_OF_DEBBIT = "/home/you/where-this-stuff-goes/debbit"


build:
docker build -t debbit .

run:
docker run -v $(LOCATION_OF_DEBBIT)/src/state:/home/debbit/src/state debbit