Remove unnecessary read-user from registry config
Some checks are pending
Some checks are pending
This commit is contained in:
parent
0d9a943f66
commit
9b53f96ae2
1 changed files with 2 additions and 6 deletions
|
@ -490,20 +490,16 @@ exit
|
|||
# Switch to SERVICE_USER (registry directory owner)
|
||||
sudo su - SERVICE_USER
|
||||
|
||||
# Create htpasswd file for authentication (required for push operations)
|
||||
# Create htpasswd file for authentication (required for push operations only)
|
||||
mkdir -p /opt/registry/auth
|
||||
htpasswd -Bbn push-user "$(openssl rand -base64 32)" > /opt/registry/auth/auth.htpasswd
|
||||
|
||||
# Create a read-only user (optional, for additional security)
|
||||
htpasswd -Bbn read-user "$(openssl rand -base64 32)" >> /opt/registry/auth/auth.htpasswd
|
||||
|
||||
# Exit SERVICE_USER shell
|
||||
exit
|
||||
```
|
||||
|
||||
**What this does**: Creates user credentials for registry authentication.
|
||||
- `push-user`: Can push and pull images (used by CI/CD pipeline for deployments)
|
||||
- `read-user`: Can only pull images (optional, for read-only access)
|
||||
- `push-user`: Can push images (used by CI/CD pipeline for deployments)
|
||||
|
||||
**Note**: Pull operations are public and don't require authentication, but push operations require these credentials.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue