Docker files initial import

This commit is contained in:
William Robinet 2021-03-23 14:10:30 +01:00
parent 98a830d54e
commit f59f015055
21 changed files with 350 additions and 0 deletions

View file

@ -0,0 +1,27 @@
FROM debian:bullseye-slim
ENV LANG C
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends ca-certificates sudo git build-essential automake autoconf clang libssl-dev libpcap-dev libnet1-dev libjson-c-dev iproute2 && \
apt-get clean
RUN useradd -ms /bin/bash ssldump
RUN passwd -d ssldump
RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers
RUN cd /home/ssldump && \
git clone https://github.com/adulau/ssldump.git build
RUN cd /home/ssldump/build && \
./autogen.sh && \
./configure CC=/usr/bin/clang && \
make && \
sudo make install
USER ssldump
WORKDIR "/home/ssldump"
CMD ["/bin/bash"]

View file

@ -0,0 +1,6 @@
#!/bin/bash
ssldump_version=1.4b
distribution=debian-bullseye
docker build -t "ssldump-${distribution}:${ssldump_version}" .

View file

@ -0,0 +1,15 @@
#!/bin/bash
local_if=ens3f0
container_ip=172.17.0.2
ssldump_version=1.4b
distribution=debian-bullseye
sudo iptables -t mangle -I PREROUTING 1 -i ${local_if} -j TEE --gateway ${container_ip}
sudo iptables -t mangle -I POSTROUTING 1 -o ${local_if} -j TEE --gateway ${container_ip}
docker run -it ssldump-${distribution}:${ssldump_version}
sudo iptables -t mangle -D PREROUTING 1
sudo iptables -t mangle -D POSTROUTING 1

View file

@ -0,0 +1,27 @@
FROM debian:buster-slim
ENV LANG C
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends ca-certificates sudo git build-essential automake autoconf clang libssl-dev libpcap-dev libnet1-dev libjson-c-dev iproute2 && \
apt-get clean
RUN useradd -ms /bin/bash ssldump
RUN passwd -d ssldump
RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers
RUN cd /home/ssldump && \
git clone https://github.com/adulau/ssldump.git build
RUN cd /home/ssldump/build && \
./autogen.sh && \
./configure CC=/usr/bin/clang && \
make && \
sudo make install
USER ssldump
WORKDIR "/home/ssldump"
CMD ["/bin/bash"]

View file

@ -0,0 +1,6 @@
#!/bin/bash
ssldump_version=1.4b
distribution=debian-buster
docker build -t "ssldump-${distribution}:${ssldump_version}" .

View file

@ -0,0 +1,15 @@
#!/bin/bash
local_if=ens3f0
container_ip=172.17.0.2
ssldump_version=1.4b
distribution=debian-buster
sudo iptables -t mangle -I PREROUTING 1 -i ${local_if} -j TEE --gateway ${container_ip}
sudo iptables -t mangle -I POSTROUTING 1 -o ${local_if} -j TEE --gateway ${container_ip}
docker run -it ssldump-${distribution}:${ssldump_version}
sudo iptables -t mangle -D PREROUTING 1
sudo iptables -t mangle -D POSTROUTING 1

View file

@ -0,0 +1,27 @@
FROM debian:stretch-slim
ENV LANG C
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends ca-certificates sudo git build-essential automake autoconf clang libssl-dev libpcap-dev libnet1-dev libjson-c-dev iproute2 && \
apt-get clean
RUN useradd -ms /bin/bash ssldump
RUN passwd -d ssldump
RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers
RUN cd /home/ssldump && \
git clone https://github.com/adulau/ssldump.git build
RUN cd /home/ssldump/build && \
./autogen.sh && \
./configure CC=/usr/bin/clang && \
make && \
sudo make install
USER ssldump
WORKDIR "/home/ssldump"
CMD ["/bin/bash"]

View file

@ -0,0 +1,6 @@
#!/bin/bash
ssldump_version=1.4b
distribution=debian-stretch
docker build -t "ssldump-${distribution}:${ssldump_version}" .

View file

@ -0,0 +1,15 @@
#!/bin/bash
local_if=ens3f0
container_ip=172.17.0.2
ssldump_version=1.4b
distribution=debian-stretch
sudo iptables -t mangle -I PREROUTING 1 -i ${local_if} -j TEE --gateway ${container_ip}
sudo iptables -t mangle -I POSTROUTING 1 -o ${local_if} -j TEE --gateway ${container_ip}
docker run -it ssldump-${distribution}:${ssldump_version}
sudo iptables -t mangle -D PREROUTING 1
sudo iptables -t mangle -D POSTROUTING 1

View file

@ -0,0 +1,27 @@
FROM ubuntu:bionic
ENV LANG C
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends ca-certificates sudo git build-essential automake autoconf clang libssl-dev libpcap-dev libnet1-dev libjson-c-dev iproute2 && \
apt-get clean
RUN useradd -ms /bin/bash ssldump
RUN passwd -d ssldump
RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers
RUN cd /home/ssldump && \
git clone https://github.com/adulau/ssldump.git build
RUN cd /home/ssldump/build && \
./autogen.sh && \
./configure CC=/usr/bin/clang && \
make && \
sudo make install
USER ssldump
WORKDIR "/home/ssldump"
CMD ["/bin/bash"]

View file

@ -0,0 +1,6 @@
#!/bin/bash
ssldump_version=1.4b
distribution=ubuntu-bionic
docker build -t "ssldump-${distribution}:${ssldump_version}" .

View file

