File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -76,10 +76,27 @@ RUN bash init_db.sh postgres & wait-for-it.sh 127.0.0.1:5432 -- echo "postgres i
7676FROM node:10-alpine AS yarn-enc
7777COPY . .
7878RUN yarn install && yarn encore production
79+
80+ # # ---- security-checker ----
81+ FROM base AS security-checker
82+ # # install vendors
83+ RUN apk add --no-cache git make musl-dev go
84+ # Configure Go
85+ ENV GOROOT /usr/lib/go
86+ ENV GOPATH /usr/src/go
87+ ENV PATH /usr/src/go/bin:$PATH
88+ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin /usr/src/go /usr/src/security-checker
89+ RUN curl -Lo /usr/src/security-checker.tar.gz https://github.com/fabpot/local-php-security-checker/archive/v1.0.0.tar.gz
90+ RUN tar -xvzf /usr/src/security-checker.tar.gz -C /usr/src/
91+ RUN cd /usr/src/local-php-security-checker-1.0.0 && go build
92+ RUN chmod +x /usr/src/local-php-security-checker-1.0.0/local-php-security-checker && cp /usr/src/local-php-security-checker-1.0.0/local-php-security-checker /usr/local/bin/
93+
94+
7995# # ---- Dependencies ----
8096FROM base AS dependencies
8197# # install vendors
8298USER www-data
99+ COPY --chown=www-data:www-data --from=security-checker /usr/local/bin/local-php-security-checker /usr/local/bin/local-php-security-checker
83100RUN APP_ENV=prod composer install --prefer-dist --no-plugins --no-scripts --no-dev --optimize-autoloader
84101#
85102# # ---- Release ----
Original file line number Diff line number Diff line change 9999 "auto-scripts" : {
100100 "cache:clear" : " symfony-cmd" ,
101101 "assets:install %PUBLIC_DIR%" : " symfony-cmd" ,
102- "security:check " : " symfony-cmd "
102+ "local-php- security-checker --path=/var/www/html/composer.lock --format=ansi " : " script "
103103 },
104104 "post-install-cmd" : [
105105 " @auto-scripts"
You can’t perform that action at this time.
0 commit comments