diff --git a/Dockerfile.bookworm b/Dockerfile.bookworm index b84471f..6d172f6 100644 --- a/Dockerfile.bookworm +++ b/Dockerfile.bookworm @@ -2,11 +2,12 @@ FROM debian:bookworm ARG DEBIAN_FRONTEND=noninteractive ARG VPP_INSTALL_SKIP_SYSCTL=true ARG REPO=release +EXPOSE 22/tcp RUN apt-get update && apt-get -y install curl procps tcpdump iproute2 iptables \ - iputils-ping net-tools git python3 python3-pip vim-tiny && apt-get clean + iputils-ping net-tools git python3 python3-pip vim-tiny openssh-server && apt-get clean # Install VPP -RUN mkdir -p /var/log/vpp +RUN mkdir -p /var/log/vpp /root/.ssh/ RUN curl -s https://packagecloud.io/install/repositories/fdio/${REPO}/script.deb.sh | bash RUN apt-get update && apt-get -y install vpp vpp-plugin-core && apt-get clean diff --git a/files/init-container.sh b/files/init-container.sh index 844b3da..00bc5a9 100755 --- a/files/init-container.sh +++ b/files/init-container.sh @@ -9,6 +9,11 @@ echo "Creating dataplane namespace" /usr/bin/touch /etc/netns/$NETNS/resolv.conf /usr/sbin/ip netns add $NETNS +echo "Starting SSH, with credentials root:vpp" +sed -i -e 's,^#PermitRootLogin prohibit-password,PermitRootLogin yes,' /etc/ssh/sshd_config +sed -i -e 's,^root:.*,root:$y$j9T$kG8pyZEVmwLXEtXekQCRK.$9iJxq/bEx5buni1hrC8VmvkDHRy7ZMsw9wYvwrzexID:20211::::::,' /etc/shadow +/etc/init.d/ssh start + echo "Generating $CLAB_VPP_FILE" : > $CLAB_VPP_FILE MTU=9216