BotZ/Dockerfile

32 lines
859 B
Docker
Raw 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-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
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 ["z_app"]
2019-09-03 16:59:24 +02:00
CMD ["-a", "0.0.0.0"]