BotZ/Dockerfile

37 lines
1021 B
Docker
Raw Permalink Normal View History

2019-08-08 16:05:41 +02:00
FROM node AS node
2019-09-03 16:59:24 +02:00
FROM selenium/standalone-firefox AS ff
FROM python:3.7-buster
2019-09-04 12:38:35 +02:00
LABEL author="Blallo"
LABEL email="blallo@autistici.org"
2019-09-25 18:09:01 +02:00
LABEL io.troubles.botz.release-date="2019-09-25"
LABEL io.troubles.botz.version="1.1.3"
2019-09-04 12:38:35 +02:00
2019-09-03 16:59:24 +02:00
ENV DEBIAN_FRONTEND=noninteractive
2019-08-08 16:05:41 +02:00
COPY --from=node /usr/local /usr/local
COPY --from=node /opt /opt
2019-09-03 16:59:24 +02:00
COPY --from=ff /opt/firefox-latest /opt/firefox-latest
COPY --from=ff /opt/geckodriver* /opt/
2019-08-08 16:05:41 +02:00
COPY . /app
COPY entrypoint.sh /srv/
2019-08-08 16:05:41 +02:00
WORKDIR /app/bot.z_web
2019-09-03 16:59:24 +02:00
RUN apt-get update \
&& apt-get install -y $(apt-cache depends firefox-esr| awk '/Depends:/{print$2}') \
&& ln -s /opt/firefox-latest/firefox /usr/bin/firefox \
&& ln -s /opt/geckodriver* /usr/bin/geckodriver \
&& yarn install \
&& yarn build \
&& mkdir -p /app/api/assets \
&& cp -r build/* /app/api/assets/ \
2019-09-03 16:59:24 +02:00
&& rm -r node_modules/ /var/lib/apt/lists/* /var/cache/apt/* /tmp/*
2019-08-08 16:05:41 +02:00
WORKDIR /app
RUN python setup.py develop
EXPOSE 3003
VOLUME ["/app/bot.z_web/node_modules"]
ENTRYPOINT ["/srv/entrypoint.sh"]