-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
222 lines (208 loc) · 7.65 KB
/
Dockerfile
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
FROM ubuntu:23.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y
RUN apt-get install -y \
libhttp-daemon-perl \
liblist-moreutils-perl \
libwww-perl \
libcarp-always-perl \
libconvert-asn1-perl \
libclass-accessor-perl \
cpanminus \
libssl-dev \
libyaml-perl \
libxml-libxml-perl \
libio-capture-perl \
libnet-ip-perl \
make \
wget \
patch \
gcc \
rsync \
vim \
libtls26 \
libtls-dev \
libdigest-sha-perl \
libexpat1-dev \
sudo \
less \
libdatetime-perl \
git \
zlib1g-dev \
libautodie-perl \
libipc-system-simple-perl \
autoconf \
automake \
libtool \
build-essential \
libjansson-dev \
pkg-config \
libcurl4-openssl-dev \
libxml2-dev \
curl
RUN cpanm Set::IntSpan Net::CIDR::Set
RUN yes | unminimize
RUN addgroup \
--gid 2000 \
rpki-client && \
adduser \
--home /var/lib/rpki-client \
--disabled-password \
--gid 2000 \
--uid 2000 \
rpki-client
RUN mkdir /opt/rpki-client-7.0
RUN wget https://ftp.openbsd.org/pub/OpenBSD/rpki-client/rpki-client-7.0.tar.gz \
&& tar xf rpki-client-7.0.tar.gz \
&& cd rpki-client-7.0 \
&& ./configure --with-rsync=rsync --with-user=rpki-client --prefix=/opt/rpki-client-7.0 \
&& make \
&& make install \
&& cd ..
RUN mkdir /opt/rpki-client-8.7
RUN wget https://ftp.openbsd.org/pub/OpenBSD/rpki-client/rpki-client-8.7.tar.gz \
&& tar xf rpki-client-8.7.tar.gz \
&& cd rpki-client-8.7 \
&& ./configure --with-rsync=rsync --with-user=rpki-client --prefix=/opt/rpki-client-8.7 \
&& make \
&& make install \
&& cd ..
RUN mkdir /opt/rpki-client-9.0
RUN wget https://ftp.openbsd.org/pub/OpenBSD/rpki-client/rpki-client-9.0.tar.gz \
&& tar xf rpki-client-9.0.tar.gz \
&& cd rpki-client-9.0 \
&& ./configure --with-rsync=rsync --with-user=rpki-client --prefix=/opt/rpki-client-9.0 \
&& make \
&& make install \
&& cd ..
RUN mkdir /opt/rpki-client-9.3
RUN wget https://ftp.openbsd.org/pub/OpenBSD/rpki-client/rpki-client-9.3.tar.gz \
&& tar xf rpki-client-9.3.tar.gz \
&& cd rpki-client-9.3 \
&& ./configure --with-rsync=rsync --with-user=rpki-client --prefix=/opt/rpki-client-9.3 \
&& make \
&& make install \
&& cd ..
RUN mkdir /opt/rpki-client-master
RUN git clone https://github.com/rpki-client/rpki-client-portable/ \
&& cd rpki-client-portable \
&& ./autogen.sh \
&& ./configure --with-rsync=rsync --with-user=rpki-client --prefix=/opt/rpki-client-master \
&& make \
&& make install \
&& cd ..
RUN mkdir /opt/fort-1.6.4
RUN wget https://github.com/NICMx/FORT-validator/releases/download/1.6.4/fort-1.6.4.tar.gz \
&& tar xf fort-1.6.4.tar.gz \
&& cd fort-1.6.4 \
&& ./configure --prefix=/opt/fort-1.6.4 \
&& make \
&& make install \
&& cd ..
RUN mkdir /opt/fort-1.6.1
RUN wget https://github.com/NICMx/FORT-validator/releases/download/1.6.1/fort-1.6.1.tar.gz \
&& tar xf fort-1.6.1.tar.gz \
&& cd fort-1.6.1 \
&& ./configure --prefix=/opt/fort-1.6.1 \
&& make \
&& make install \
&& cd ..
RUN mkdir /opt/fort-1.5.4
RUN wget https://github.com/NICMx/FORT-validator/releases/download/1.5.4/fort-1.5.4.tar.gz \
&& tar xf fort-1.5.4.tar.gz \
&& cd fort-1.5.4 \
&& ./configure --prefix=/opt/fort-1.5.4 \
&& make \
&& make install \
&& cd ..
RUN mkdir /opt/fort-1.5.3
RUN wget https://github.com/NICMx/FORT-validator/releases/download/1.5.3/fort-1.5.3.tar.gz \
&& tar xf fort-1.5.3.tar.gz \
&& cd fort-1.5.3 \
&& ./configure --prefix=/opt/fort-1.5.3 \
&& make \
&& make install \
&& cd ..
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN echo 'source root/.cargo/env' >> root/.bashrc
ENV PATH="/root/.cargo/bin:${PATH}"
RUN mkdir /opt/routinator-0.14.0
RUN cargo install --locked --force routinator --root /opt/routinator-0.14.0 --version 0.14.0
# Doesn't build, so disabling for now.
#
# error[E0282]: type annotations needed for `Box<_>`
# --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.31/src/format_description/parse/mod.rs:83:9
# |
# 83 | let items = format_items
# | ^^^^^
# ...
# 86 | Ok(items.into())
# | ---- type must be known at this point
# |
# = note: this is an inference error on crate `time` caused by an API change in Rust 1.80.0; update `time` to version `>=0.3.35` by calling `cargo update`
# RUN mkdir /opt/routinator-0.13.2
# RUN cargo install --locked --force routinator --root /opt/routinator-0.13.2 --version 0.13.2
RUN mkdir /opt/routinator-0.12.0
RUN cargo install --locked --force routinator --root /opt/routinator-0.12.0 --version 0.12.0
RUN mkdir /opt/routinator-0.11.0
RUN cargo install --locked --force routinator --root /opt/routinator-0.11.0 --version 0.11.0
RUN mkdir /opt/routinator-main
RUN mkdir /opt/routinator-main-build
RUN cd /opt/routinator-main-build \
&& git clone https://github.com/NLnetLabs/routinator \
&& cd routinator \
&& cargo install --path . --root /opt/routinator-main
RUN mkdir -p /opt/octorpki-1.5.10/bin
RUN wget https://github.com/cloudflare/cfrpki/releases/download/v1.5.10/octorpki-v1.5.10-linux-x86_64 -O /opt/octorpki-1.5.10/bin/octorpki
RUN chmod 755 /opt/octorpki-1.5.10/bin/octorpki
RUN mkdir -p /opt/octorpki-1.4.4/bin
RUN wget https://github.com/cloudflare/cfrpki/releases/download/v1.4.4/octorpki-v1.4.4-linux-x86_64 -O /opt/octorpki-1.4.4/bin/octorpki
RUN chmod 755 /opt/octorpki-1.4.4/bin/octorpki
RUN mkdir -p /opt/octorpki-1.4.3/bin
RUN wget https://github.com/cloudflare/cfrpki/releases/download/v1.4.3/octorpki-v1.4.3-linux-x86_64 -O /opt/octorpki-1.4.3/bin/octorpki
RUN chmod 755 /opt/octorpki-1.4.3/bin/octorpki
RUN wget https://github.com/RIPE-NCC/rpki-validator-3/archive/refs/tags/3.2-2021.04.07.12.55.tar.gz
RUN apt-get install -y unzip zip rpm
SHELL ["/bin/bash", "-c"]
RUN curl -s "https://get.sdkman.io" | bash
RUN mkdir -p /opt/ripe-validator-3/3.2-2021.04.07.12.55
RUN source "/root/.sdkman/bin/sdkman-init.sh" \
&& sdk install java 8.0.392-tem \
&& sdk install maven 3.9.6
RUN tar xf 3.2-2021.04.07.12.55.tar.gz \
&& cd ./rpki-validator-3-3.2-2021.04.07.12.55 \
&& cd rpki-validator \
&& sed 's/30_000/0/' -i src/main/java/net/ripe/rpki/validator3/background/ValidationScheduler.java \
&& sed 's/futureDate(10, SECOND)/futureDate(2, SECOND)/' -i src/main/java/net/ripe/rpki/validator3/background/BackgroundJobs.java \
&& source "/root/.sdkman/bin/sdkman-init.sh" \
&& sdk use java 8.0.392-tem \
&& sdk use maven 3.9.6 \
&& mvn install -Dmaven.test.skip=true
RUN wget https://github.com/RIPE-NCC/rpki-validator/archive/refs/tags/rpki-validator-2.24.tar.gz
RUN tar xf rpki-validator-2.24.tar.gz \
&& cd ./rpki-validator-rpki-validator-2.24/rpki-validator-cli \
&& source "/root/.sdkman/bin/sdkman-init.sh" \
&& sdk use java 8.0.392-tem \
&& sdk use maven 3.9.6 \
&& mvn install -Dmaven.test.skip=true
RUN apt-get update -y
RUN apt-get install -y \
libdatetime-format-strptime-perl \
libnet-ip-xs-perl \
jq \
libjson-xs-perl \
net-tools \
psmisc \
uuid-runtime
RUN apt-get install -y \
nginx \
mkcert
RUN mkcert -install
RUN mkcert -cert-file /domain.pem -key-file /key.pem rpki.example.net localhost 127.0.0.1
RUN echo 'source /root/.sdkman/bin/sdkman-init.sh' >> root/.bashrc
COPY . /root/rpki-mft-number-demo
RUN cd /root/rpki-mft-number-demo/ && perl Makefile.PL && make && make install
COPY rsyncd.conf /etc/
RUN sed -i 's/RSYNC_ENABLE=false/RSYNC_ENABLE=true/' /etc/default/rsync
RUN cp /root/rpki-mft-number-demo/nginx.conf /etc/nginx/nginx.conf
RUN rm -rf /root/rpki-mft-number-demo/