Update gitea-docker-cicd/README.md
This commit is contained in:
@@ -73,9 +73,14 @@ This container stores the Docker images built by the runner.
|
|||||||
ports:
|
ports:
|
||||||
# Map to a host port, e.g., 5000. Change if needed.
|
# Map to a host port, e.g., 5000. Change if needed.
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
|
environment:
|
||||||
|
REGISTRY_AUTH: htpasswd
|
||||||
|
REGISTRY_AUTH_HTPASSWD_REALM: Local Registry
|
||||||
|
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
|
||||||
volumes:
|
volumes:
|
||||||
# Persist registry data
|
# Persist registry data
|
||||||
- ./registry-data:/var/lib/registry
|
- ./registry-data:/var/lib/registry
|
||||||
|
- ./auth:/auth
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
# Use a common network if Gitea/Runner need to access it by name
|
# 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.*
|
* *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 `<your_desired_registry_username>` with your chosen username. You will be prompted for a password - remember it!
|
||||||
|
|
||||||
|
`htpasswd -B -c ./auth/htpasswd <your_desired_registry_username>`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Step 3: Set up Gitea Runners
|
## Step 3: Set up Gitea Runners
|
||||||
|
|||||||
Reference in New Issue
Block a user