diff --git a/Dockerfile.legacy b/Dockerfile.legacy index 83b1ce57..2f38ff93 100644 --- a/Dockerfile.legacy +++ b/Dockerfile.legacy @@ -1,6 +1,8 @@ FROM composer:2.2 AS composer FROM php:5.6-fpm +ARG UID + #ENV PHP_MEMORY_LIMIT=1024M ENV DEBIAN_FRONTEND=noninteractive @@ -21,7 +23,7 @@ RUN apt update && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* # Create non-root user -RUN useradd -ms /bin/bash phpuser +RUN useradd -u ${UID} -ms /bin/bash phpuser WORKDIR /home/phpuser USER phpuser diff --git a/Taskfile.yml b/Taskfile.yml index 1648fffb..41ba698e 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -16,7 +16,7 @@ tasks: build:php5-6: desc: Build test container cmds: - - docker compose build php5-6 + - docker compose build --build-arg UID="$(id -u)" php5-6 test: desc: Run tests diff --git a/compose.yml b/compose.yml index e082bc04..aad59d7c 100644 --- a/compose.yml +++ b/compose.yml @@ -41,7 +41,6 @@ services: build: context: ./ dockerfile: Dockerfile.legacy - user: ${UID:-1000}:${GID:-1000} volumes: - ./:/home/phpuser - /home/phpuser/src/vendor # do not mount vendor inside container