Add SSH and create default credentials 'root:vpp'
This commit is contained in:
@ -2,11 +2,12 @@ FROM debian:bookworm
|
|||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
ARG VPP_INSTALL_SKIP_SYSCTL=true
|
ARG VPP_INSTALL_SKIP_SYSCTL=true
|
||||||
ARG REPO=release
|
ARG REPO=release
|
||||||
|
EXPOSE 22/tcp
|
||||||
RUN apt-get update && apt-get -y install curl procps tcpdump iproute2 iptables \
|
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
|
# 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 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
|
RUN apt-get update && apt-get -y install vpp vpp-plugin-core && apt-get clean
|
||||||
|
|
||||||
|
@ -9,6 +9,11 @@ echo "Creating dataplane namespace"
|
|||||||
/usr/bin/touch /etc/netns/$NETNS/resolv.conf
|
/usr/bin/touch /etc/netns/$NETNS/resolv.conf
|
||||||
/usr/sbin/ip netns add $NETNS
|
/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"
|
echo "Generating $CLAB_VPP_FILE"
|
||||||
: > $CLAB_VPP_FILE
|
: > $CLAB_VPP_FILE
|
||||||
MTU=9216
|
MTU=9216
|
||||||
|
Reference in New Issue
Block a user