Refactor DHCP relay docker in sonicv2 style (#217)
* Refactor DHCP relay docker in sonicv2 style
This commit is contained in:
parent
608980524f
commit
c18b65bc16
@ -10,9 +10,11 @@ RUN apt-get update \
|
||||
&& apt-get autoclean -y \
|
||||
&& apt-get autoremove -y
|
||||
|
||||
COPY isc-dhcp-relay /etc/default/isc-dhcp-relay
|
||||
COPY ["isc-dhcp-relay.j2", "/usr/share/dhcp-relay/"]
|
||||
COPY ["config.sh", "/usr/bin/"]
|
||||
|
||||
ENTRYPOINT service rsyslog start \
|
||||
ENTRYPOINT /usr/bin/config.sh \
|
||||
&& service rsyslog start \
|
||||
&& service isc-dhcp-relay start \
|
||||
&& /bin/bash
|
||||
|
||||
|
4
dockers/docker-dhcp-relay/config.sh
Executable file
4
dockers/docker-dhcp-relay/config.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
sonic-cfggen -m /etc/sonic/minigraph.xml -y /etc/sonic/dhcp_relay.yml -t /usr/share/dhcp-relay/isc-dhcp-relay.j2 > /etc/default/isc-dhcp-relay
|
||||
|
@ -1,6 +0,0 @@
|
||||
SERVERS=""
|
||||
|
||||
INTERFACES=""
|
||||
|
||||
#-a provides option 82 circuit id information
|
||||
OPTIONS="-a"
|
7
dockers/docker-dhcp-relay/isc-dhcp-relay.j2
Normal file
7
dockers/docker-dhcp-relay/isc-dhcp-relay.j2
Normal file
@ -0,0 +1,7 @@
|
||||
SERVERS="{{ dhcp_servers | join(' ') }}"
|
||||
|
||||
INTERFACES="{{ minigraph_vlan_interfaces | join(' ') }}"
|
||||
|
||||
# '-a' option provides option 82 circuit id information
|
||||
OPTIONS="-a"
|
||||
|
Loading…
Reference in New Issue
Block a user