You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.2 KiB
43 lines
1.2 KiB
FROM ubuntu:focal AS frontend
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y wget software-properties-common && \
|
|
echo "deb https://deb.nodesource.com/node_16.x focal 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:focal AS app
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y wget gnupg && \
|
|
wget -qO- http://artifact.scc.net.davepedu.com/repo/apt/extpython/dists/focal/install | bash -x /dev/stdin && \
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y extpython-python3.9 libmagic1 ffmpeg && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
ENV PATH=/opt/extpython/3.9/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
ADD . /tmp/code/
|
|
COPY --from=frontend /tmp/code/styles/dist/style.css /tmp/code/styles/dist/style.css
|
|
|
|
RUN cd /tmp/code && \
|
|
pip3 install -r requirements.txt && \
|
|
python3 setup.py install && \
|
|
useradd --uid 1000 app && \
|
|
rm -rf /tmp/code
|
|
|
|
VOLUME /srv/library
|
|
VOLUME /srv/cache
|
|
VOLUME /srv/db
|
|
|
|
USER app
|
|
ENV CACHE_URL=file://./tmp/cache
|
|
|
|
ENTRYPOINT ["photoappd"]
|