Skip to content
This repository was archived by the owner on May 3, 2023. It is now read-only.

Commit 7c07c7f

Browse files
committed
Install Yarn in container to enable Yarn Audit
1 parent 7bc24cf commit 7c07c7f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

support/docker/init-test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ docker-compose up -d
88

99
docker-compose exec -T php-fpm.readid.stepup.example.com bash -c '
1010
composer install --prefer-dist -n -o && \
11-
./bin/console cache:clear --env=test
11+
./bin/console cache:clear --env=test && \
12+
yarn install --frozen-lockfile
1213
'

support/docker/php-fpm/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ FROM php:7.2-fpm
33
# Copy phpfpm config
44
COPY support/docker/php-fpm/app.ini /usr/local/etc/php/conf.d/
55

6+
# Yank the node and npm binaries from the official Node docker container
7+
COPY --from=node:14 /usr/local/lib/node_modules /usr/local/lib/node_modules
8+
COPY --from=node:14 /usr/local/bin/node /usr/local/bin/node
9+
COPY --from=node:14 /usr/local/bin/yarn /usr/local/bin/yarn
10+
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
11+
RUN npm install -g yarn
12+
613
# Install dependencies
714
RUN apt-get update && apt-get install -y \
815
git \

0 commit comments

Comments
 (0)