I am trying to set up pi-hole in Azure Container Instance. Here is the link to the docker-compose file of pi-hole.
Following the YAML reference for the Azure Container Instance, I am trying to convert this docker-compose file.
Here is the YAML file I have populated.
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
When I give same ports with different protocols (TCP 53 and UDP 53), like how it was given in the docker-compose file, the creation of the container group fails with the following error
> az container create -g myResourceGroup -f container.yaml
Duplicate ports '53' found in container group 'pi-hole' container 'pihole'.
How should I enter the ports to configure the port 53 in TCP and UDP like the sample docker-compose file.