-
Notifications
You must be signed in to change notification settings - Fork 35
/
docker-compose.yml
51 lines (44 loc) · 1.21 KB
/
docker-compose.yml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
version: '2'
# # register id/pass to the database volume(registry2_authdb)
# > docker-compose run --rm register_user
# # boot up docker registry container
# > docker-compose up -d registry
# # you can execute examples (and docker-login too)
# > ./target/debug/examples/push
services:
iostream:
build:
context: ./docker/attach
image: test-iostream:latest
signal:
build:
context: ./docker/signal
image: test-signal:latest
# Docker registry container.
# This service is used for examples/login and auth.
registry:
image: registry:2
container_name: registry2
environment:
REGISTRY_AUTH: htpasswd
REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
volumes:
- registry2_authdb:/auth
ports:
- 5000:5000
restart: always
networks:
- default
# User password db generator for basic authentication.
register_user:
image: registry:2
environment:
REGISTRY_USER: "someusername"
REGISTRY_PASSWORD: "somepassword"
volumes:
- registry2_authdb:/auth
command: |
sh -c "htpasswd -Bbn $${REGISTRY_USER} $${REGISTRY_PASSWORD} >> /auth/htpasswd"
volumes:
registry2_authdb: