From 65acfb1ff0d34133caa9e1dbed49325b153a23f6 Mon Sep 17 00:00:00 2001 From: renzaspiras Date: Tue, 4 Nov 2025 10:06:29 -0800 Subject: [PATCH] pearl harbor --- Dockerfile | 9 ++++--- harbor.yml | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 harbor.yml diff --git a/Dockerfile b/Dockerfile index 9e1124b..b12c20a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,8 @@ FROM ubuntu:22.04 # Install dependencies RUN apt-get update && \ apt-get install -y curl tar wget docker.io docker-compose sudo && \ - rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/* && \ + export TERM=xterm # Set environment variables ENV HARBOR_VERSION=2.9.0 @@ -23,11 +24,11 @@ RUN curl -LO https://github.com/goharbor/harbor/releases/download/v$HARBOR_VERSI # Set workdir to the Harbor folder WORKDIR $HARBOR_DIR/harbor -# Copy a default harbor.yml config (optional) -# COPY harbor.yml ./harbor.yml +# Copy a default harbor.yml config +COPY harbor.yml ./harbor.yml # Expose default Harbor ports EXPOSE 80 443 4443 # Run the installer -CMD ["./install.sh", "--with-notary", "--with-clair"] +CMD ["./install.sh", "--with-trivy"] diff --git a/harbor.yml b/harbor.yml new file mode 100644 index 0000000..743dd12 --- /dev/null +++ b/harbor.yml @@ -0,0 +1,72 @@ +# Harbor configuration file + +# General settings +hostname: harbor.craftmatrix.org +http: + port: 80 +https: + port: 443 + certificate: /data/cert/server.crt + private_key: /data/cert/server.key + +# Database settings +database: + password: root123 + max_idle_conns: 100 + max_open_conns: 900 + +# Redis settings +redis: + password: redis123 + +# Log settings +log: + level: info + local: + rotate_count: 50 + rotate_size: 200M + location: /var/log/harbor + +# Storage settings +storage_service: + ca_bundle: /data/registry/ca-bundle.crt + filesystem: + maxthreads: 100 + # Uncomment and configure for other storage types + # s3: + # region: us-west-1 + # bucket: harbor-bucket + # accesskey: access-key + # secretkey: secret-key + +# Project creation quotas +project_creation_restriction: everyone + +# Admin password +adminserver: + password: Harbor12345 + +# Jobservice settings +jobservice: + max_job_workers: 10 + job_logger_provider: file + +# Registry settings +registry: + credentials_ttl: 5m + +# Chart storage settings +chart: + absolute_url: disabled + +# Clair settings +clair: + updaters_interval: 12 + +# Trivy settings +trivy: + ignore_unfixed: false + skip_update: false + offline_scan: false + security_check: vuln + insecure: false \ No newline at end of file