sonic-buildimage/dockers/docker-database/Dockerfile.j2
Taoyu Li b6efe438b5 Introduce ConfigDB (#808)
* [cfggen] Support reading from and writing to configdb
* [bgp] Move bgp_admin_state to configdb, support dynamic admin state change
* [sonic-utilities] Adapt configDB for admin status, support config save and config load
2017-08-01 19:02:00 -07:00

39 lines
1.2 KiB
Django/Jinja

FROM docker-config-engine
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
COPY \
{% for deb in docker_database_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/
## Install redis-tools dependencies
## TODO: implicitly install dependencies
RUN apt-get -y install libjemalloc1
RUN dpkg -i \
{% for deb in docker_database_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor %}
## Clean up
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs
RUN sed -ri 's/^(save .*$)/# \1/g; \
s/^daemonize yes$/daemonize no/; \
s/^logfile .*$/logfile ""/; \
s/^# syslog-enabled no$/syslog-enabled no/; \
s/^# unixsocket/unixsocket/; \
s/^client-output-buffer-limit pubsub [0-9]+mb [0-9]+mb [0-9]+/client-output-buffer-limit pubsub 0 0 0/ \
' /etc/redis/redis.conf
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["configdb-load.sh", "/usr/bin/"]
ENTRYPOINT ["/usr/bin/supervisord"]