-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·37 lines (30 loc) · 1.05 KB
/
test.sh
File metadata and controls
executable file
·37 lines (30 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
set -eoxf pipefail
s3Accesskey=drycc
s3Secretkey=123456789
STORAGE_JOB=$(docker run -d --name storage \
-e DRYCC_STORAGE_ACCESSKEY=$s3Accesskey \
-e DRYCC_STORAGE_SECRETKEY=$s3Secretkey \
"${DEV_REGISTRY}"/drycc/storage:canary minio server /data/storage/ --console-address :9001)
sleep 5
docker logs "${STORAGE_JOB}"
STORAGE_IP=$(docker inspect --format "{{ .NetworkSettings.IPAddress }}" "${STORAGE_JOB}")
JOB=$(docker run --add-host storage:"${STORAGE_IP}" \
-d \
-p 5000:5000 \
-e REGISTRY_HTTP_SECRET=drycc \
-e DRYCC_REGISTRY_REDIRECT=false \
-e DRYCC_REGISTRY_USERNAME=admin \
-e DRYCC_REGISTRY_PASSWORD=admin \
-e DRYCC_STORAGE_LOOKUP=path \
-e DRYCC_STORAGE_BUCKET=registry \
-e DRYCC_STORAGE_ENDPOINT=http://storage:9000 \
-e DRYCC_STORAGE_ACCESSKEY=$s3Accesskey \
-e DRYCC_STORAGE_SECRETKEY=$s3Secretkey \
"$1")
# let the registry run for a few seconds
sleep 5
# check that the registry is still up
docker logs "${JOB}"
docker ps -q --no-trunc=true | grep "${JOB}"
docker rm -f "${JOB}" "${STORAGE_JOB}"