mirror of
https://github.com/goharbor/harbor
synced 2025-04-15 15:52:47 +00:00

* remove chart api from swagger Delete the api path for chart in the swagger Signed-off-by: Wang Yan <wangyan@vmware.com> * Remove chart APIs 1. Remove some chart-related steps for Dockerfile for portal container 2. Remove chart APIs for API center Signed-off-by: AllForNothing <sshijun@vmware.com> --------- Signed-off-by: Wang Yan <wangyan@vmware.com> Signed-off-by: AllForNothing <sshijun@vmware.com> Co-authored-by: Wang Yan <wangyan@vmware.com>
35 lines
1023 B
Docker
35 lines
1023 B
Docker
FROM node:16.10.0 as builder
|
|
|
|
WORKDIR /build_dir
|
|
|
|
COPY src/portal /build_dir
|
|
COPY api/v2.0/swagger.yaml /build_dir/swagger.yaml
|
|
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends python-yaml
|
|
RUN npm install --unsafe-perm
|
|
RUN npm run postinstall
|
|
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 cd app-swagger-ui && npm install --unsafe-perm
|
|
RUN cd app-swagger-ui && npm run build
|
|
|
|
FROM nginx:1.17
|
|
|
|
|
|
|
|
COPY --from=builder /build_dir/dist /usr/share/nginx/html
|
|
COPY --from=builder /build_dir/app-swagger-ui/dist /usr/share/nginx/html
|
|
COPY src/portal/docker-build/nginx.conf /etc/nginx/nginx.conf
|
|
|
|
EXPOSE 8080
|
|
VOLUME /var/cache/nginx /var/log/nginx /run
|
|
|
|
STOPSIGNAL SIGQUIT
|
|
|
|
HEALTHCHECK CMD curl --fail -s http://127.0.0.1:8080 || exit 1
|
|
USER nginx
|
|
CMD ["nginx", "-g", "daemon off;"]
|