blob: b8ec814951e7cc8a5c3724e772304a50334b20c2 (
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
|
# 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
RUN echo 'deb http://ftp.debian.org/debian jessie-backports main' | tee -a /etc/apt/sources.list &&\
apt-get update &&\
apt-get install -y \
vim \
git \
make \
sudo \
locales \
live-build \
pbuilder \
devscripts \
python3-pystache \
squashfs-tools \
autoconf \
dpkg-dev \
syslinux \
genisoimage \
lsb-release \
fakechroot \
kernel-package \
libtool \
libglib2.0-dev \
libboost-filesystem-dev \
libapt-pkg-dev \
flex \
bison \
libperl-dev \
libnfnetlink-dev \
python3-git \
parted \
kpartx \
jq \
qemu-system-x86 \
qemu-utils \
quilt \
python3-lxml \
python3-setuptools \
python3-nose \
python3-coverage
# Packages needed for building vyos-strongswan
RUN 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 \
libcurl4-openssl-dev \
libkrb5-dev \
libsqlite3-dev \
libssl-dev \
libxml2-dev \
pkg-config
# Package needed for mdns-repeater
RUN apt-get install -y -t jessie-backports \
dh-systemd
# Packages needed for vyatta-bash
RUN apt-get install -y \
libncurses5-dev \
locales
# Packages needed for vyatta-cfg
RUN apt-get install -y \
libboost-filesystem-dev
# Packages needed for vyatta-iproute
RUN apt-get install -y \
libatm1-dev \
libdb-dev
# Packages needed for vyatta-webgui
RUN apt-get install -y \
libexpat1-dev \
subversion
# Packages needed for pmacct
RUN apt-get install -y \
libpcap-dev \
libpq-dev \
libmysqlclient-dev \
libgeoip-dev \
librabbitmq-dev \
libjansson-dev \
librdkafka-dev \
libnetfilter-log-dev
# Packages needed for vyos-keepalived
RUN apt-get install -y \
libnl-3-dev \
libnl-genl-3-dev \
libpopt-dev \
libsnmp-dev
# Pavkages needed for wireguard
RUN apt-get install -y \
libmnl-dev
# Packages needed for kernel
RuN apt-get install -y \
libelf-dev
# 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/*
# Standard shell should be bash not dash
RUN echo "dash dash/sh boolean false" | debconf-set-selections && \
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
ENV LANG en_US.utf8
# 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
# Create vyos_bld user account and enable sudo
RUN useradd -ms /bin/bash -u 1006 --gid users vyos_bld && \
usermod -aG sudo vyos_bld && \
echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER vyos_bld
WORKDIR /home/vyos_bld
|