File size: 1,254 Bytes
25f0d7a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
FROM ubuntu:22.04
EXPOSE 7860
ENV HOST_PORT=7860
ENV TERM=xterm-256color
ENV SHELL=/bin/bash
ENV DEBIAN_FRONTEND=noninteractive
#ENV TZ=America/New_York
ENV WORKROOT=/tmp/workroot
USER root
# -----
COPY . ${WORKROOT}/
WORKDIR ${WORKROOT}/build
#RUN if [ -f script/ext_build.sh ]; then
# bash script/ext_build.sh;
# fi
#RUN [ -f script/ext_build.sh ] && bash script/ext_build.sh
RUN bash script/ext_build_as_root.sh
RUN chown -R 1000:1000 ${WORKROOT}
# ---------------------
USER 1000
WORKDIR ${WORKROOT}/build
RUN bash script/ext_build_as_user.sh
RUN chown -R 1000:1000 ${WORKROOT}
# ------------
USER 1000
WORKDIR ${WORKROOT}
ENTRYPOINT ["/bin/bash", "/tmp/workroot/entrypoint.sh"]
#ENTRYPOINT [ "/bin/bash", "/tmp/startup.sh" ] # main $@
#CMD ["bash", "ext_run.sh" ]
#CMD bash -c "bash script/ext_run.sh $REPO $PLATFORM && sleep infinity "
#CMD "sleep infinity"
RUN pip install panel
# Copy app and startup script into container
COPY app.py /app.py
# Expose the required ports
EXPOSE 7860
#CMD ["bash", "-c", "bash /tmp/start.sh && panel serve /app.py --port 7860 --allow-websocket-origin '*'"]
CMD ["bash", "-c", "bash /tmp/start.sh & panel serve /app.py --port 7860 --allow-websocket-origin '*'"]
|