Questions tagged [dockerpy]

The Python API client for Docker

The Python API client for Docker https://github.com/dotcloud/docker-py

191 questions
1
vote
0 answers

Dockerpy test container timing out before database available?

I've got a database (Neo4J) loading in a Docker container, but I think my unit test hits the container before the database is loaded. def setUp(self): client = docker.from_env() self.container = client.containers.run("neo4j", …
allanberry
  • 7,325
  • 6
  • 42
  • 71
1
vote
1 answer

Unable to install docker-compose with pip, "ImportError: No module named dockerpycreds"

I tried to install docker-compose using pip but I'm getting this error: $ docker-compose Traceback (most recent call last): File "/usr/local/bin/docker-compose", line 7, in from compose.cli.main import main File…
Matheus Lima
  • 2,103
  • 3
  • 31
  • 49
1
vote
1 answer

How can I list tags of a given image using docker-py?

Say I've the following images: REPOSITORY TAG IMAGE ID CREATED SIZE docker.site.org:4000/project/my_backend latest d8f4b42c0cae 5 days ago 189…
Édouard Lopez
  • 40,270
  • 28
  • 126
  • 178
1
vote
2 answers

How to move a volume from to a new docker container?

I'm working to implement a mechanism to upgrade the base image of a container. In order to do so I need to: get the list of volumes from the current container ; create a new container with configuration from the old container (volume, network,…
Édouard Lopez
  • 40,270
  • 28
  • 126
  • 178
1
vote
2 answers

Python script to run docker

Flow of the python script: I want to run docker image from python script. After running docker image, I need to execute a shell script which creates a tar file inside docker container. I need to copy that tar file to host machine from docker…
user5154816
1
vote
3 answers

docker-py getarchive destination folder

I am following the instructions given in this link for get_archive()link but instead of creating my container i was trying to use already running container in my case "docker-nginx" as an input string and also the destination folder where my…
ak_1
  • 173
  • 1
  • 2
  • 12
1
vote
1 answer

How to access google cloud docker registry from Python

I want to retrieve a list of images from Google Cloud Docker Registry via https://gcr.io http API. I found a way to do it from command line like this: curl -u _token:$(gcloud auth print-access-token) https://gcr.io/v2/{project}/{repo}/tags/list But…
1
vote
0 answers

How can I athenticate dockerpy using gcloud API?

I have tried to push a Docker Image to "gcr" Registry programmatically. The "gcloud docker --authorize-only" gives me a short - live authentication. How can I perform authentication using python gcloud API without shell execution?
worroc
  • 117
  • 8
1
vote
1 answer

Connect to docker-machine using docker-py (OSX)

On OSX I'm creating a docker-machine as follows: docker-machine create --driver=virtualbox --tls-san dockerhost docker And added to /etc/hosts (I've also tried the reverse): 192.168.99.100 dockerhost And using docker-py to connect to the…
Berco Beute
  • 1,115
  • 15
  • 30
1
vote
1 answer

Incrementing a value when app is accessed by multiple clients

I am using docker-py to build an image and create a container. The container should include port bindings. The idea is that I will have multiple clients accessing the image and be able to open multiple containers. As such, I want the port to…
User588233
  • 481
  • 2
  • 5
  • 16
1
vote
1 answer

Connection refused error with cassandra and docker-py

so basically I am trying to run a cassandra docker instance (2.1) and run cqlsh commands following instructions from https://hub.docker.com/_/cassandra/. $ docker run --name some-cassandra -d cassandra:2.1 $ docker run -it --link…
Sanju
  • 1,974
  • 1
  • 18
  • 33
1
vote
1 answer

Problems with docker py, UnicodeDecodeError at tar read on image build

I am trying to make docker image from generated tar file, the problem is thah the tar file wats generates is valid, and the code worked before. t = tarfile.open('dockerfile.tar',mode='w') file_name = tarfile.TarInfo("dockerfile") file_name.size =…
novox
  • 143
  • 1
  • 10
1
vote
0 answers

Docker ELK stack with docker-py

I'm trying to deploy an ELK stack with docker-py on a VirtualBox VM running Ubuntu 14.04. Currently running docker version 1.7 and am using the Docker Hub library official containers for elasticsearch, kibana, and logstash. I have written a short…
onizo
  • 11
  • 3
1
vote
1 answer

Building Dockers with Ansible docker_image

I'm trying to build a bunch of dockers on a machine using Ansible's docker_image module. I build 1 "base" docker image, which is used as the FROM image in all subsequent dockers images. This works when issuing the build commands manually as: sudo…
1
vote
1 answer

Issue with docker-py in executing /bin/bash

I have a docker image built from ubuntu base image with few softwares installed. i have a startup script, as below #!/bin/bash /usr/local/sbin/process1 -d /usr/local/sbin/process2 -d /bin/bash Now I use docker-py python library to start multiple…
user2896235
  • 339
  • 3
  • 17