RED-6686 simplified build
This commit is contained in:
parent
53c6e8a5b3
commit
53b59d354d
@ -1,19 +1,6 @@
|
|||||||
FROM node:18.12-buster as prep
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y jq
|
|
||||||
COPY package.json /tmp
|
|
||||||
COPY version.json version.json
|
|
||||||
RUN cat version.json
|
|
||||||
|
|
||||||
RUN jq '{ dependencies, devDependencies, peerDependencies, scripts: (.scripts | { postinstall }) }' < /tmp/package.json > /tmp/deps.json
|
|
||||||
# keep postinstall script
|
|
||||||
|
|
||||||
### STAGE 1: Build ###
|
|
||||||
|
|
||||||
# We label our stage as ‘builder’
|
|
||||||
FROM node:18.12-buster as builder
|
FROM node:18.12-buster as builder
|
||||||
|
|
||||||
COPY --from=prep /tmp/deps.json ./package.json
|
COPY package.json package.json
|
||||||
COPY yarn.lock ./
|
COPY yarn.lock ./
|
||||||
|
|
||||||
## Storing node modules on a separate layer will prevent unnecessary npm installs at each build
|
## Storing node modules on a separate layer will prevent unnecessary npm installs at each build
|
||||||
@ -26,8 +13,6 @@ WORKDIR /ng-app
|
|||||||
COPY apps apps
|
COPY apps apps
|
||||||
COPY libs libs
|
COPY libs libs
|
||||||
COPY tools tools
|
COPY tools tools
|
||||||
COPY package.json package.json
|
|
||||||
COPY version.json version.json
|
|
||||||
COPY yarn.lock yarn.lock
|
COPY yarn.lock yarn.lock
|
||||||
COPY nx.json nx.json
|
COPY nx.json nx.json
|
||||||
COPY .eslintrc.json .eslintrc.json
|
COPY .eslintrc.json .eslintrc.json
|
||||||
@ -46,8 +31,7 @@ CMD ["/bin/cp", "-r", "/ng-app/dist/paligo-styles", "/tmp/styles-export"]
|
|||||||
### STAGE 2: Setup ###
|
### STAGE 2: Setup ###
|
||||||
|
|
||||||
|
|
||||||
FROM nginx:1.21.4-alpine
|
FROM nginx:1.25.1-alpine
|
||||||
RUN apk add --update nano && rm -rf /var/cache/apk/*
|
|
||||||
|
|
||||||
## Copy our default nginx config
|
## Copy our default nginx config
|
||||||
COPY docker/common/nginx/nginx.conf /etc/nginx/conf.d/default.conf
|
COPY docker/common/nginx/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|||||||
3
version.json
Normal file
3
version.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"FROTEND_APP_VERSION": "development"
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user