Files
mini-flees/code/Dockerfile
2023-08-19 11:35:11 +03:00

36 lines
811 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 UID
ARG GID
ARG TZ
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN groupadd -g $GID user && \
useradd -u $UID -g $GID -ms /bin/bash user && \
mkdir -p /opt/venv && chown $UID:$GID /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 $UID:$GID /app
USER user
WORKDIR /app
CMD bash /app/entrypoint.sh