update node & clear caches

This commit is contained in:
Dan Percic 2023-06-23 16:26:42 +03:00
parent 253048f707
commit 4b27e97c4e
2 changed files with 4 additions and 4 deletions

View File

@ -1,8 +1,7 @@
FROM node:18.12-buster as prep
FROM node:18.16-buster as prep
RUN apt-get update && apt-get install -y jq
COPY package.json /tmp
RUN cat /tmp/package.json
RUN jq '{ dependencies, devDependencies, peerDependencies, scripts: (.scripts | { postinstall }) }' < /tmp/package.json > /tmp/deps.json
# keep postinstall script
@ -10,13 +9,14 @@ RUN jq '{ dependencies, devDependencies, peerDependencies, scripts: (.scripts |
### STAGE 1: Build ###
# We label our stage as builder
FROM node:18.12-buster as builder
FROM node:18.16-buster as builder
#RUN apt-get update && apt-get install -y jq
COPY --from=prep /tmp/deps.json ./package.json
COPY yarn.lock ./
## Storing node modules on a separate layer will prevent unnecessary npm installs at each build
RUN yarn cache clean
RUN yarn install && mkdir /ng-app && mv ./node_modules ./ng-app
ARG bamboo_sonarqube_api_token_secret
ENV bamboo_sonarqube_api_token_secret=$bamboo_sonarqube_api_token_secret

View File

@ -1,6 +1,6 @@
{
"name": "redaction",
"version": "3.988.61",
"version": "3.988.62",
"private": true,
"license": "MIT",
"scripts": {