Add dockerfile

This commit is contained in:
dave 2018-10-24 18:38:18 -07:00
parent 00d05f2a55
commit 139d44397d
3 changed files with 41 additions and 0 deletions

35
Dockerfile Normal file
View File

@ -0,0 +1,35 @@
FROM ubuntu:bionic
RUN apt-get update && \
apt-get install -y wget software-properties-common && \
echo "deb https://deb.nodesource.com/node_10.x bionic main" | tee /etc/apt/sources.list.d/nodesource.list && \
wget -q -O- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
apt-get update && \
apt-get install -y nodejs
ADD . /tmp/code/
RUN cd /tmp/code && \
npm install && \
./node_modules/.bin/grunt
FROM ubuntu:bionic
ADD . /tmp/code/
COPY --from=0 /tmp/code/styles/dist/style.css /tmp/code/styles/dist/style.css
RUN apt-get update && \
apt-get install -y python3-pip sudo
RUN pip3 install -U pip && \
cd /tmp/code && \
pip install -r requirements.txt && \
python3 setup.py install && \
useradd --uid 1000 app
VOLUME /data/
ADD start /start
ENTRYPOINT ["/start"]

View File

@ -9,6 +9,7 @@ more-itertools==4.3.0
persistent==4.4.2
portend==2.3
pytz==2018.5
PyYAML==3.13
six==1.11.0
tempora==1.13
transaction==2.2.1

5
start Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
sudo chown -R app:app /data
exec sudo -Hu app nodepupperd --database /data/pup.db $@