File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -25,4 +25,8 @@ RUN set -eux; \
25
25
COPY src src/
26
26
COPY tests tests/
27
27
28
+ COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint
29
+ RUN chmod +x /usr/local/bin/docker-entrypoint
30
+
31
+ ENTRYPOINT ["docker-entrypoint" ]
28
32
CMD ["php-fpm" ]
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -e
3
+
4
+ # first arg is `-f` or `--some-option`
5
+ if [ " ${1# -} " != " $1 " ]; then
6
+ set -- php-fpm " $@ "
7
+ fi
8
+
9
+ if [ " $1 " = ' php-fpm' ] || [ " $1 " = ' php' ] || [ " $1 " = ' bin/console' ]; then
10
+ mkdir -p var/cache var/log
11
+ setfacl -R -m u:www-data:rwX -m u:" $( whoami) " :rwX var
12
+ setfacl -dR -m u:www-data:rwX -m u:" $( whoami) " :rwX var
13
+
14
+ if [ " $APP_ENV " != ' prod' ]; then
15
+ composer install --prefer-dist --no-progress --no-suggest --no-interaction
16
+ fi
17
+ fi
18
+
19
+ exec docker-php-entrypoint " $@ "
You can’t perform that action at this time.
0 commit comments