update image

This commit is contained in:
dave 2020-02-06 18:36:36 -08:00
parent 9d3a4ae4ce
commit 2e8733637a
2 changed files with 14 additions and 14 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
/streamrecord/sessions
/testenv
/data

View File

@ -1,17 +1,14 @@
FROM ubuntu:14.04 FROM ubuntu:eoan
MAINTAINER Dave P
# Create user # Create user
RUN useradd --create-home --uid 1000 streamrecord ; \ RUN useradd --create-home --uid 1000 streamrecord && \
echo "streamrecord:streamrecord" | chpasswd ; \ echo "streamrecord:streamrecord" | chpasswd && \
locale-gen en ; \ apt-get update && apt-get install -y vim nginx-full uwsgi uwsgi-plugin-python3 python3-cherrypy3 python3-jinja2 supervisor curl mkvtoolnix ffmpeg cron && \
sed -i 's/archive.ubuntu.com/mirror.math.ucdavis.edu/' /etc/apt/sources.list ; \ echo "daemon off;" >> /etc/nginx/nginx.conf && \
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 "* * * * * sleep 2 && curl -s http://127.0.0.1/api/tick > /dev/null" > /tmp/crontab && \
echo "daemon off;" >> /etc/nginx/nginx.conf ; \ crontab -u streamrecord /tmp/crontab && \
echo "* * * * * sleep 2 && curl -s http://127.0.0.1/api/tick > /dev/null" > /tmp/crontab ; \ rm /tmp/crontab && \
crontab -u streamrecord /tmp/crontab ; \ su -c "mkdir /home/streamrecord/app/" streamrecord
rm /tmp/crontab ; \
su -c "mkdir /home/streamrecord/app/" streamrecord
# install configs # install configs
COPY default /etc/nginx/sites-available/default COPY default /etc/nginx/sites-available/default
@ -23,8 +20,8 @@ COPY supervisor.conf /etc/supervisor/conf.d/supervisor.conf
# Install python app code # Install python app code
COPY streamrecord/ /home/streamrecord/app/ COPY streamrecord/ /home/streamrecord/app/
RUN chown -R 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 ; \ 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* rm -rf /etc/cron*
EXPOSE 80 EXPOSE 80