All Projects → docker → Docker Py

docker / Docker Py

Licence: apache-2.0
A Python library for the Docker Engine API

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Docker Py

aws docker swarm
setup to bootstrap docker swarm cluster and a controller on AWS using terraform
Stars: ✭ 24 (-99.56%)
Mutual labels:  docker-swarm
Dockercheatsheet
🐋 Docker Cheat Sheet 🐋
Stars: ✭ 3,301 (-40.12%)
Mutual labels:  docker-swarm
Please Contain Yourself
A Docker tutorial written for people who don't actually know Docker already.
Stars: ✭ 385 (-93.02%)
Mutual labels:  docker-swarm
video-tutorial-docker
Learn with me and get more knowledge about Docker and Docker Swarm environments.
Stars: ✭ 29 (-99.47%)
Mutual labels:  docker-swarm
Prometheus
A docker-compose stack for Prometheus monitoring
Stars: ✭ 3,383 (-38.64%)
Mutual labels:  docker-swarm
Portainer
Making Docker and Kubernetes management easy.
Stars: ✭ 20,434 (+270.65%)
Mutual labels:  docker-swarm
docker-swarm-vagrant
Getting started with Docker swarm
Stars: ✭ 20 (-99.64%)
Mutual labels:  docker-swarm
Docker Windows Box
Various Vagrant envs with Windows 2019/10 and Docker, Swarm mode, LCOW, WSL2, ...
Stars: ✭ 487 (-91.17%)
Mutual labels:  docker-swarm
Time2code
Portable Scalable web code editor to integrate into your sites and learning experiences
Stars: ✭ 294 (-94.67%)
Mutual labels:  docker-swarm
Awesome Docker
🐳 A curated list of Docker resources and projects
Stars: ✭ 20,870 (+278.56%)
Mutual labels:  docker-swarm
Bmw Tensorflow Inference Api Gpu
This is a repository for an object detection inference API using the Tensorflow framework.
Stars: ✭ 277 (-94.98%)
Mutual labels:  docker-swarm
Jaas
Run jobs (tasks/one-shot containers) with Docker
Stars: ✭ 291 (-94.72%)
Mutual labels:  docker-swarm
Swirl
A web UI for Docker, focused on swarm cluster.
Stars: ✭ 332 (-93.98%)
Mutual labels:  docker-swarm
dns-resolver-infra
Privacy DNS infrastructure
Stars: ✭ 39 (-99.29%)
Mutual labels:  docker-swarm
Orbiter
Orbiter is an opensource docker swarm autoscaler
Stars: ✭ 420 (-92.38%)
Mutual labels:  docker-swarm
arakat
ARAKAT - Big Data Analysis and Business Intelligence Application Development Platform
Stars: ✭ 23 (-99.58%)
Mutual labels:  docker-swarm
Micro Company
Rest-full, Hipermedia-based distributed application. Spring boot & cloud. Angular. CQRS. Eventsourcing. Axonframework. Microservices. Docker. CloudFoundry
Stars: ✭ 307 (-94.43%)
Mutual labels:  docker-swarm
Dockerswarm.rocks
Docker Swarm mode rocks! Ideas, tools and recipes. Get a production-ready, distributed, HTTPS served, cluster in minutes, not weeks.
Stars: ✭ 584 (-89.41%)
Mutual labels:  docker-swarm
Tads Boilerplate
Terraform + Ansible + Docker Swarm boilerplate = DevOps on 🔥🔥🔥 | Infrastructure as Code
Stars: ✭ 424 (-92.31%)
Mutual labels:  docker-swarm
Zenko
Zenko is the open source multi-cloud data controller: own and keep control of your data on any cloud.
Stars: ✭ 353 (-93.6%)
Mutual labels:  docker-swarm

Docker SDK for Python

Build Status

A Python library for the Docker Engine API. It lets you do anything the docker command does, but from within Python apps – run containers, manage containers, manage Swarms, etc.

Installation

The latest stable version is available on PyPI. Either add docker to your requirements.txt file or install with pip:

pip install docker

If you are intending to connect to a docker host via TLS, add docker[tls] to your requirements instead, or install with pip:

pip install docker[tls]

Usage

Connect to Docker using the default socket or the configuration in your environment:

import docker
client = docker.from_env()

You can run containers:

>>> client.containers.run("ubuntu:latest", "echo hello world")
'hello world\n'

You can run containers in the background:

>>> client.containers.run("bfirsh/reticulate-splines", detach=True)
<Container '45e6d2de7c54'>

You can manage containers:

>>> client.containers.list()
[<Container '45e6d2de7c54'>, <Container 'db18e4f20eaa'>, ...]

>>> container = client.containers.get('45e6d2de7c54')

>>> container.attrs['Config']['Image']
"bfirsh/reticulate-splines"

>>> container.logs()
"Reticulating spline 1...\n"

>>> container.stop()

You can stream logs:

>>> for line in container.logs(stream=True):
...   print(line.strip())
Reticulating spline 2...
Reticulating spline 3...
...

You can manage images:

>>> client.images.pull('nginx')
<Image 'nginx'>

>>> client.images.list()
[<Image 'ubuntu'>, <Image 'nginx'>, ...]

Read the full documentation to see everything you can do.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].