Level 102
Try this instead
Copy --chown alex:alex composer* .
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
RUN useradd -ms /bin/bash --no-user-group -g 1000 -u 1337 alex
USER alex
WORKDIR /var/www/html
COPY composer* .
COPY . .
I set USER to alex before COPY , But all the files will created as root, Why ? (WSL2)
Try this instead
Copy --chown alex:alex composer* .
Please or to participate in this conversation.