Skip to content

Commit f6b72f8

Browse files
author
Ekaterina Volkova
committed
1. Use google/debian as a base image for the registry.
2. Pass BOTO_PATH environment variable instead of just email to figure out that path.
1 parent 023e7ab commit f6b72f8

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:jessie
1+
FROM google/debian:wheezy
22

33
ADD . /docker-registry
44

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ After [google/docker-registry](https://index.docker.io/u/google/docker-registry)
2020

2121
#### Locally
2222

23-
1. Start the registry and mount your credentials from a data container named gcloud-config. You also need to pass some environment variables to your container, i.e. GCS_BUCKET and an EMAIL address that you have logged in with. For more information about getting OAuth2 credentials please refer to [google/cloud-sdk](https://index.docker.io/u/google/cloud-sdk/) documentation.
23+
1. Start the registry and mount your credentials from a data container named gcloud-config. You also need to pass some environment variables to your container, i.e. GCS_BUCKET and BOTO_PATH (path to your .boto file with credentials. If you have logged in with [gcloud container](https://index.docker.io/u/google/cloud-sdk/), your credentials are in /.config/gcloud/legacy_credentials/<YOUR_EMAIL>/.boto. For more information about getting OAuth2 credentials please refer to [google/cloud-sdk](https://index.docker.io/u/google/cloud-sdk/) documentation.
2424

2525

2626
```
27-
docker run -d -e GCS_BUCKET=yet-another-docker-bucket -e EMAIL=<your email> -p 5000:5000 \
27+
docker run -d -e GCS_BUCKET=yet-another-docker-bucket \
28+
-e BOTO_PATH='/.config/gcloud/legacy_credentials/<YOUR_EMAIL>/.boto' -p 5000:5000 \
2829
--volumes-from gcloud-config google/docker-registry
2930
```
3031

run.sh

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@ REGISTRY_PORT=${REGISTRY_PORT:-5000}
55
GUNICORN_GRACEFUL_TIMEOUT=${GUNICORN_GRACEFUL_TIMEOUT:-3600}
66
GUNICORN_SILENT_TIMEOUT=${GUNICORN_SILENT_TIMEOUT:-3600}
77

8-
export BOTO_PATH=/.config/gcloud/legacy_credentials/${EMAIL}/.boto
9-
108
cd "$(dirname $0)"
119
exec gunicorn --access-logfile - --debug --max-requests 100 --graceful-timeout $GUNICORN_GRACEFUL_TIMEOUT -t $GUNICORN_SILENT_TIMEOUT -k gevent -b 0.0.0.0:$REGISTRY_PORT -w $GUNICORN_WORKERS wsgi:application

0 commit comments

Comments
 (0)