Last active
September 30, 2022 13:48
-
-
Save elvinlari/b062551b250698156f33d0169dfc7d15 to your computer and use it in GitHub Desktop.
Composer custom dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM composer:2 | |
# environment arguments | |
ARG UID | |
ARG GID | |
ARG USER | |
ENV UID=${UID} | |
ENV GID=${GID} | |
ENV USER=${USER} | |
# Dialout group in alpine linux conflicts with MacOS staff group's gid, whis is 20. So we remove it. | |
RUN delgroup dialout | |
# Creating user and group | |
RUN addgroup -g ${GID} --system ${USER} | |
RUN adduser -G ${USER} --system -D -s /bin/sh -u ${UID} ${USER} | |
WORKDIR /var/www/html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment