From 2e8733637a6576b691cf4ae38d8fc2ffc963fc0a Mon Sep 17 00:00:00 2001 From: dave Date: Thu, 6 Feb 2020 18:36:36 -0800 Subject: [PATCH] update image --- .dockerignore | 3 +++ Dockerfile | 25 +++++++++++-------------- 2 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..2b6d37e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +/streamrecord/sessions +/testenv +/data \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index b8492c3..4540395 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,14 @@ -FROM ubuntu:14.04 -MAINTAINER Dave P +FROM ubuntu:eoan # Create user -RUN useradd --create-home --uid 1000 streamrecord ; \ - echo "streamrecord:streamrecord" | chpasswd ; \ - locale-gen en ; \ - sed -i 's/archive.ubuntu.com/mirror.math.ucdavis.edu/' /etc/apt/sources.list ; \ - apt-get update ; apt-get install -y vim nginx-full uwsgi uwsgi-plugin-python3 python3-cherrypy3 python3-jinja2 supervisor curl mkvtoolnix libav-tools cron ; \ - echo "daemon off;" >> /etc/nginx/nginx.conf ; \ - echo "* * * * * sleep 2 && curl -s http://127.0.0.1/api/tick > /dev/null" > /tmp/crontab ; \ - crontab -u streamrecord /tmp/crontab ; \ - rm /tmp/crontab ; \ - su -c "mkdir /home/streamrecord/app/" streamrecord +RUN useradd --create-home --uid 1000 streamrecord && \ + echo "streamrecord:streamrecord" | chpasswd && \ + apt-get update && apt-get install -y vim nginx-full uwsgi uwsgi-plugin-python3 python3-cherrypy3 python3-jinja2 supervisor curl mkvtoolnix ffmpeg cron && \ + echo "daemon off;" >> /etc/nginx/nginx.conf && \ + echo "* * * * * sleep 2 && curl -s http://127.0.0.1/api/tick > /dev/null" > /tmp/crontab && \ + crontab -u streamrecord /tmp/crontab && \ + rm /tmp/crontab && \ + su -c "mkdir /home/streamrecord/app/" streamrecord # install configs COPY default /etc/nginx/sites-available/default @@ -23,8 +20,8 @@ COPY supervisor.conf /etc/supervisor/conf.d/supervisor.conf # Install python app code COPY streamrecord/ /home/streamrecord/app/ -RUN chown -R streamrecord /home/streamrecord/app ; \ - su -c "mkdir /home/streamrecord/app/files /home/streamrecord/app/files/output /home/streamrecord/app/files/temp /home/streamrecord/app/sessions ; ln -s ../files/output /home/streamrecord/app/static/output" streamrecord ; \ +RUN chown -R streamrecord /home/streamrecord/app && \ + su -c "mkdir /home/streamrecord/app/files /home/streamrecord/app/files/output /home/streamrecord/app/files/temp /home/streamrecord/app/sessions && ln -s ../files/output /home/streamrecord/app/static/output" streamrecord && \ rm -rf /etc/cron* EXPOSE 80