diff --git a/.dockerignore b/.dockerignore index 6e19512a0e024..098962ebd3b84 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,3 @@ +**/**/node_modules .dockerignore Dockerfile diff --git a/Dockerfile b/Dockerfile index a6492c568287f..029f0c0f51fb4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,28 @@ -FROM node:8.15-alpine +FROM amazonlinux:2 WORKDIR /app -RUN apk add --update \ - bash \ +ENV NODE_VERSION 8.16.0 + +RUN yum -y --security update \ + && yum install -y \ git \ rsync \ zip \ + unzip \ + tar \ + xz \ python3 \ python3-dev \ py3-setuptools \ - && rm -rf /var/cache/apk/* + && yum clean all \ + && rm -rf /var/cache/yum \ + && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \ + && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt" \ + && grep " node-v$NODE_VERSION-linux-x64.tar.xz\$" SHASUMS256.txt | sha256sum -c - \ + && tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \ + && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ + && rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt COPY . . diff --git a/link-all.sh b/link-all.sh index 297e5b19d24c3..6df7b1838ad56 100755 --- a/link-all.sh +++ b/link-all.sh @@ -25,8 +25,10 @@ for module in ${modules}; do # Symlink executable scripts into place as well. This is not completely # according to spec (we look in the bin/ directory instead of the { "scripts" # } entry in package.json but it's quite a bit easier. - [[ -d $module/bin ]] && for script in $(find $module/bin -perm +111); do - echo "${script} => node_modules/.bin/$(basename $script)" - ln -fs ${script} node_modules/.bin - done + if [[ -d $module/bin ]]; then + for script in $(find $module/bin -perm /111); do + echo "${script} => node_modules/.bin/$(basename $script)" + ln -fs ${script} node_modules/.bin + done + fi done