-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
16 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 |
---|---|---|
@@ -1,20 +1,12 @@ | ||
FROM ubuntu | ||
# Keep this Python image version manually maintained | ||
FROM python:3.7-stretch | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive && \ | ||
apt -y update && \ | ||
apt install -y build-essential \ | ||
python3 python3-dev python3-pip python3-venv git ca-certificates && \ | ||
adduser --disabled-password --force-badname SmokeDetector \ | ||
--gecos SmokeDetector && \ | ||
su - SmokeDetector sh -c '\ | ||
git clone https://github.com/Charcoal-SE/SmokeDetector.git && \ | ||
RUN adduser --disabled-password --force-badname smokey --gecos smokey && \ | ||
su --login smokey sh -c '\ | ||
git clone --depth=50 https://github.com/Charcoal-SE/SmokeDetector.git && \ | ||
cd SmokeDetector && \ | ||
python3 -m venv venv && \ | ||
. ./venv/bin/activate && \ | ||
pip3 install -r user_requirements.txt --upgrade' && \ | ||
pip3 install -r ~SmokeDetector/SmokeDetector/requirements.txt --upgrade && \ | ||
apt autoremove -y --purge build-essential python3-dev && \ | ||
apt clean && \ | ||
pip3 install --user -r user_requirements.txt --upgrade' && \ | ||
pip3 install -r ~smokey/SmokeDetector/requirements.txt --upgrade && \ | ||
rm -rf /root/* /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
CMD ["su", "-", "SmokeDetector"] | ||
CMD ["su", "--login", "smokey", "-c", "/home/smokey/SmokeDetector/docker-startup.sh"] |