update to use user: 2000:2000 / ARGS in build, and use the python image instead of a full ubuntu image. Also use r to escape regex str
This commit is contained in:
29
Dockerfile
29
Dockerfile
@@ -1,24 +1,11 @@
|
||||
FROM ubuntu:22.04
|
||||
FROM python
|
||||
WORKDIR /code
|
||||
USER root
|
||||
ENV PJM_UID=500
|
||||
ENV PJM_GID=500
|
||||
RUN groupadd -g ${PJM_GID} mythtv && useradd -r -u ${PJM_UID} -g ${PJM_GID} mythtv
|
||||
ENV TZ=Australia/Melbourne
|
||||
RUN truncate -s0 /tmp/preseed.cfg && \
|
||||
(echo "tzdata tzdata/Areas select Australia" >> /tmp/preseed.cfg) && \
|
||||
(echo "tzdata tzdata/Zones/Australia select Melbourne" >> /tmp/preseed.cfg) && \
|
||||
debconf-set-selections /tmp/preseed.cfg && \
|
||||
rm -f /etc/timezone /etc/localtime && \
|
||||
apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
|
||||
apt-get install -y tzdata
|
||||
## cleanup of files from setup
|
||||
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
RUN apt-get update && apt-get -y dist-upgrade && apt-get -y install python3-pip python3-psycopg2 libpq-dev gunicorn python3-ldap
|
||||
COPY requirements.txt requirements.txt
|
||||
RUN pip3 install -r requirements.txt
|
||||
EXPOSE 443
|
||||
EXPOSE 5000
|
||||
ARG USERID
|
||||
ARG GROUPID
|
||||
RUN chown $USERID:$GROUPID /code
|
||||
#RUN apt-get update && apt-get -y install python3-pip && apt-get -y dist-upgrade
|
||||
COPY . .
|
||||
RUN pip3 install -r requirements.txt
|
||||
EXPOSE 80
|
||||
EXPOSE 5000
|
||||
CMD ["./wrapper.sh"]
|
||||
|
||||
Reference in New Issue
Block a user