Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.python > #5686
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Stefan Fuhrmann <stefan@fuhrmann.homedns.org> |
| Newsgroups | de.comp.lang.python |
| Subject | [Python-de] docker module |
| Date | Wed, 7 Oct 2020 14:10:36 +0200 |
| Lines | 57 |
| Message-ID | <mailman.1257.1602072645.9580.python-de@python.org> (permalink) |
| References | <dc9ec5eb-0138-f63d-2fa2-52c275916139@fuhrmann.homedns.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Trace | news.uni-berlin.de PsuZzCTDJ/WNO1/dKJVTWgJzvZfeNXHxEPx2osZhTiBw== |
| Return-Path | <stefan@fuhrmann.homedns.org> |
| X-Original-To | python-de@python.org |
| Delivered-To | python-de@mail.python.org |
| Authentication-Results | mail.python.org; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy); dkim-atps=neutral |
| X-Virus-Scanned | Debian amavisd-new at willy.nopanicsystems.net |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
| Content-Language | en-US |
| X-BeenThere | python-de@python.org |
| X-Mailman-Version | 2.1.34 |
| Precedence | list |
| List-Id | Die Deutsche Python Mailingliste <python-de.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-de>, <mailto:python-de-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-de/> |
| List-Post | <mailto:python-de@python.org> |
| List-Help | <mailto:python-de-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-de>, <mailto:python-de-request@python.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <dc9ec5eb-0138-f63d-2fa2-52c275916139@fuhrmann.homedns.org> |
| Xref | csiph.com de.comp.lang.python:5686 |
Show key headers only | View raw
Hallo zusammen,
ich bin Programier- und Python Anfänger.
Momentan befinde ich mich in einer 4 wöchigen python Schulung und als
Abschlussarbeit, nächste Woche, möchte ich gerne
nextcloud für Kunden mit python deployen. Meine Vorstellung: ich habe
ein docker-compose template und passe hier die Pade für Kunden an,
Passwörter setzen, eigenes Netz....
Nun habe ich die docker docs gefunden um das python module zu bedienen.
Dies will mir aber nicht so recht gelingen.
https://docs.docker.com/engine/api/sdk/examples/
hier ist ein Reiter: python
Das ist aber wohl python 2. Okay, auch wenn ich versuche hier anzupassen
und ein einfaches pull mache, passiert nicht viel. Es werden mir beide
Container IDs angezeigt, die ich laufen habe und das wars.
#!/usr/bin/python3
2
3 import subprocess
4 import shutil
5 import os
6 import docker
7 client = docker.from_env()
8 import sys
9 print(sys.version)
10
11 print(client.containers.list())
12 #print(image.id)
13 #print("df:" ,client.containers(df()))
14 #print(client.containers.list()[0].logs())
15 image = client.images.pull("alpine")
16 print("download abgeschloassen: ")
17 print(image.id)
Wenn ich den herkömmlichen weg gehe und ein pull auf "hello world"
mache, funktioniert alles einwandfrei.
Was mache ich falsch? Oder gibt es eine besser Anlaufstelle die besser,
aktueller dokumentiert ist?
Kann jemand helfen?
Danke!
Gruß
Stefan
Back to de.comp.lang.python | Previous | Next | Find similar
[Python-de] docker module Stefan Fuhrmann <stefan@fuhrmann.homedns.org> - 2020-10-07 14:10 +0200
csiph-web