new
This commit is contained in:
35
code/Dockerfile
Normal file
35
code/Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
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
|
||||
Reference in New Issue
Block a user