├── schema-registry.properties ├── confluent.repo ├── Dockerfile └── run.sh /schema-registry.properties: -------------------------------------------------------------------------------- 1 | kafkastore.connection.url=localhost:2181 2 | avro.compatibility.level=full 3 | kafkastore.topic.replication.factor=3 4 | kafkastore.topic=_schemas 5 | -------------------------------------------------------------------------------- /confluent.repo: -------------------------------------------------------------------------------- 1 | [confluent-1.0] 2 | name=Confluent repository for 1.x packages 3 | baseurl=http://packages.confluent.io/rpm/1.0 4 | gpgcheck=1 5 | gpgkey=http://packages.confluent.io/rpm/1.0/archive.key 6 | enabled=1 7 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM state/oraclejre:1.7.0_65 2 | 3 | ADD ./confluent.repo /etc/yum.repos.d/ 4 | 5 | RUN yum update -y -q; yum clean all 6 | 7 | RUN rpm --import "http://packages.confluent.io/rpm/1.0/archive.key" && \ 8 | yum install -y confluent-schema-registry && \ 9 | yum clean all 10 | 11 | ADD ./schema-registry.properties /etc/schema-registry/schema-registry.properties 12 | ADD ./run.sh /srv/run.sh 13 | 14 | CMD ./srv/run.sh 15 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | : ${ADVERTISED_HOSTNAME} 4 | : ${ZOOKEEPER_URL} 5 | 6 | if [[ -n ${ADVERTISED_HOSTNAME} ]]; then 7 | echo "host.name=${ADVERTISED_HOSTNAME}" >> /etc/schema-registry/schema-registry.properties 8 | fi 9 | 10 | if [[ -n ${ZOOKEEPER_URL} ]]; then 11 | sed -e "s/kafkastore.connection.url=.*/kafkastore.connection.url=${ZOOKEEPER_URL}/" \ 12 | -i /etc/schema-registry/schema-registry.properties 13 | fi 14 | 15 | exec ./bin/schema-registry-start /etc/schema-registry/schema-registry.properties 16 | --------------------------------------------------------------------------------