1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-17 11:28:41 +01:00

Fix user and group creation for docker containers

This commit is contained in:
zeke 2024-02-07 10:47:36 -08:00 committed by Zankaria
parent f3c7bad9cd
commit 03228eb87d
3 changed files with 9 additions and 7 deletions

View File

@ -1,10 +1,5 @@
#!/bin/sh
# not exactly elegant, but one container is Debian, the other is Alpine
useradd -MU leftypol
addgroup leftypol
adduser -DHG leftypol leftypol
set -eu
install -m 775 -o leftypol -g leftypol -d /var/www-leftypol

View File

@ -1,7 +1,10 @@
FROM nginx:1.25.3-alpine
COPY . /code
RUN /code/docker/common-setup.sh
RUN addgroup --system leftypol \
&& adduser --system leftypol \
&& adduser leftypol leftypol \
&& /code/docker/common-setup.sh
CMD ["nginx", "-g", "daemon off;"]

View File

@ -35,7 +35,11 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
&& pecl install imagick \
&& pecl install -o -f igbinary \
&& docker-php-ext-install gd zip opcache intl pdo pdo_mysql mysqli bcmath gettext iconv mbstring curl \
&& docker-php-ext-enable igbinary redis imagick
&& docker-php-ext-enable igbinary redis imagick \
&& useradd -MU leftypol \
&& /code/docker/common-setup.sh \
&& ln -s /code/composer.json /code/composer.lock /var/www-leftypol/ \
&& cd /var/www-leftypol && composer install
RUN /code/docker/common-setup.sh