File tree Expand file tree Collapse file tree 3 files changed +13
-24
lines changed Expand file tree Collapse file tree 3 files changed +13
-24
lines changed Original file line number Diff line number Diff line change @@ -46,19 +46,12 @@ RUN chmod +x /app/bin/console
4646RUN chmod +x /app/docker-entrypoint.sh
4747RUN chmod +x /usr/bin/composer
4848
49- RUN curl -s https://api.github.com/repos/fabpot/local-php-security-checker/releases/latest | \
50- grep -E "browser_download_url(.+)linux_amd64" | \
51- cut -d : -f 2,3 | \
52- tr -d \" | \
53- xargs -I{} wget -O local-php-security-checker {} \
54- && mv local-php-security-checker /usr/bin/local-php-security-checker \
55- && chmod +x /usr/bin/local-php-security-checker
56-
5749RUN rm -rf /app/var \
5850 && mkdir -p /app/var \
5951 && rm -rf /app/docker \
6052 && rm -rf /app/public/check.php \
61- && php -d memory_limit=-1 /usr/bin/composer install --no-dev --optimize-autoloader
53+ && php -d memory_limit=-1 /usr/bin/composer install --no-dev --optimize-autoloader \
54+ && php /usr/bin/composer audit
6255
6356EXPOSE 9000
6457
Original file line number Diff line number Diff line change @@ -85,14 +85,6 @@ COPY ./docker/php/www-dev.conf /usr/local/etc/php-fpm.d/www.conf
8585
8686RUN chmod -R o+s+w /usr/local/etc/php
8787
88- RUN curl -s https://api.github.com/repos/fabpot/local-php-security-checker/releases/latest | \
89- grep -E "browser_download_url(.+)linux_amd64" | \
90- cut -d : -f 2,3 | \
91- tr -d \" | \
92- xargs -I{} wget -O local-php-security-checker {} \
93- && mv local-php-security-checker /usr/bin/local-php-security-checker \
94- && chmod +x /usr/bin/local-php-security-checker
95-
9688RUN groupadd --gid ${HOST_GID} dev \
9789 && useradd \
9890 -p $(perl -e 'print crypt($ARGV[0], "password")' 'dev') \
Original file line number Diff line number Diff line change 66# 0) Basic linting of current JSON configuration file
77# 1) Export needed environment variables
88# 2) Install all dependencies
9- # 3) Generate JWT encryption keys
10- # 4) Create database if it not exists yet
11- # 5) Run possible migrations, so that database is always up to date
12- # 6) Add needed symfony console autocomplete for bash
9+ # 3) Check if there are any security issues in dependencies
10+ # 4) Generate JWT encryption keys
11+ # 5) Create database if it not exists yet
12+ # 6) Run possible migrations, so that database is always up to date
13+ # 7) Add needed symfony console autocomplete for bash
1314#
1415
1516# Step 0
@@ -25,15 +26,18 @@ export XDEBUG_SESSION=PHPSTORM
2526COMPOSER_MEMORY_LIMIT=-1 composer install --optimize-autoloader
2627
2728# Step 3
28- make generate-jwt-keys
29+ composer audit
2930
3031# Step 4
31- ./bin/console doctrine:database:create --no-interaction --if-not-exists
32+ make generate-jwt-keys
3233
3334# Step 5
34- ./bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration --all-or-nothing
35+ ./bin/console doctrine:database:create --no-interaction --if-not-exists
3536
3637# Step 6
38+ ./bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration --all-or-nothing
39+
40+ # Step 7
3741./bin/console completion bash >> /home/dev/.bashrc
3842
3943exec " $@ "
You can’t perform that action at this time.
0 commit comments