我正在尝试为我的私人docker注册表设置通知。但是我从docker compose文件中得到以下错误
PS C:\ mydockerregistry> docker-compose up
错误:撰写文件'。\ docker-compose.yml'无效,因为: 通知的配置选项不受支持:'端点'
这是我的docker撰写文件
registry:
restart: always
image: registry:2
ports:
- 5000:5000
notifications:
endpoints:
- name: alistener
url: https://requestb.in/13yg1rj1
timeout: 500ms
threshold: 5
backoff: 1s
答案 0 :(得分:3)
我采取的方法是错误的。通知不会出现在docker-compose文件中,而是出现在docker配置文件中 请参阅示例配置文件https://github.com/docker/distribution/blob/master/cmd/registry/config-example.yml 文档: https://docs.docker.com/registry/configuration/#example-development-configuration