goharbor / harbor

An open source trusted cloud native registry project that stores, signs, and scans content.
https://goharbor.io
Apache License 2.0
24.29k stars 4.77k forks source link

how to install harbor on windows 10 #20825

Open FreemanKevin opened 3 months ago

FreemanKevin commented 3 months ago
[Step 5]: starting Harbor ...
WARN[0000] /mnt/c/Users/Devops/Documents/localenv/harbor/docker-compose.yml: `version` is obsolete
[+] Running 10/10
 ✔ Network harbor_harbor        Created                                                                                                                                                                                         0.0s
 ✔ Container harbor-log         Started                                                                                                                                                                                         1.0s
 ✔ Container redis              Started                                                                                                                                                                                         1.2s
 ✔ Container harbor-portal      Started                                                                                                                                                                                         1.7s
 ✔ Container harbor-db          Started                                                                                                                                                                                         1.9s
 ✔ Container registryctl        Started                                                                                                                                                                                         1.7s
 ✔ Container registry           Started                                                                                                                                                                                         1.9s
 ✔ Container harbor-core        Started                                                                                                                                                                                         2.0s
 ✔ Container harbor-jobservice  Started                                                                                                                                                                                         2.4s
 ✔ Container nginx              Started                                                                                                                                                                                         3.0s
✔ ----Harbor has been installed and started successfully.----
debian@Devops:/mnt/c/Users/Devops/Documents/localenv/harbor$ sudo docker-compose ps -a
[sudo] password for debian:
WARN[0000] /mnt/c/Users/Devops/Documents/localenv/harbor/docker-compose.yml: `version` is obsolete
NAME                IMAGE                                 COMMAND                  SERVICE       CREATED          STATUS                             PORTS
harbor-core         goharbor/harbor-core:v2.10.3          "/harbor/entrypoint.…"   core          14 minutes ago   Up 52 seconds (health: starting)
harbor-db           goharbor/harbor-db:v2.10.3            "/docker-entrypoint.…"   postgresql    14 minutes ago   Restarting (1) 44 seconds ago
harbor-jobservice   goharbor/harbor-jobservice:v2.10.3    "/harbor/entrypoint.…"   jobservice    14 minutes ago   Restarting (2) 51 seconds ago
harbor-log          goharbor/harbor-log:v2.10.3           "/bin/sh -c /usr/loc…"   log           14 minutes ago   Up 14 minutes (healthy)            127.0.0.1:1514->10514/tcp
harbor-portal       goharbor/harbor-portal:v2.10.3        "nginx -g 'daemon of…"   portal        14 minutes ago   Up 14 minutes (healthy)
nginx               goharbor/nginx-photon:v2.10.3         "nginx -g 'daemon of…"   proxy         14 minutes ago   Up 14 minutes (healthy)            0.0.0.0:80->8080/tcp, 0.0.0.0:443->8443/tcp
redis               goharbor/redis-photon:v2.10.3         "redis-server /etc/r…"   redis         14 minutes ago   Up 14 minutes (healthy)
registry            goharbor/registry-photon:v2.10.3      "/home/harbor/entryp…"   registry      14 minutes ago   Up 14 minutes (healthy)
registryctl         goharbor/harbor-registryctl:v2.10.3   "/home/harbor/start.…"   registryctl   14 minutes ago   Up 14 minutes (healthy)

i want to use it on windows but there is a error:

harbor-db  | initdb: error: could not change permissions of "/var/lib/postgresql/data/pg14/postgresql.conf": Operation not permitted
harbor-db  | initdb: removing data directory "/var/lib/postgresql/data/pg14"
harbor-db  | creating configuration files ... init DB, DB version:14
harbor-db  | The files belonging to this database system will be owned by user "postgres".
harbor-db  | This user must also own the server process.
harbor-db  |
harbor-db  | The database cluster will be initialized with locales
harbor-db  |   COLLATE:  en_US.UTF-8
harbor-db  |   CTYPE:    en_US.UTF-8
harbor-db  |   MESSAGES: C
harbor-db  |   MONETARY: C
harbor-db  |   NUMERIC:  C
harbor-db  |   TIME:     C
harbor-db  | The default text search configuration will be set to "english".
harbor-db  |
harbor-db  | Data page checksums are disabled.
harbor-db  |
harbor-db  | creating directory /var/lib/postgresql/data/pg14 ... ok
harbor-db  | creating subdirectories ... ok
harbor-db  | selecting dynamic shared memory implementation ... posix
harbor-db  | selecting default max_connections ... 20
harbor-db  | selecting default shared_buffers ... 400kB
harbor-db  | selecting default time zone ... UTC
harbor-db  | initdb: error: could not change permissions of "/var/lib/postgresql/data/pg14/postgresql.conf": Operation not permitted
harbor-db  | initdb: removing data directory "/var/lib/postgresql/data/pg14"

i dont know how to repair it.

here is my docker and os version.

debian@Devops:/mnt/c/Users/Devops/Documents/localenv/harbor$ cat  /etc/issue
Debian GNU/Linux 12 \n \l
debian@Devops:/mnt/c/Users/Devops/Documents/localenv/harbor$ docker info
Client:
 Version:    27.0.3
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.15.1-desktop.1
    Path:     /usr/local/lib/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.28.1-desktop.1
    Path:     /usr/local/lib/docker/cli-plugins/docker-compose
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.32
    Path:     /usr/local/lib/docker/cli-plugins/docker-debug
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     /usr/local/lib/docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.25
    Path:     /usr/local/lib/docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
    Path:     /usr/local/lib/docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.3.0
    Path:     /usr/local/lib/docker/cli-plugins/docker-init
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /usr/local/lib/docker/cli-plugins/docker-sbom
  scout: Docker Scout (Docker Inc.)
    Version:  v1.10.0
    Path:     /usr/local/lib/docker/cli-plugins/docker-scout

Server:
 Containers: 9
  Running: 7
  Paused: 0
  Stopped: 2
 Images: 19
 Server Version: 27.0.3
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: ae71819c4f5e67bb4d5ae76a6b735f29cc25774e
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
 Kernel Version: 5.15.153.1-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 31.31GiB
 Name: docker-desktop
 ID: 5362828e-f0f1-4e49-892b-f4347682fc42
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Labels:
  com.docker.desktop.address=unix:///var/run/docker-cli.sock
 Experimental: true
 Insecure Registries:
  hubproxy.docker.internal:5555
  0.0.0.0/0
  127.0.0.0/8
 Registry Mirrors:
  https://docker.m.daocloud.io/
  http://docker.1panel.live/
  https://docker.agsv.top/
  https://docker.agsvpt.work/
  https://dockerpull.com/
  https://dockerproxy.cn/
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
WARNING: daemon is not using the default seccomp profile
stonezdj commented 3 months ago

Harbor doesn't support in Windows platform

FreemanKevin commented 3 months ago

It seems that only the database is having issues, could you provide some support? It can be managed through Compose on Windows.

Vad1mo commented 3 months ago

harbor-db | initdb: error: could not change permissions of "/var/lib/postgresql/data/pg14/postgresql.conf": Operation not permitted

please make sure the config is usable in the container. (correct permission)

FreemanKevin commented 3 months ago

Yes, but it seems that even after modifying the directory permissions on Windows, it still doesn't work.

github-actions[bot] commented 1 month ago

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

Thesuperkingofsnakes22 commented 1 month ago

InShot_۲۰۲۴۱۰۲۱_۰۱۲۲۳۶۳۱۴.jpg