photolib/Dockerfile

39 lines
932 B
Docker
Raw Normal View History

2019-07-06 13:49:16 -07:00
FROM ubuntu:bionic AS frontend
2018-09-11 22:25:09 -07:00
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 && \
2019-07-06 11:25:15 -07:00
wget -q -O- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
2018-09-11 22:25:09 -07:00
apt-get update && \
apt-get install -y nodejs
ADD . /tmp/code/
RUN cd /tmp/code && \
npm install && \
./node_modules/.bin/grunt
2019-07-06 13:49:16 -07:00
FROM ubuntu:disco AS app
2018-09-11 22:25:09 -07:00
ADD . /tmp/code/
RUN apt-get update && \
apt-get install -y python3-pip
2019-07-06 13:49:16 -07:00
COPY --from=frontend /tmp/code/styles/dist/style.css /tmp/code/styles/dist/style.css
2019-11-14 21:28:32 -08:00
RUN cd /tmp/code && \
2019-07-06 11:25:15 -07:00
pip3 install -r requirements.txt && \
2018-09-11 22:25:09 -07:00
python3 setup.py install && \
2019-07-06 13:49:16 -07:00
useradd --uid 1000 app && \
rm -rf /tmp/code
2018-09-11 22:25:09 -07:00
VOLUME /srv/library
VOLUME /srv/cache
VOLUME /srv/db
USER app
2019-07-11 19:26:22 -07:00
ENV CACHE_URL=file://./tmp/cache
2018-09-11 22:25:09 -07:00
2019-07-06 11:25:15 -07:00
ENTRYPOINT ["photoappd"]