-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile.devel
More file actions
110 lines (100 loc) · 2.99 KB
/
Dockerfile.devel
File metadata and controls
110 lines (100 loc) · 2.99 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
FROM alpine:3.19
# Install build dependencies and runtime tools
RUN apk add --no-cache --verbose \
autoconf \
automake \
bash \
bash-completion \
bc \
bison \
build-base \
ccache \
docbook-xsl \
gdb \
git \
gnutls-dev \
libidn2 \
libcap-dev \
db-dev \
libidn2-dev \
perl-io-socket-inet6 \
jemalloc-dev \
json-c-dev \
perl-json \
krb5-dev \
openldap-dev \
lmdb-dev \
lua5.1-dev \
lua5.2-dev \
libmaxminddb-dev \
libedit-dev \
perl-net-dns \
nghttp2-dev \
sqlite-dev \
openssl-dev \
libtool \
userspace-rcu-dev \
libuv-dev \
perl-xml-simple \
libxml2-dev \
libxml2-utils \
meson \
net-tools \
perl \
pkgconfig \
procps \
python3 \
py3-dnspython \
py3-hypothesis \
py3-pip \
py3-ply \
py3-pytest \
py3-requests \
sudo \
tzdata \
libxslt \
zip \
zlib-dev \
npm \
libcap-utils \
rsync \
openssh \
openssh-server \
openssh-keygen \
perf
# Install missing packages from testing/community repos or build from source
RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
cmocka-dev \
dnsperf
RUN mkdir --parents /perflab/data
ADD package.json /perflab/
WORKDIR /perflab
RUN npm install
ADD . /perflab
# default setup
RUN devel/perflab-monkeypatch/config.sh
RUN scripts/install-server.js
RUN cp /perflab/data/zones/small /perflab/data/zones/custom-zone1 && \
cp /perflab/data/zones/small /perflab/data/zones/custom-zone2 && \
echo 'zone "custom1.example" { type master; file "zones/custom-zone1"; };' > /perflab/data/config/bind/zones-custom-zone1.conf && \
echo 'zone "custom2.example" { type master; file "zones/custom-zone2"; };' > /perflab/data/config/bind/zones-custom-zone2.conf
# Configure SSH for localhost access instead of monkeypatch
ENV MAKEFLAGS=-j
# Set up SSH server and keys for localhost access
RUN mkdir -p /var/run/sshd ~/.ssh && \
ssh-keygen -A && \
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -N "" && \
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys && \
chmod 600 ~/.ssh/authorized_keys && \
chmod 700 ~/.ssh
# Configure SSH client to skip host key verification for localhost
RUN echo "Host localhost" > ~/.ssh/config && \
echo " StrictHostKeyChecking no" >> ~/.ssh/config && \
echo " UserKnownHostsFile /dev/null" >> ~/.ssh/config && \
echo "Host 127.0.0.1" >> ~/.ssh/config && \
echo " StrictHostKeyChecking no" >> ~/.ssh/config && \
echo " UserKnownHostsFile /dev/null" >> ~/.ssh/config && \
chmod 600 ~/.ssh/config
# Configure SSH server to allow root login
RUN echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
WORKDIR /perflab