diff options
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/swift/swift-rsyncd/Dockerfile.j2 | 22 | ||||
| -rw-r--r-- | docker/swift/swift-rsyncd/config-external.sh | 9 | ||||
| -rwxr-xr-x | docker/swift/swift-rsyncd/start.sh | 14 |
3 files changed, 45 insertions, 0 deletions
diff --git a/docker/swift/swift-rsyncd/Dockerfile.j2 b/docker/swift/swift-rsyncd/Dockerfile.j2 new file mode 100644 index 000000000..b2f60a94e --- /dev/null +++ b/docker/swift/swift-rsyncd/Dockerfile.j2 @@ -0,0 +1,22 @@ +FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }} +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum install -y rsync \ + && yum clean all + +{% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends \ + rsync \ + && apt-get clean + +{% endif %} + +COPY start.sh / +COPY config-external.sh /opt/kolla/ + +CMD ["/start.sh"] + +{{ include_footer }} diff --git a/docker/swift/swift-rsyncd/config-external.sh b/docker/swift/swift-rsyncd/config-external.sh new file mode 100644 index 000000000..3b3104272 --- /dev/null +++ b/docker/swift/swift-rsyncd/config-external.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +OWNER="swift" + +if [[ -f "/opt/kolla/swift-rsyncd/rsyncd.conf" ]]; then + cp /opt/kolla/swift-rsyncd/rsyncd.conf /etc/rsyncd.conf + chown ${OWNER}: /etc/rsyncd.conf + chmod 0640 /etc/rsyncd.conf +fi diff --git a/docker/swift/swift-rsyncd/start.sh b/docker/swift/swift-rsyncd/start.sh new file mode 100755 index 000000000..2267bb59f --- /dev/null +++ b/docker/swift/swift-rsyncd/start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +CMD="/usr/bin/rsync" +ARGS="--daemon --no-detach --config=/etc/rsyncd.conf" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS |
