-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace python script with node script for portal Dockerfile (#18635)
Signed-off-by: AllForNothing <[email protected]>
- Loading branch information
1 parent
362387f
commit 0a3509f
Showing
1 changed file
with
2 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,17 +6,15 @@ WORKDIR /build_dir | |
|
||
ARG npm_registry=https://registry.npmjs.org | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends python-yaml | ||
|
||
COPY ./api/v2.0/swagger.yaml /build_dir/swagger.yaml | ||
COPY src/portal /build_dir | ||
|
||
ENV NPM_CONFIG_REGISTRY=${npm_registry} | ||
RUN npm install --unsafe-perm | ||
RUN npm run generate-build-timestamp | ||
RUN node --max_old_space_size=2048 'node_modules/@angular/cli/bin/ng' build --configuration production | ||
RUN python -c 'import sys, yaml, json; y=yaml.load(sys.stdin.read()); print json.dumps(y)' < swagger.yaml > dist/swagger.json | ||
RUN npm install [email protected] \ | ||
&& node -e "const yaml = require('js-yaml'); const fs = require('fs'); const swagger = yaml.load(fs.readFileSync('swagger.yaml', 'utf8')); fs.writeFileSync('swagger.json', JSON.stringify(swagger));" | ||
|
||
COPY ./LICENSE /build_dir/dist | ||
|
||
|