Skip to content

Commit

Permalink
feat(docker): revert alpine-develop to app user
Browse files Browse the repository at this point in the history
  • Loading branch information
damienwebdev committed Sep 25, 2019
1 parent 0bbaf82 commit 9450ccc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- name: Publish tag image
run: docker push graycore/magento-php:7.2-fpm-alpine-${GITHUB_REF##*/}
build-php-7-2-alpine-develop:
needs: build-php-7-2-alpine
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand Down
1 change: 0 additions & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ services:
- ../index.php:/var/www/html/index.php:cached
- ../mage2docker-modules:/var/www/html/mage2docker-modules:cached
- ../nginx.conf.sample:/var/www/html/nginx.conf:cached
- ../vendor/.htaccess:/var/www/html/vendor/.htaccess:cached
- ../composer.json:/var/www/html/composer.json:delegated
- ../composer.lock:/var/www/html/composer.lock:delegated
ingress:
Expand Down
19 changes: 19 additions & 0 deletions php/7.2/alpine-develop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@ RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \

COPY conf/php.ini /usr/local/etc/php/

ENV MAGENTO_USER=app
ENV MAGENTO_USER_UID=1000
ENV MAGENTO_USER_GID=1000

RUN addgroup --gid "$MAGENTO_USER_GID" "$MAGENTO_USER" && adduser \
--disabled-password \
--gecos "" \
--no-create-home \
--ingroup "$MAGENTO_USER" \
--uid "$MAGENTO_USER_UID" \
-h /var/www \
-s /bin/bash "$MAGENTO_USER"

RUN mkdir -p /var/www/html

RUN chown app:app /var/www/html

USER app:app

VOLUME /var/www/html

WORKDIR /var/www/html

0 comments on commit 9450ccc

Please sign in to comment.