FROM ubuntu:focal AS build ENV TZ=Europe/Berlin RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \ echo $TZ > /etc/timezone RUN apt-get update && apt-get install -qq --no-install-recommends\ apt-transport-https git nodejs npm && npm install --global yarn WORKDIR /tmp RUN git clone https://github.com/hopglass/hopglass WORKDIR /tmp/hopglass RUN yarn install && node_modules/grunt/bin/grunt FROM ubuntu:focal COPY --from=build /tmp/hopglass/build /hopglass RUN apt-get update && apt-get install -qq --no-install-recommends\ nginx python3-venv ADD . /app RUN cp /app/config.json /hopglass/config.json RUN cd /etc/nginx &&\ cp /app/nginx.conf sites-available/hopglass;\ ln -s ../sites-available/hopglass sites-enabled/hopglass;\ rm sites-enabled/default || true WORKDIR /app/netglass RUN python3 -m venv flask &&\ flask/bin/pip install -U -r requirements.txt CMD ["/app/run.sh"]