1 # Copyright (c) 2019 AT&T Intellectual Property.
2 # Copyright (c) 2019 Nokia.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
19 RUN apt-get update && \
20 apt install -y redis-server && \
23 # Create suitable configuration file
24 RUN sed -i 's/^\(bind .*\)$/# \1/' /etc/redis/redis.conf && \
25 sed -i 's/^\(daemonize .*\)$/# \1/' /etc/redis/redis.conf && \
26 sed 's/^protected-mode yes/protected-mode no/' -i /etc/redis/redis.conf && \
27 sed -i 's/^\(save .*\)$/# \1/' /etc/redis/redis.conf && \
28 echo 'save ""' >> /etc/redis/redis.conf
32 CMD ["redis-server", "/etc/redis/redis.conf"]