@ -0,0 +1,15 @@
#!/bin/bash
local_if=ens3f0
container_ip=172.17.0.2
ssldump_version=1.4b
distribution=ubuntu-bionic
sudo iptables -t mangle -I PREROUTING 1 -i ${local_if} -j TEE --gateway ${container_ip}
sudo iptables -t mangle -I POSTROUTING 1 -o ${local_if} -j TEE --gateway ${container_ip}
docker run -it ssldump-${distribution}:${ssldump_version}
sudo iptables -t mangle -D PREROUTING 1
sudo iptables -t mangle -D POSTROUTING 1

View file

@ -0,0 +1,27 @@
FROM ubuntu:focal
ENV LANG C
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends ca-certificates sudo git build-essential automake autoconf clang libssl-dev libpcap-dev libnet1-dev libjson-c-dev iproute2 && \
apt-get clean
RUN useradd -ms /bin/bash ssldump
RUN passwd -d ssldump
RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers
RUN cd /home/ssldump && \
git clone https://github.com/adulau/ssldump.git build
RUN cd /home/ssldump/build && \
./autogen.sh && \
./configure CC=/usr/bin/clang && \
make && \
sudo make install
USER ssldump
WORKDIR "/home/ssldump"
CMD ["/bin/bash"]

View file

@ -0,0 +1,6 @@
#!/bin/bash
ssldump_version=1.4b
distribution=ubuntu-focal
docker build -t "ssldump-${distribution}:${ssldump_version}" .

View file

@ -0,0 +1,15 @@
#!/bin/bash
local_if=ens3f0
container_ip=172.17.0.2
ssldump_version=1.4b
distribution=ubuntu-focal
sudo iptables -t mangle -I PREROUTING 1 -i ${local_if} -j TEE --gateway ${container_ip}
sudo iptables -t mangle -I POSTROUTING 1 -o ${local_if} -j TEE --gateway ${container_ip}
docker run -it ssldump-${distribution}:${ssldump_version}
sudo iptables -t mangle -D PREROUTING 1
sudo iptables -t mangle -D POSTROUTING 1

View file

@ -0,0 +1,27 @@
FROM ubuntu:groovy
ENV LANG C
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends ca-certificates sudo git build-essential automake autoconf clang libssl-dev libpcap-dev libnet1-dev libjson-c-dev iproute2 && \
apt-get clean
RUN useradd -ms /bin/bash ssldump
RUN passwd -d ssldump
RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers
RUN cd /home/ssldump && \
git clone https://github.com/adulau/ssldump.git build
RUN cd /home/ssldump/build && \
./autogen.sh && \
./configure CC=/usr/bin/clang && \
make && \
sudo make install
USER ssldump
WORKDIR "/home/ssldump"
CMD ["/bin/bash"]

View file

@ -0,0 +1,6 @@
#!/bin/bash
ssldump_version=1.4b
distribution=ubuntu-groovy
docker build -t "ssldump-${distribution}:${ssldump_version}" .

View file

@ -0,0 +1,15 @@
#!/bin/bash
local_if=ens3f0
container_ip=172.17.0.2
ssldump_version=1.4b
distribution=ubuntu-groovy
sudo iptables -t mangle -I PREROUTING 1 -i ${local_if} -j TEE --gateway ${container_ip}
sudo iptables -t mangle -I POSTROUTING 1 -o ${local_if} -j TEE --gateway ${container_ip}
docker run -it ssldump-${distribution}:${ssldump_version}
sudo iptables -t mangle -D PREROUTING 1
sudo iptables -t mangle -D POSTROUTING 1

View file

@ -0,0 +1,41 @@
FROM ubuntu:xenial
ENV LANG C
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends ca-certificates sudo git build-essential automake autoconf clang wget libpcap-dev libnet1-dev libjson-c-dev iproute2 && \
apt-get clean
RUN useradd -ms /bin/bash ssldump
RUN passwd -d ssldump
RUN printf 'Defaults:ssldump env_keep=LD_LIBRARY_PATH\n' | tee -a /etc/sudoers
RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers
USER ssldump
RUN mkdir /home/ssldump/openssl && \
cd /home/ssldump/openssl && \
wget https://www.openssl.org/source/openssl-1.1.1j.tar.gz && \
tar xvfz openssl-1.1.1j.tar.gz && \
cd openssl-1.1.1j && \
./config && \
make -j 2
RUN cd /home/ssldump && \
git clone https://github.com/adulau/ssldump.git build
RUN cd /home/ssldump/build && \
./autogen.sh && \
./configure CFLAGS="-I../openssl/openssl-1.1.1j/include" LDFLAGS="-L../openssl/openssl-1.1.1j -lcrypto -lssl" && \
make && \
sudo make install
ENV LD_LIBRARY_PATH /home/ssldump/openssl/openssl-1.1.1j
RUN printf '#!/bin/bash\nexport LD_LIBRARY_PATH=/home/ssldump/openssl/openssl-1.1.1j\nssldump $@\n' > /home/ssldump/run_ssldump.sh
RUN chmod +x /home/ssldump/run_ssldump.sh
WORKDIR "/home/ssldump"
CMD ["/bin/bash"]

View file

@ -0,0 +1,6 @@
#!/bin/bash
ssldump_version=1.4b
distribution=ubuntu-xenial
docker build -t "ssldump-${distribution}:${ssldump_version}" .

View file

@ -0,0 +1,15 @@
#!/bin/bash
local_if=ens3f0
container_ip=172.17.0.2
ssldump_version=1.4b
distribution=ubuntu-xenial
sudo iptables -t mangle -I PREROUTING 1 -i ${local_if} -j TEE --gateway ${container_ip}
sudo iptables -t mangle -I POSTROUTING 1 -o ${local_if} -j TEE --gateway ${container_ip}
docker run -it ssldump-${distribution}:${ssldump_version}
sudo iptables -t mangle -D PREROUTING 1
sudo iptables -t mangle -D POSTROUTING 1