Skip to content

Commit

Permalink
This new Dockerfile is working
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Jun 21, 2019
1 parent bad58d6 commit 6d97bb0
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions Dockerfile
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"]

0 comments on commit 6d97bb0

Please sign in to comment.