Skip to content

Commit

Permalink
Merge pull request #1055 from tripleee/dockerfile-fix
Browse files Browse the repository at this point in the history
Update Dockerfile for Python 3 etc (#1047)
  • Loading branch information
teward committed Sep 15, 2017
2 parents ded1b2a + a014cb7 commit 8d1084d
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
FROM ubuntu
MAINTAINER CaffeineAddiction

RUN apt update && \
apt install build-essential python2.7 python-dev git wget -y && \
wget https://bootstrap.pypa.io/get-pip.py && \
python2.7 get-pip.py && \
cd ~ && \
env GIT_SSL_NO_VERIFY=true git clone https://github.com/Charcoal-SE/SmokeDetector.git && \
cd SmokeDetector && \
git submodule init && \
git submodule update && \
pip install -r requirements.txt --upgrade

RUN apt remove -y --purge build-essential python-dev wget && \
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 && \
cd SmokeDetector && \
python3 -m venv venv && \
. ./venv/bin/activate && \
git submodule init && \
git submodule update && \
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 && \
rm -rf /root/* /var/lib/apt/lists/* /tmp/* /var/tmp/*


CMD ["/bin/bash"]
CMD ["su", "-", "SmokeDetector"]

0 comments on commit 8d1084d

Please sign in to comment.