From 08b31dcc25d3b72c1a617e300ec17e0bb7c373de Mon Sep 17 00:00:00 2001 From: weiyu Date: Wed, 12 Aug 2015 21:35:59 +0800 Subject: [PATCH] Add Dockerfile template for haproxy Change-Id: If269a483a1f2a9fd1258fdcb90b139d137037dfd Partially-Implements: blueprint dockerfile-template --- docker_templates/haproxy/Dockerfile.j2 | 20 +++++++++++++++++++ docker_templates/haproxy/config-external.sh | 1 + .../haproxy/ensure_latest_config.sh | 1 + docker_templates/haproxy/start.sh | 1 + 4 files changed, 23 insertions(+) create mode 100755 docker_templates/haproxy/Dockerfile.j2 create mode 120000 docker_templates/haproxy/config-external.sh create mode 120000 docker_templates/haproxy/ensure_latest_config.sh create mode 120000 docker_templates/haproxy/start.sh diff --git a/docker_templates/haproxy/Dockerfile.j2 b/docker_templates/haproxy/Dockerfile.j2 new file mode 100755 index 0000000000..ba6c76b210 --- /dev/null +++ b/docker_templates/haproxy/Dockerfile.j2 @@ -0,0 +1,20 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install \ + haproxy \ + && yum clean all + +{% elif base_distro in ['ubuntu', 'debian'] %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + +{% endif %} + +COPY start.sh / +COPY config-external.sh ensure_latest_config.sh /opt/kolla/ + +CMD ["/start.sh"] diff --git a/docker_templates/haproxy/config-external.sh b/docker_templates/haproxy/config-external.sh new file mode 120000 index 0000000000..d0351492c5 --- /dev/null +++ b/docker_templates/haproxy/config-external.sh @@ -0,0 +1 @@ +../../docker/common/haproxy/config-external.sh \ No newline at end of file diff --git a/docker_templates/haproxy/ensure_latest_config.sh b/docker_templates/haproxy/ensure_latest_config.sh new file mode 120000 index 0000000000..a78adec669 --- /dev/null +++ b/docker_templates/haproxy/ensure_latest_config.sh @@ -0,0 +1 @@ +../../docker/common/haproxy/ensure_latest_config.sh \ No newline at end of file diff --git a/docker_templates/haproxy/start.sh b/docker_templates/haproxy/start.sh new file mode 120000 index 0000000000..269fd27860 --- /dev/null +++ b/docker_templates/haproxy/start.sh @@ -0,0 +1 @@ +../../docker/common/haproxy/start.sh \ No newline at end of file