From 1ec836469bb8d0a5968fa52340b02b390defe1cc Mon Sep 17 00:00:00 2001 From: yorgei Date: Fri, 4 Apr 2025 04:02:58 +0000 Subject: [PATCH] Update gitea-docker-cicd/README.md --- gitea-docker-cicd/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gitea-docker-cicd/README.md b/gitea-docker-cicd/README.md index 7002258..0b5798e 100644 --- a/gitea-docker-cicd/README.md +++ b/gitea-docker-cicd/README.md @@ -73,9 +73,14 @@ This container stores the Docker images built by the runner. ports: # Map to a host port, e.g., 5000. Change if needed. - "5000:5000" + environment: + REGISTRY_AUTH: htpasswd + REGISTRY_AUTH_HTPASSWD_REALM: Local Registry + REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd volumes: # Persist registry data - ./registry-data:/var/lib/registry + - ./auth:/auth restart: always networks: # Use a common network if Gitea/Runner need to access it by name @@ -113,6 +118,18 @@ This container stores the Docker images built by the runner. ``` * *Security Note: This uses HTTP and is insecure. For sensitive environments, configure TLS for the registry.* + +4. **Add auth to the registry** + * Create Auth Directory: Near your `docker-compose.yml` file. + + `mkdir auth` + + * Generate htpasswd File: Replace `` with your chosen username. You will be prompted for a password - remember it! + + `htpasswd -B -c ./auth/htpasswd ` + + + --- ## Step 3: Set up Gitea Runners