Skip to main content

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)

```


Project details


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 hashes)

Uploaded source

Built Distribution

dockerd-1.0.0-py3-none-any.whl (3.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page