Run Docker daemon as a subprocess
Project description
dockerd library spawns your own Docker daemon as a subprocess, lets you run some docker commands, and then kills the daemon when you don't need it anymore.
It works perfectly inside privileged docker containers (achieving docker-in-docker in a faster and more self-contained way than official tutorials)
## Example code
```python
#!/bin/env python3
from dockerd import Docker, CalledProcessError
import sys
with Docker() as docker:
try:
docker.pull('lew21/dockerd')
except CalledProcessError:
pass
try:
docker.build('.', cache_from='lew21/dockerd', pull=True, tag='dockerd')
docker.tag('dockerd', 'lew21/dockerd')
docker.push('lew21/dockerd')
except CalledProcessError as e:
sys.exit(e.returncode)
```
It works perfectly inside privileged docker containers (achieving docker-in-docker in a faster and more self-contained way than official tutorials)
## Example code
```python
#!/bin/env python3
from dockerd import Docker, CalledProcessError
import sys
with Docker() as docker:
try:
docker.pull('lew21/dockerd')
except CalledProcessError:
pass
try:
docker.build('.', cache_from='lew21/dockerd', pull=True, tag='dockerd')
docker.tag('dockerd', 'lew21/dockerd')
docker.push('lew21/dockerd')
except CalledProcessError as e:
sys.exit(e.returncode)
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dockerd-1.0.0.tar.gz
(2.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dockerd-1.0.0.tar.gz.
File metadata
- Download URL: dockerd-1.0.0.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
084271b117316525614329d3f0b9925855e7b56edce0a30ea1478bc62b298dee
|
|
| MD5 |
694a1b0f0887a7900380e1814b338761
|
|
| BLAKE2b-256 |
3d7516fb29ce68580307ba3ca2d5f2a0c53c8bebb3271acf52931c3c219500d5
|
File details
Details for the file dockerd-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dockerd-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae68b8c00d44e97c91ee819acdf28183d009941e642ffaa27bc0c9af3f3d5a9c
|
|
| MD5 |
b86bb980b12da2b4a3ecd4ce5e879ed5
|
|
| BLAKE2b-256 |
11094df4158125118de98ce30df3a1f278262bc83311af347f62dd555063f5a7
|