diff --git a/create-cont.sh b/create-cont.sh index 924e8c5..6a44472 100755 --- a/create-cont.sh +++ b/create-cont.sh @@ -6,7 +6,7 @@ then echo "NE METTEZ PAS DE PASSPHRASE" exit 1 fi -sudo cat ~/.ssh/id_ed25519.pub >> /root/.ssh/authorized_keys +cat ~/.ssh/id_ed25519.pub | sudo tee -a /root/.ssh/authorized_keys echo "effacement des containers existants" echo "################################" docker stop $(docker ps -a -q) diff --git a/install_ansible.sh b/install_ansible.sh index 92d1a70..109b22d 100755 --- a/install_ansible.sh +++ b/install_ansible.sh @@ -42,7 +42,7 @@ pip3 install pywinrm[kerberos] pip3 install molecule[ansible,docker,lint] # pip3 install docker pip3 install ansible-navigator[ansible-core] -pip3 install --upgrade git+https://github.com/networkop/docker-topo.git +#pip3 install --upgrade git+https://github.com/networkop/docker-topo.git # pip3 ensurepath #source ~/.bashrc #source ~/.profile @@ -58,8 +58,22 @@ sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose sudo systemctl enable docker #sudo groupadd docker sudo usermod -a -G docker $USER +#Autoriser les serveur registry local en http +if [ ! -f /etc/docker/daemon.json ] +then + sudo tee -a /etc/docker/daemon.json << 'EOF' + { + "insecure-registries": [ + "registry.iut-kourou.local" + ] + } +EOF +sudo systemctl restart docker +fi + source ~/.bashrc source ~/.profile echo -e "$Red #################################################" echo -e "Veuillez vous déconnecter de votre session !" -echo -e "################################################# $NC" \ No newline at end of file +echo -e "################################################# $NC" +