From e2c189925325d0621c43982d44c9e4c7fa697ea8 Mon Sep 17 00:00:00 2001 From: lboue Date: Sun, 22 Sep 2019 13:59:41 +0200 Subject: [PATCH] Upgrading versions - Ubuntu 18.04 LTS - Ansible 2.8 --- docker/network_automation/Dockerfile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docker/network_automation/Dockerfile b/docker/network_automation/Dockerfile index be722c8..e5636d4 100644 --- a/docker/network_automation/Dockerfile +++ b/docker/network_automation/Dockerfile @@ -1,20 +1,21 @@ # docker base image for Netmiko, NAPALM, Pyntc, and Ansible -FROM ubuntu:xenial +FROM ubuntu:bionic RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y --no-install-recommends \ - install telnet curl openssh-client nano vim-tiny iputils-ping python build-essential \ - libssl-dev libffi-dev python-pip python3-pip python-setuptools \ - python-dev net-tools python3 software-properties-common \ - && apt-add-repository -y ppa:ansible/ansible-2.6 \ + install telnet curl openssh-client nano vim-tiny iputils-ping build-essential \ + libssl-dev libffi-dev python3-pip python3-dev python3-setuptools \ + net-tools python3 software-properties-common \ + && apt-add-repository -y ppa:ansible/ansible-2.8 \ && apt-get update && apt-get -y --no-install-recommends install ansible \ && rm -rf /var/lib/apt/lists/* \ - && pip install --upgrade pip \ - && pip install cryptography netmiko napalm pyntc \ - && pip install --upgrade paramiko && mkdir /scripts \ + && pip3 install wheel \ + && pip3 install cryptography netmiko napalm pyntc \ + && pip3 install --upgrade paramiko && mkdir /scripts \ && mkdir /root/.ssh/ \ && echo "KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1" > /root/.ssh/config \ - && echo "Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr" >> /root/.ssh/config + && echo "Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr" >> /root/.ssh/config \ + && chown -R root /root/.ssh/ VOLUME [ "/root","/usr", "/scripts" ] CMD [ "sh", "-c", "cd; exec bash -i" ]