Skip to content

Instantly share code, notes, and snippets.

@elvinlari
Last active September 30, 2022 13:48
Show Gist options
  • Save elvinlari/b062551b250698156f33d0169dfc7d15 to your computer and use it in GitHub Desktop.
Save elvinlari/b062551b250698156f33d0169dfc7d15 to your computer and use it in GitHub Desktop.
Composer custom dockerfile
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