Files
mini-flees/code/Dockerfile
2023-08-19 19:42:31 +03:00

36 lines
820 B
Docker

FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -yqq \
&& apt-get install -y --no-install-recommends \
curl \
sqlite3 \
tzdata \
git \
make \
python3-venv \
python3-pip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ARG UUID
ARG UGID
ARG TZ
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN groupadd -g $UGID user && \
useradd -u $UUID -g $UGID -ms /bin/bash user && \
mkdir -p /opt/venv && chown $UUID:$UGID /opt/venv
COPY ./requirements.txt /requirements.txt
COPY docker-builder.sh /
USER user
RUN bash /docker-builder.sh
COPY ./ /app
USER root
RUN chown -R $UUID:$UGID /app
USER user
WORKDIR /app
CMD bash /app/entrypoint.sh