Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conform with new Docker build method #250

Merged
merged 1 commit into from
Feb 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions dockers/docker-dhcp-relay/Dockerfile

This file was deleted.

37 changes: 37 additions & 0 deletions dockers/docker-dhcp-relay/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM docker-base

## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

## Update APT package lists
RUN apt-get update

## Dependencies for sonic-cfggen
RUN apt-get -y install python-lxml python-jinja2 python-netaddr python-ipaddr python-yaml


COPY \
{% for deb in docker_dhcp_relay_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/

RUN dpkg -i \
{% for deb in docker_dhcp_relay_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor %}

## Install isc-dhcp-relay Debian package
RUN apt-get -y install isc-dhcp-relay

## Clean up
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

COPY ["isc-dhcp-relay.j2", "/usr/share/dhcp-relay/"]
COPY ["config.sh", "/usr/bin/"]

ENTRYPOINT /usr/bin/config.sh \
&& service rsyslog start \
&& service isc-dhcp-relay start \
&& /bin/bash
10 changes: 8 additions & 2 deletions rules/docker-dhcp-relay.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# docker dhcp relay image
# Docker image for DHCP relay

DOCKER_DHCP_RELAY = docker-dhcp-relay.gz
$(DOCKER_DHCP_RELAY)_PATH = $(DOCKERS_PATH)/docker-dhcp-relay
$(DOCKER_DHCP_RELAY)_DEPENDS += $(SONIC_CONFIG_ENGINE)
$(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_BASE)
SONIC_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY)

SONIC_SIMPLE_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY)

$(DOCKER_DHCP_RELAY)_CONTAINER_NAME = dhcp_relay
$(DOCKER_DHCP_RELAY)_RUN_OPT += --net=host --privileged -t
$(DOCKER_DHCP_RELAY)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro