我正在尝试在Azure容器实例中设置pi-hole。这是指向pi-hole的docker-compose文件的链接。
按照Azure Container实例的YAML reference,我正在尝试转换这个docker-compose文件。
这是我填充的YAML文件。
name: pi-hole
apiVersion: '2018-10-01'
location: westus2
tags: {}
properties:
containers:
- name: pihole
properties:
image: pihole/pihole:latest
ports:
- protocol: TCP
port: 53
- protocol: UDP
port: 53
- protocol: UDP
port: 67
- protocol: TCP
port: 80
- protocol: TCP
port: 443
environmentVariables:
- name: TZ
value: Asia/Kolkata
resources: # Resource requirements of the instance
requests:
memoryInGB: 1
cpu: 1
restartPolicy: Always
ipAddress:
ports:
- protocol: TCP
port: 53
- protocol: UDP
port: 53
- protocol: UDP
port: 67
- protocol: TCP
port: 80
- protocol: TCP
port: 443
type: public
dnsNameLabel: my-pihole
osType: Linux当我使用不同的协议(TCP 53和UDP 53)提供相同的端口时,就像在docker-compose文件中给出的一样,创建容器组失败,并显示以下错误
> az container create -g myResourceGroup -f container.yaml
Duplicate ports '53' found in container group 'pi-hole' container 'pihole'.如何输入端口来配置TCP和UDP中的端口53,如示例docker-compose文件所示。
发布于 2020-04-08 09:54:30
不幸的是,暴露在Internet上的ACI的端口应该是唯一的,这意味着该端口只能出现一次。我知道您希望端口53同时支持TCP和UDP协议,但它目前在ACI中不支持。
如果您不介意,VM可以帮助您实现您的目的。
https://stackoverflow.com/questions/61053139
复制相似问题