Skip to content

Change config path and update the config file#166

Merged
milosgajdos merged 2 commits into
distribution:masterfrom
milosgajdos:docker-distribution
Jul 10, 2024
Merged

Change config path and update the config file#166
milosgajdos merged 2 commits into
distribution:masterfrom
milosgajdos:docker-distribution

Conversation

@milosgajdos

@milosgajdos milosgajdos commented May 29, 2024

Copy link
Copy Markdown
Member

We've changed the default config path file from
to the one that no longer references docker.

The same goes for the entrypoint shell script.

We've also updated the default config file:

  • added concurrency limit
  • exposed prometheus metrics

Followup to distribution/distribution#4365

We've changed the default config path file from
to the one that no longer references docker.

The same goes for the entrypoint shell script.

We've also updated the default config file.

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
@milosgajdos

Copy link
Copy Markdown
Member Author

PTAL @thaJeztah @Jamstah @wy65701436

@wy65701436 wy65701436 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
@milosgajdos

Copy link
Copy Markdown
Member Author

Build succeeds:

Toggle me!
docker build . -t foo/registry
[+] Building 7.9s (10/10) FINISHED                                                                                                                                                                                                                                                        docker:orbstack
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                 0.0s
 => => transferring dockerfile: 1.53kB                                                                                                                                                                                                                                                               0.0s
 => [internal] load metadata for docker.io/library/alpine:3.20                                                                                                                                                                                                                                       1.8s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                    0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                                                      0.0s
 => [1/5] FROM docker.io/library/alpine:3.20@sha256:b89d9c93e9ed3597455c90a0b88a8bbb5cb7188438f70953fede212a0c4394e0                                                                                                                                                                                 1.2s
 => => resolve docker.io/library/alpine:3.20@sha256:b89d9c93e9ed3597455c90a0b88a8bbb5cb7188438f70953fede212a0c4394e0                                                                                                                                                                                 0.0s
 => => sha256:b89d9c93e9ed3597455c90a0b88a8bbb5cb7188438f70953fede212a0c4394e0 1.85kB / 1.85kB                                                                                                                                                                                                       0.0s
 => => sha256:647a509e17306d117943c7f91de542d7fb048133f59c72dff7893cffd1836e11 528B / 528B                                                                                                                                                                                                           0.0s
 => => sha256:092561eea88f9f28654bbade209576f5f93efeb8c7ba66a07ac2033c0ddc8ae7 1.49kB / 1.49kB                                                                                                                                                                                                       0.0s
 => => sha256:a258b2a6b59a7aa244d8ceab095c7f8df726f27075a69fca7ad8490f3f63148a 4.09MB / 4.09MB                                                                                                                                                                                                       1.1s
 => => extracting sha256:a258b2a6b59a7aa244d8ceab095c7f8df726f27075a69fca7ad8490f3f63148a                                                                                                                                                                                                            0.1s
 => [internal] load build context                                                                                                                                                                                                                                                                    0.0s
 => => transferring context: 629B                                                                                                                                                                                                                                                                    0.0s
 => [2/5] RUN apk add --no-cache ca-certificates                                                                                                                                                                                                                                                     1.0s
 => [3/5] RUN set -eux;  version='3.0.0-beta.1';  apkArch="$(apk --print-arch)";  case "$apkArch" in   x86_64)  arch='amd64';   sha256='96344f15da3ddbef8cf300f9642d03a2b0a7aaa0b593dfe89a9ad266c5aa4ff4' ;;   aarch64) arch='arm64';   sha256='62e3e0c168f62ac274672446a3f6ea89ebdfedc6630e4b02d93  3.6s
 => [4/5] COPY ./config-example.yml /etc/distribution/config.yml                                                                                                                                                                                                                                     0.1s
 => [5/5] COPY entrypoint.sh /entrypoint.sh                                                                                                                                                                                                                                                          0.1s
 => exporting to image                                                                                                                                                                                                                                                                               0.1s
 => => exporting layers                                                                                                                                                                                                                                                                              0.1s
 => => writing image sha256:7c406450b3c18323a096861e4b98e35b865f001ae3294dd4e045f25ef070f4e9                                                                                                                                                                                                         0.0s
 => => naming to docker.io/foo/registry

Running the image:

Toggle me!
$ docker run -it foo/registry -v
registry github.com/distribution/distribution/v3 3.0.0-beta.1

Running default config:

Toggle me!
$ docker run -it foo/registry
DEBU[0000] using "text" logging formatter
WARN[0000] No HTTP secret provided - generated random secret. This may cause problems with uploads if multiple registries are behind a load-balancer. To provide a shared secret, fill in http.secret in the configuration file or set the REGISTRY_HTTP_SECRET environment variable.  environment=development go.version=go1.22.4 instance.id=022d6590-b41d-4353-9b49-011550bc1a3e service=registry version=3.0.0-beta.1
INFO[0000] redis not configured                          environment=development go.version=go1.22.4 instance.id=022d6590-b41d-4353-9b49-011550bc1a3e service=registry version=3.0.0-beta.1
INFO[0000] using inmemory blob descriptor cache          environment=development go.version=go1.22.4 instance.id=022d6590-b41d-4353-9b49-011550bc1a3e service=registry version=3.0.0-beta.1
INFO[0000] Starting upload purge in 51m0s                environment=development go.version=go1.22.4 instance.id=022d6590-b41d-4353-9b49-011550bc1a3e service=registry version=3.0.0-beta.1
INFO[0000] providing prometheus metrics on /metrics
INFO[0000] listening on [::]:5000                        environment=development go.version=go1.22.4 instance.id=022d6590-b41d-4353-9b49-011550bc1a3e service=registry version=3.0.0-beta.1
INFO[0000] debug server listening :5001

@milosgajdos milosgajdos merged commit a943e89 into distribution:master Jul 10, 2024
@milosgajdos milosgajdos deleted the docker-distribution branch July 10, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants