mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-27 10:31:50 -04:00
Fix user/groupadd in container (#3826)
This commit is contained in:
@@ -25,7 +25,12 @@ WORKDIR /app/tests
|
||||
CMD ["/app/vendor/phpunit/phpunit/phpunit"]
|
||||
|
||||
FROM ospos AS ospos_dev
|
||||
RUN addgroup -S $GID && adduser -S $UID -G $GID
|
||||
|
||||
ARG USERID
|
||||
ARG GROUPID
|
||||
|
||||
RUN echo "Adding user uid $USERID with gid $GROUPID"
|
||||
RUN ( addgroup --gid $GROUPID ospos || true ) && ( adduser --uid $USERID --gid $GROUPID ospos )
|
||||
|
||||
RUN yes | pecl install xdebug \
|
||||
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
|
||||
@@ -7,8 +7,8 @@ services:
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
- UID=${USERID}
|
||||
- GID=${GROUPID}
|
||||
- USERID=${USERID}
|
||||
- GROUPID=${GROUPID}
|
||||
target: ospos_dev
|
||||
container_name: ospos_dev
|
||||
restart: always
|
||||
|
||||
Reference in New Issue
Block a user