Skip to content

Commit

Permalink
#1: Configure the registry to permit deletes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ximon18 committed Apr 4, 2019
1 parent e101866 commit c27c787
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,15 @@ Q: Why did you spend the time creating this? Didn't you see that XXX has already

A: Partly as a learning exercise about Terraform. Despire some Googling I may have course missed something on the vast web so no I didn't see XXX and I would love to hear about any other solutions out there that I may have missed.

Q: How do I delete images?

A: Either by making [REST API](https://docs.docker.com/registry/spec/api/#deleting-an-image) calls manually or more easily by using the wonderful [Docker registry v2 command line client](https://github.com/genuinetools/reg) with command `reg rm -u <user> -p <pass> <registryfqdn>/<repo>/<image>:<tag>. *Note:* You will need at least v0.0.1-beta of the Terraform template and have redeployed using `terraform apply`, otherwise your registry will not reject delete commands with HTTP 405.

Q: How do I cleanup space still used by deleted images?

A: SSH to the Docker Droplet as user root, then issue the following command:
```
docker exec -it registry bin/registry garbage-collect /etc/docker/registry//config.yml
```

END
1 change: 1 addition & 0 deletions registry-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ EOF

if [ ! -z "${REGISTRY_S3_ENDPOINT}" ]; then
cat <<-EOF >> $DOCKER_RUN_ENV_VARS_PATH
REGISTRY_STORAGE_DELETE_ENABLED=true
REGISTRY_STORAGE=s3
REGISTRY_STORAGE_S3_ENCRYPT=${REGISTRY_S3_ENCRYPT}
REGISTRY_STORAGE_S3_ACCESSKEY="${REGISTRY_S3_ACCESSKEY}"
Expand Down

0 comments on commit c27c787

Please sign in to comment.