mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-22 16:48:30 +01:00
fix(build): npm install with special endpoint (#10168)
Signed-off-by: Ziming Zhang <zziming@vmware.com> Change-Id: Iaaf33310a2621d58cdc3b9d3359607a961fef05e
This commit is contained in:
parent
9e83b9f1fc
commit
9cad403762
@ -5,20 +5,20 @@ WORKDIR /build_dir
|
||||
|
||||
ARG npm_registry=https://registry.npmjs.org
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends python-yaml=3.12-1
|
||||
|
||||
COPY src/portal/package.json /build_dir
|
||||
COPY src/portal/package-lock.json /build_dir
|
||||
COPY ./API/harbor/swagger.yaml /build_dir
|
||||
ENV NPM_CONFIG_REGISTRY=${npm_registry}
|
||||
RUN npm install
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends python-yaml=3.12-1 \
|
||||
&& python -c 'import sys, yaml, json; y=yaml.load(sys.stdin.read()); print json.dumps(y)' < swagger.yaml > swagger.json \
|
||||
&& npm install
|
||||
COPY ./API/harbor/swagger.yaml /build_dir
|
||||
RUN python -c 'import sys, yaml, json; y=yaml.load(sys.stdin.read()); print json.dumps(y)' < swagger.yaml > swagger.json
|
||||
|
||||
COPY ./LICENSE /build_dir
|
||||
COPY src/portal /build_dir
|
||||
|
||||
ENV NPM_CONFIG_REGISTRY=${npm_registry}
|
||||
|
||||
RUN node --max_old_space_size=2048 'node_modules/@angular/cli/bin/ng' build --prod
|
||||
|
||||
FROM goharbor/harbor-portal-base:${harbor_base_image_version}
|
||||
|
Loading…
Reference in New Issue
Block a user