diff --git a/images/nodesvc-base/Dockerfile b/images/nodesvc-base/Dockerfile index 2e8e26986..89ce1215e 100644 --- a/images/nodesvc-base/Dockerfile +++ b/images/nodesvc-base/Dockerfile @@ -1,15 +1,20 @@ -FROM registry.scality.com/federation/nodesvc-base:7.10.5.0 +FROM registry.scality.com/federation/nodesvc-base:7.10.7.0 as builder -WORKDIR ${HOME_DIR}/backbeat +WORKDIR /tmp/build + +COPY ./package.json ./yarn.lock /tmp/build -COPY ./package.json ./yarn.lock ${HOME_DIR}/backbeat +RUN yarn cache clean \ + && yarn install --production --frozen-lockfile --ignore-optional --ignore-engines --network-concurrency 1 \ + && yarn cache clean -# Remove when gitcache is sorted out -RUN rm /root/.gitconfig +################################################################################ +FROM registry.scality.com/federation/nodesvc-base:7.10.7.0 -RUN yarn install --production --frozen-lockfile --network-concurrency 1 +WORKDIR ${HOME_DIR}/backbeat COPY . ${HOME_DIR}/backbeat +COPY --from=builder /tmp/build/node_modules ./node_modules/ RUN chown -R ${USER} ${HOME_DIR}/backbeat