Skip to content

Commit c465817

Browse files
committed
Remove build image for security checker, fix the test step.
Signed-off-by: Aleksandr Beshkenadze <beshkenadze@gmail.com>
1 parent e88f5c5 commit c465817

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

Dockerfile

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ COPY tests/_scripts/init_db.sh /usr/local/bin
6363
COPY tests/_scripts/wait-for-it.sh /usr/local/bin
6464

6565
COPY . .
66+
COPY --chown=www-data:www-data --from=4xxi/php-security-checker /usr/local/bin/local-php-security-checker /usr/local/bin/local-php-security-checker
6667
RUN APP_ENV=test composer install
6768
RUN vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --using-cache=no
6869

@@ -77,26 +78,11 @@ FROM node:10-alpine AS yarn-enc
7778
COPY . .
7879
RUN yarn install && yarn encore production
7980

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-
9581
## ---- Dependencies ----
9682
FROM base AS dependencies
9783
## install vendors
9884
USER 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
85+
COPY --chown=www-data:www-data --from=4xxi/php-security-checker /usr/local/bin/local-php-security-checker /usr/local/bin/local-php-security-checker
10086
RUN APP_ENV=prod composer install --prefer-dist --no-plugins --no-scripts --no-dev --optimize-autoloader
10187
#
10288
## ---- Release ----

0 commit comments

Comments
 (0)