mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-16 15:25:18 +01:00
[Cherry-pick]Replace python script with node script for portal Dockerfile (#18641)
* Replace python script with node script for portal Dockerfile Signed-off-by: AllForNothing <sshijun@vmware.com> * Fix build db base error in build_base_images Signed-off-by: Yang Jiao <jiaoya@vmware.com> --------- Signed-off-by: AllForNothing <sshijun@vmware.com> Signed-off-by: Yang Jiao <jiaoya@vmware.com> Co-authored-by: Yang Jiao <jiaoya@vmware.com>
This commit is contained in:
parent
3069231a2b
commit
1e616ad393
@ -8,6 +8,9 @@
|
||||
* Add date here... Add signature here...
|
||||
- Add your reason here...
|
||||
|
||||
* May 08 2023 <jiaoya@vmware.com>
|
||||
- Refresh base image
|
||||
|
||||
* Feb 01 2023 <jiaoya@vmware.com>
|
||||
- Refresh base image
|
||||
|
||||
|
3
Makefile
3
Makefile
@ -348,6 +348,9 @@ build_base_docker:
|
||||
build_base_images:
|
||||
@echo build_base_images start
|
||||
@for name in chartserver clair clair-adapter core db jobservice log nginx notary-server notary-signer portal prepare redis registry registryctl; do \
|
||||
if [ $$name == "db" ] ; then \
|
||||
cd $(MAKEFILEPATH_PHOTON)/$$name && $(MAKEFILEPATH_PHOTON)/$$name/rpm_builder.sh && cd - ; \
|
||||
fi; \
|
||||
$(DOCKERBUILD) --pull -f $(MAKEFILEPATH_PHOTON)/$$name/Dockerfile.base -t goharbor/harbor-$$name-base:$(BASEIMAGETAG) .; \
|
||||
done
|
||||
@echo build_base_images done
|
||||
|
@ -10,9 +10,8 @@ COPY src/portal/package.json /build_dir
|
||||
COPY src/portal/package-lock.json /build_dir
|
||||
COPY ./api/harbor/swagger.yaml /build_dir
|
||||
|
||||
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 \
|
||||
RUN npm install js-yaml@4.1.0 \
|
||||
&& 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));" \
|
||||
&& npm install
|
||||
|
||||
COPY ./LICENSE /build_dir
|
||||
|
Loading…
Reference in New Issue
Block a user