Benutzer-Werkzeuge

Webseiten-Werkzeuge


ne:docker:dockerfiles

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
ne:docker:dockerfiles [2023/08/31 05:07] – angelegt adminne:docker:dockerfiles [2023/09/02 14:58] (aktuell) admin
Zeile 3: Zeile 3:
 <cli> <cli>
 FROM alpine:latest FROM alpine:latest
-ENV ANSIBLE_VERSION 2.9.17+ENV ANSIBLE_VERSION 2.15.3
  
-RUN apk update && apk upgrade +RUN apk update; \
-RUN apt-get update; \+
     apk add gcc python3; \     apk add gcc python3; \
     apk add python3-pip; \     apk add python3-pip; \
-    apk add cmd:pip3 \ #  pull whatever package provides the pip3 command.  +    apk add cmd:pip3 \ # pull whatever package provides the pip3 command.  
-    apt-get clean all+    apk add openssh-client; \ 
 +    apk cache clean 
 +     
 +# add Cisco Algorithms to ssh_config 
 +RUN echo 'KexAlgorithms diffie-hellman-group-exchange-sha1, diffie-hellman-group14-sha1' >> /etc/ssh/ssh_config 
 +RUN echo 'HostKeyAlgorithms ssh-rsa' >> /etc/ssh/ssh_config 
 + 
 +# install ansible and pyats
 RUN pip3 install --upgrade pip; \ RUN pip3 install --upgrade pip; \
     pip3 install "ansible==${ANSIBLE_VERSION}"; \     pip3 install "ansible==${ANSIBLE_VERSION}"; \
     pip3 install ansible     pip3 install ansible
 +RUN pip3 install pyats
 </cli> </cli>
  
 <code bash> <code bash>
 docker build -t ansible:2. . docker build -t ansible:2. .
 +</code>
 +
 +Restart a stopped container
 +<code bash>
 +docker restart <container_name>
 </code> </code>
  
  
ne/docker/dockerfiles.1693458432.txt.gz · Zuletzt geändert: 2023/08/31 05:07 von admin