diff --git a/.dockerignore b/.dockerignore index 552fe5a108..8ce97589be 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,4 +2,6 @@ !bin !lib !package.json +!LICENSE +!npm-shrinkwrap.json !docker diff --git a/Dockerfile b/Dockerfile index 859c84c2e0..29a40774c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,8 @@ RUN wpr installroot --https_cert_file /webpagereplay/certs/wpr_cert.pem --https_ RUN mkdir -p /usr/src/app WORKDIR /usr/src/app -COPY package.* /usr/src/app/ +COPY package.json /usr/src/app/ +COPY npm-shrinkwrap.json /usr/src/app/ RUN npm install --production && npm cache clean --force COPY . /usr/src/app @@ -37,7 +38,6 @@ RUN mkdir -m 0750 /root/.android ADD docker/adb/insecure_shared_adbkey /root/.android/adbkey ADD docker/adb/insecure_shared_adbkey.pub /root/.android/adbkey.pub - # Allow all users to run commands needed by sitespeedio/throttle via sudo # See https://github.com/sitespeedio/throttle/blob/main/lib/tc.js RUN echo 'ALL ALL=NOPASSWD: /usr/sbin/tc, /usr/sbin/route, /usr/sbin/ip' > /etc/sudoers.d/tc