Last active
February 22, 2021 02:29
-
-
Save aksiksi/6e9e6b3b675168fc5b1fa25dbe8bd62a to your computer and use it in GitHub Desktop.
Fairgame Dockerfile. Ended up scrapping this because Fairgame doesn't work well with non-interactive flows.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:20.04 | |
ARG FAIRGAME_REPO=https://github.com/Hari-Nagarajan/fairgame | |
ARG FAIRGAME_VERSION=0.6.0 | |
ENV FAIRGAME_PASSWORD="changeme" | |
ENV TZ="America/New_York" | |
# Clone Fairgame | |
RUN cd /root/ && git clone --depth 1 --branch $FAIRGAME_VERSION $FAIRGAME_REPO | |
# Copy config files | |
COPY config/amazon_config.json /root/fairgame/config | |
COPY config/amazon_credentials.json /root/fairgame/config | |
RUN apt-get update | |
RUN apt-get install -y git wget | |
# Install Google Chrome | |
# This will likely fail due to missing deps | |
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && dpkg -i google-chrome-stable_current_amd64.deb; exit 0 | |
# Install missing Chrome deps | |
# NOTE: Needs to be non-interactive to disable the tzdata config prompt | |
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -fy | |
# Install Python 3.8 and pip | |
RUN apt-get install -y python3.8 python3.8-dev python3.8-distutils python3.8-venv python3-pip | |
# Install Pipenv | |
RUN pip3 install pipenv | |
# Setup the Pipenv | |
RUN pipenv install | |
COPY run.sh /root/fairgame | |
RUN chmod +x /root/fairgame | |
CMD cd /root/fairgame && . $(pipenv --venv)/bin/activate && echo $FAIRGAME_PASSWORD | pipenv run python app.py amazon --headless --no-image |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment