only create group if not exists
This commit is contained in:
parent
cb41f952d6
commit
6db4ab669f
|
@ -8,14 +8,14 @@ ARG GROUP_NAME
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y -q git-core curl vim-tiny \
|
&& apt-get install -y -q git-core curl vim-tiny \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN addgroup --gid $GROUP_ID $GROUP_NAME \
|
RUN if ! getent group "$GROUP_ID"; then addgroup --gid $GROUP_ID $GROUP_NAME; fi
|
||||||
&& adduser --uid $USER_ID --gid $GROUP_ID $USER_NAME
|
RUN adduser --uid $USER_ID --gid $GROUP_ID $USER_NAME
|
||||||
|
|
||||||
RUN git config --global --add safe.directory /app
|
RUN git config --global --add safe.directory /app
|
||||||
|
|
||||||
RUN pip install --upgrade pip
|
RUN pip install --upgrade pip
|
||||||
RUN pip install poetry==1.8.1
|
RUN pip install poetry==1.8.1
|
||||||
|
|
|
@ -3,11 +3,11 @@ FROM python:3.12.1-slim-bookworm
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y -q \
|
&& apt-get install -y -q \
|
||||||
gcc libssl-dev libpq-dev default-libmysqlclient-dev \
|
gcc libssl-dev libpq-dev default-libmysqlclient-dev \
|
||||||
pkg-config libffi-dev git-core curl sqlite3 \
|
pkg-config libffi-dev git-core curl sqlite3 \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN pip install --upgrade pip
|
RUN pip install --upgrade pip
|
||||||
RUN pip install poetry==1.8.1 pytest-xdist==3.5.0
|
RUN pip install poetry==1.8.1 pytest-xdist==3.5.0
|
||||||
|
|
Loading…
Reference in New Issue