Questions tagged [docker-api]

Use this tag with the Docker Engine API.

Docker runs as a client-server accepting request via the Docker Engine API.

Image

189 questions
0
votes
1 answer

Passing command args to docker api

I'm attempting to find the equivalent of docker run -it networkstatic/nflow-generator -t localhost -p 9995 when using the docker API (I'm using dockerode, but an answer for the HTTP api is just as good). I tried this with no…
waternova
  • 1,472
  • 3
  • 16
  • 22
0
votes
1 answer

Push docker image to Dockerhub using docker api python client

I'm working on docker api python client,I have successfully done with build image, but now I need to push that docker image to dockerhub repository. Here's what I have tried: From views.py client = docker.from_env() …
Abdul Rehman
  • 5,326
  • 9
  • 77
  • 150
0
votes
1 answer

Build Docker image from GitHub repository

I'm trying to build docker image from a GitHub repository using docker api python client. Here's what I have tried: From views.py if request.method == 'POST': post_data = request.POST.copy() post_data.update({'user':…
Abdul Rehman
  • 5,326
  • 9
  • 77
  • 150
0
votes
1 answer

Setup login through Docker API in Python

I'm trying Docker API python library, but couldn't get a little success, have go through the docs.Actually I'm trying to login to docker using API. Here's my python Code: import docker config = os.path.join(BASE_DIR, 'IGui') + 'config.json' client…
Abdul Rehman
  • 5,326
  • 9
  • 77
  • 150
0
votes
1 answer

Docker API - Exec start returns "Page not found"

I'm trying to execute a command in a running docker container through the Docker Engine API with cURL. I'm following the instructions in the API doc.First I create an exec instance and as a response I receive the ID of the created exec. Then I use…
Radoslav Stoyanov
  • 1,460
  • 5
  • 27
  • 40
0
votes
1 answer

How to get the name of a Docker container using JavaScript?

I hope someone will be able to help me. I'm using Dockerode to make actions on my Docker containers via JavaScript. I have some hard times to get the name of a single container. The request is "get the name of the container who has the id XXX" but I…
user7824439
0
votes
1 answer

Is it possible to create an image from a file on a Docker host using the Docker API?

I'm trying to create a Docker image from a file on a Docker host using the Python docker API. The client is running on a different host, so I would like to avoid downloading a file to the client and then uploading it to the Docker host. This…
ISanych
  • 21,590
  • 4
  • 32
  • 52
0
votes
1 answer

Docker Container Usage

I am running docker with kubernetes. I need to find out when the last time docker container is used by a user. I am creating one container per user.I have to kill that container if the user has not interacted with the container for a specific…
rishabh.bhardwaj
  • 378
  • 4
  • 12
0
votes
1 answer

Cannot retrieve the stats of my docker containers using Docker APIs

I have several containers that are running on my Centos7 VM and I would like to retrieve their CPU and Memory usage using the following command: echo -e "GET /containers/(container_name)/stats HTTP/1.0\r\n" | \ nc -U /var/run/docker.sock However,…
A. Dar
  • 1
0
votes
1 answer

In docker how to create a service using Rest API?

I just want to create a service using docker. i created using command line but i didn't find rest call for doing the same . regret if its a silly question please do help i am a beginer
Vishnu Ranganathan
  • 1,277
  • 21
  • 45
0
votes
1 answer

Docker swarm mode API authetication

Previously to trying out docker swarm mode api I have set up docker remote api with tls authentication with the help of https://docs.docker.com/engine/security/https/. Now i have my /usr/lib/systemd/system/docker.service configured…
Stobor
  • 65
  • 1
  • 6
0
votes
1 answer

Docker Remote API exec: Command exit code

I am using Docker Remote API to run some commands, and I realised that the status is 200 even when the command I pass to it fails. Example: curl -H "Content-Type: application/json" -X POST -d…
Alberto Rivera
  • 3,652
  • 3
  • 19
  • 33
0
votes
1 answer

Docker API version with Docker login in CentOS 7

I have a problem when I launch a Ansible role for to install Docker in a CentOS 7 VM. When the docker-login task runs I have the following error: "msg": "Docker API Error: client is newer than server (client API version: 1.24, server API version:…
Miguel
  • 909
  • 2
  • 8
  • 10
0
votes
0 answers

How can I find public images (like ubuntu) in Docker-Hub, using REST API?

Previously I used https://registry.hub.docker.com/v1/search?q=ubuntu&n=1 and got {"num_pages": 13196, "num_results": 13196, "results": [{"is_automated": false, "name": "ubuntu", "is_trusted": false, "is_official": true, "star_count": 4681,…
0
votes
3 answers

docker hub api giving No 'Access-Control-Allow-Origin' error

I'm trying to fetch the list of official images from docker hub using v2 api. If I try to do curl or use postman, I get the response correctly, but when I try to fetch the list using angularjs service, I get the following error XMLHttpRequest…
user2427829
  • 128
  • 1
  • 7
1 2 3
12
13