forked from GithubBackups/vichan
Fix user and group creation for docker containers
This commit is contained in:
parent
f3c7bad9cd
commit
03228eb87d
@ -1,10 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/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
|
set -eu
|
||||||
|
|
||||||
install -m 775 -o leftypol -g leftypol -d /var/www-leftypol
|
install -m 775 -o leftypol -g leftypol -d /var/www-leftypol
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
FROM nginx:1.25.3-alpine
|
FROM nginx:1.25.3-alpine
|
||||||
|
|
||||||
COPY . /code
|
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;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
@ -35,7 +35,11 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
|||||||
&& pecl install imagick \
|
&& pecl install imagick \
|
||||||
&& pecl install -o -f igbinary \
|
&& 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-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
|
RUN /code/docker/common-setup.sh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user