forked from sonic-net/sonic-restapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.test
56 lines (45 loc) · 1.84 KB
/
Dockerfile.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM debian:stretch
MAINTAINER [email protected]
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y \
vim \
redis-server \
supervisor \
curl \
bridge-utils \
net-tools
COPY debs /debs
RUN dpkg -i /debs/libhiredis0.13_0.13.3-2_amd64.deb \
&& dpkg -i /debs/libhiredis-dev_0.13.3-2_amd64.deb \
&& dpkg -i /debs/libnl-3-200_3.2.27-2_amd64.deb \
&& dpkg -i /debs/libnl-genl-3-200_3.2.27-2_amd64.deb \
&& dpkg -i /debs/libnl-route-3-200_3.2.27-2_amd64.deb \
&& dpkg -i /debs/libswsscommon_1.0.0_amd64.deb \
&& dpkg -i /debs/libswsscommon-dev_1.0.0_amd64.deb \
&& dpkg -i /debs/sonic-rest-api_1.0.1_amd64.deb
RUN rm -fr /debs
# Adjust redis configurations
RUN sed -ri 's/^(save .*$)/# \1/g; \
s/^daemonize yes$/daemonize no/; \
s/^logfile .*$/logfile ""/; \
s/^# syslog-enabled no$/syslog-enabled no/; \
s/^client-output-buffer-limit pubsub [0-9]+mb [0-9]+mb [0-9]+/client-output-buffer-limit pubsub 0 0 0/; \
s/^bind 127.0.0.1/bind 0.0.0.0/ \
' /etc/redis/redis.conf
COPY supervisor/redis.conf /etc/supervisor/conf.d/
COPY supervisor/supervisor.conf /etc/supervisor/conf.d/
COPY supervisor/rest_api_test.conf /etc/supervisor/conf.d/
COPY start.sh /usr/bin
COPY CreateMockPort.sh /usr/bin
COPY debug/* /usr/bin/
RUN mkdir /usr/sbin/cert
RUN mkdir /usr/sbin/cert/client
RUN mkdir /usr/sbin/cert/server
COPY cert/client/* /usr/sbin/cert/client/
COPY cert/server/* /usr/sbin/cert/server/
RUN apt-get autoremove -y \
&& apt-get clean \
&& rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENTRYPOINT ["/usr/bin/supervisord"]