docker update for cache and temporary user remove

This commit is contained in:
Timo Bejan 2021-11-10 13:43:36 +02:00
parent 17f58fc6bf
commit 18769d49fb
2 changed files with 20 additions and 3 deletions

View File

@ -1,9 +1,17 @@
FROM node:14.17-alpine as prep
RUN apk add --update jq && rm -rf /var/cache/apk/*
COPY package.json /tmp
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:14.17-alpine as builder
RUN apk add --update jq && rm -rf /var/cache/apk/*
COPY package.json yarn.lock ./
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 install --verbose && mkdir /ng-app && mv ./node_modules ./ng-app
@ -46,7 +54,7 @@ RUN chmod g+r -R /usr/share/nginx/html
## Change permissions to enable openShift functionality
RUN chmod -R g+rwx /var/cache/nginx /var/run /var/log/nginx /usr/share /etc/nginx
USER 1001
# USER 1001
COPY docker/red-ui/docker-entrypoint.sh /
CMD ["/docker-entrypoint.sh"]

View File

@ -87,6 +87,15 @@ async function execute() {
}
}
for (let key of Object.keys(flatEnglish)) {
try {
const result = tmfc.compile(flatEnglish[key], 'de');
//console.log(result);
} catch (e) {
console.error('ERROR AT: ', flatEnglish[key]);
}
}
const mergedGerman = { ...flatEnglish, ...flatGerman };
const finalGerman = unflatten(mergedGerman);