forked from UsergeTeam/Userge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Udith <[email protected]>
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# set base image (host OS) | ||
FROM python:3.8 | ||
|
||
# set the working directory in the container | ||
WORKDIR /app/ | ||
|
||
RUN apt -qq update | ||
RUN apt -qq install -y --no-install-recommends \ | ||
curl \ | ||
git \ | ||
gnupg2 \ | ||
unzip \ | ||
wget \ | ||
ffmpeg \ | ||
jq | ||
|
||
# install chrome | ||
RUN mkdir -p /tmp/ && \ | ||
cd /tmp/ && \ | ||
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ | ||
# -f ==> is required to --fix-missing-dependancies | ||
dpkg -i ./google-chrome-stable_current_amd64.deb; apt -fqqy install && \ | ||
# clean up the container "layer", after we are done | ||
rm ./google-chrome-stable_current_amd64.deb | ||
|
||
# install chromedriver | ||
RUN mkdir -p /tmp/ && \ | ||
cd /tmp/ && \ | ||
wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip && \ | ||
unzip /tmp/chromedriver.zip chromedriver -d /usr/bin/ && \ | ||
# clean up the container "layer", after we are done | ||
rm /tmp/chromedriver.zip | ||
|
||
|
||
# copy the dependencies file to the working directory | ||
COPY requirements.txt . | ||
|
||
# install dependencies | ||
RUN pip install -r requirements.txt | ||
|
||
# copy the content of the local src directory to the working directory | ||
COPY . . | ||
|
||
# command to run on container start | ||
CMD [ "bash", "./run" ] |