blob: cfb5d592cfc3450f356e532fe4a5cabb856701c3 (
plain)
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
|
# Must be run with --privileged flag
# Recommended to run the container with a volume mapped
# in order to easy exprort images built to "external" world
FROM debian:jessie
ENV DEBIAN_FRONTEND noninteractive
# Standard shell should be bash not dash
RUN echo "dash dash/sh boolean false" | debconf-set-selections && \
dpkg-reconfigure dash
RUN apt-get update && apt-get install -y \
dialog \
apt-utils \
locales
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
ENV LANG en_US.utf8
RUN apt-get update && apt-get install -y \
vim \
git \
curl \
make \
sudo \
mc \
live-build \
pbuilder \
devscripts \
python3-pystache \
squashfs-tools \
autoconf \
automake \
dpkg-dev \
syslinux \
genisoimage \
lsb-release \
fakechroot \
kernel-package \
libtool \
libglib2.0-dev \
libboost-filesystem-dev \
libapt-pkg-dev \
libncurses5-dev \
flex \
bison \
libperl-dev \
libnfnetlink-dev \
parted \
kpartx \
jq \
qemu-system-x86 \
qemu-utils \
quilt \
python3-lxml \
python3-setuptools \
python3-nose \
python3-coverage \
python3-sphinx
# Add Debian jessie-backports support
RUN echo 'deb http://ftp.debian.org/debian jessie-backports main' | tee -a /etc/apt/sources.list && \
apt-get update && apt-get install -y -t jessie-backports \
python3-git \
gosu
# Packages needed for building vyos-strongswan
RUN apt-get update && apt-get install -y -t jessie-backports debhelper && \
apt-get install -y \
dh-apparmor \
gperf \
iptables-dev \
libcap-dev \
libgcrypt20-dev \
libgmp3-dev \
libldap2-dev \
libpam0g-dev \
libsystemd-dev \
libgmp-dev \
iptables \
xl2tpd \
libcurl4-openssl-dev \
libkrb5-dev \
libsqlite3-dev \
libssl-dev \
libxml2-dev \
pkg-config
# Package needed for mdns-repeater
RUN apt-get update && apt-get install -y -t jessie-backports \
dh-systemd
# Packages needed for vyatta-cfg
RUN apt-get update &&apt-get install -y \
libboost-filesystem-dev
# Packages needed for vyatta-iproute
RUN apt-get update && apt-get install -y \
libatm1-dev \
libdb-dev
# Packages needed for vyatta-webgui
RUN apt-get update && apt-get install -y \
libexpat1-dev \
subversion
# Packages needed for pmacct
RUN apt-get update && apt-get install -y \
libpcap-dev \
libpq-dev \
default-libmysqlclient-dev \
libgeoip-dev \
librabbitmq-dev \
libjansson-dev \
librdkafka-dev \
libnetfilter-log-dev
# Packages needed for vyos-keepalived
RUN apt-get update && apt-get install -y \
libnl-3-dev \
libnl-genl-3-dev \
libpopt-dev \
libsnmp-dev
# Pavkages needed for wireguard
RUN apt-get update && apt-get install -y \
libmnl-dev
# Packages needed for kernel
RUN apt-get update && apt-get install -y \
libelf-dev
# Packages needed for vyos-accel-ppp
RUN apt-get update && apt-get install -y \
cdbs \
cmake \
liblua5.1-dev
# Prerequisites for building FRR from source
# see http://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-debian8.html
RUN apt-get update && apt-get install -y \
doxygen \
libssh-dev
RUN export RTRLIB_COMMIT="v0.6.3" && \
git clone https://github.com/rtrlib/rtrlib.git && \
cd rtrlib && git checkout $RTRLIB_COMMIT && \
dpkg-buildpackage -uc -us -tc -b && dpkg -i ../*.deb
# Prerequisites for building FRR from source
# see http://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-debian8.html
#
RUN apt-get update && apt-get install -y -t jessie-backports \
swig \
libcmocka-dev \
libcmocka0
RUN export LIBYANG_COMMIT="179da47f2e8de" && \
git clone https://github.com/opensourcerouting/libyang.git && \
cd libyang && git checkout $LIBYANG_COMMIT && mkdir build && cd build && \
cmake .. && make build-deb && \
dpkg -i debs/*.deb
# Packages needed for frr
RUN apt-get update && apt-get install -y \
libreadline-dev \
texinfo \
pkg-config \
imagemagick \
groff \
hardening-wrapper \
gawk \
chrpath \
libjson0 \
libjson0-dev \
python-ipaddr \
python3-dev \
python3-pytest \
install-info \
libc-ares-dev \
libc-ares2 \
libzmq3 \
libzmq3-dev
# Packages needed for conntrack-tools
RUN apt-get update && apt-get install -y \
libnetfilter-conntrack-dev \
libnetfilter-cthelper0-dev \
libnetfilter-cttimeout-dev \
libnetfilter-queue-dev
# Packages needed for libvyosconfig && VyConf
RUN apt-get update && apt-get install -y \
libffi-dev
# Packages needed for libvyosconfig
RUN curl https://raw.githubusercontent.com/ocaml/opam/2.0.2/shell/install.sh --output /tmp/opam_install.sh && \
sed -i 's/read BINDIR/BINDIR=""/' /tmp/opam_install.sh && sh /tmp/opam_install.sh && \
opam init --root=/opt/opam --comp=4.07.0 --disable-sandboxing
RUN eval $(opam env --root=/opt/opam --set-root) && \
opam install -y \
oasis
RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \
fileutils \
lwt \
lwt_ppx \
lwt_log \
ocplib-endian \
ounit \
pcre \
ppx_deriving_yojson \
sha \
toml \
xml-light \
batteries \
ocaml-protoc \
ctypes-foreign \
menhir
RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \
ctypes
# Build VyConf which is required to build libvyosconfig
RUN eval $(opam env --root=/opt/opam --set-root) && \
opam pin add vyconf https://github.com/vyos/vyconf.git#v0.1 -y
# Build libvyosconfig
RUN eval $(opam env --root=/opt/opam --set-root) && \
git clone https://github.com/vyos/libvyosconfig.git && \
cd libvyosconfig && \
git checkout a9817fa26c1be1 && \
dpkg-buildpackage -uc -us -tc -b && \
dpkg -i ../libvyosconfig0_*_amd64.deb
# Packages needed for hvinfo
RUN apt-get update && apt-get install -y \
gnat \
gprbuild
# Packages needed for vyos-1x
RUN apt-get update && apt-get install -y \
whois
# Packages needed for vyos-xe-guest-utilities
RUN apt-get update && apt-get install -y \
golang
# Packages needed for ipaddrcheck
RUN git clone https://github.com/wikimedia/analytics-libcidr.git && \
cd analytics-libcidr && \
git checkout 026c611d90a1 && \
dpkg-buildpackage -uc -us -tc -b && \
dpkg -i ../libcidr*.deb
# Update live-build
RUN echo 'deb http://ftp.debian.org/debian stretch main' | tee -a /etc/apt/sources.list.d/stretch.list && \
apt-get update && apt-get install -y -t stretch live-build && \
rm -f /etc/apt/sources.list.d/stretch.list && \
apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install packer
RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \
jq -r -M '.current_version')"; \
echo "url https://releases.hashicorp.com/packer/"$LATEST"/packer_"$LATEST"_linux_amd64.zip" |\
curl -K- | gzip -d > /usr/bin/packer && \
chmod +x /usr/bin/packer
# Allow password-less 'sudo' for all users in group 'sudo'
RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \
chmod a+s /usr/sbin/useradd /usr/sbin/groupadd /usr/sbin/gosu /usr/sbin/usermod
# Ensure sure all users have access to our OCAM installation
RUN echo "$(opam env --root=/opt/opam --set-root)" >> /etc/skel/.bashrc
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|