-
Notifications
You must be signed in to change notification settings - Fork 32
/
Dockerfile.test
57 lines (45 loc) · 1.94 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
57
FROM debian:buster
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive
RUN echo "deb http://archive.debian.org/debian buster-backports main" >> /etc/apt/sources.list
RUN apt-get update \
&& apt-get install -y \
vim \
redis-server \
supervisor \
curl \
bridge-utils \
net-tools \
procps \
libboost-serialization1.71-dev \
libzmq5-dev
COPY debs /debs
RUN dpkg -i /debs/*.deb || apt-get --fix-broken -y install
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/
COPY files/server_kill.py /usr/bin/server_kill.py
RUN ln -s -f /usr/sbin/cert/client/restapiclient.crt.1 /usr/sbin/cert/client/restapiclient.crt
RUN ln -s -f /usr/sbin/cert/server/restapiserver.crt.1 /usr/sbin/cert/server/restapiserver.crt
RUN ln -s -f /usr/sbin/cert/server/restapiserver.key.1 /usr/sbin/cert/server/restapiserver.key
RUN apt-get autoremove -y \
&& apt-get clean \
&& rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENTRYPOINT ["/usr/bin/supervisord"]