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
1
vote
0 answers

create docker service using docker engine API in node.js

I try to create service using docker-engine API and I use its request sample. what is wrong with it? note: I use Axios, express, and docker swarm. before this problem, I could create containers and stop them, and other things that you can do with…
Kasir Barati
  • 606
  • 13
  • 24
1
vote
1 answer

How to get container stats details using python docker

I am trying to get the docker container stats inside my python code after running the container as shown below. I am referring to python docker SDk https://docker-py.readthedocs.io/en/stable/index.html to run and get the details of…
1
vote
2 answers

Docker API not accessible from within a container

I can make cUrl calls to Docker API but if I run the same script from a container (docker-compose), I can't reach any API endpoint. My requests looks like : $ curl --unix-socket /var/run/docker.sock -X POST http:/localhost/containers/json The…
1
vote
1 answer

How to create image by downloading manifest file and its blobs?

As in title - is it possible to create an image from its manifest.json file and blobs that comes from Docker Registry? Docker has 'save' command which is able to create .tar file of image, but when I look inside that file it has more files and…
prf
  • 75
  • 1
  • 11
1
vote
0 answers

Docker Registry API 2.0 Find Duplicate Tags

I'd like to autonomously query a Docker Registry (API v2) to identify tags that reference the same image. So, for example, if I'm looking at the Docker Hub golang repository and want to find all tags that represent the most recent Alpine image,…
theoneandonly2
  • 721
  • 1
  • 9
  • 21
1
vote
1 answer

Creating a mysql docker container setting env variables

I am using the spotify-docker-client to create and start a mysql container for testing. It works perfect, but I am having a hard time trying to find how to set certain values to connect to the database like MYSQL_ROOT_PASSWORD, MYSQL_DATABASE,…
user1990218
  • 331
  • 1
  • 4
  • 14
1
vote
4 answers

Docker (Spotify) API - cannot connect to Docker

In my Docker (Spring Boot) application I would like to execute Docker commands. I use the docker-spotify-api (client). I get different connection errors. I start the application as part of a docker-compose.yml. This is what I tried so far on an…
tm1701
  • 7,307
  • 17
  • 79
  • 168
1
vote
1 answer

Create docker from tar with Python Docker API

I want to use a remote docker host to build an image from an in memory tar with the Python Docker API. I have successfully created a docker image when sending just a Dockerfile like…
Hampus
  • 2,769
  • 1
  • 22
  • 38
1
vote
1 answer

Uptodate list of running docker containers stated in an exported golang variable

I am trying to use the Golang SDK of Docker in order to maintain a slice variable with currently running containers on the local Docker instance. This slice is exported from a package and I want to use it to feed a web page. I am not really used to…
Loric
  • 1,678
  • 8
  • 28
  • 48
1
vote
1 answer

Create a private repository on Docker Hub using Docker Registry API Client

I'm working on a Python 3.6 project in which I need to create a repository on the docker hub account by using API. I have googled a lot but couldn't find any API client to create repositories on docker hub account. I have found only this module…
Abdul Rehman
  • 5,326
  • 9
  • 77
  • 150
1
vote
0 answers

Create sql container from Docker.DotNet api with -p, -d flags

I am trying to create a sql server docker container using the docker api via Docker.DotNet The powershell to do this according to this guide is as follows docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=" ` -p 1433:1433 --name…
Kelson Ball
  • 948
  • 1
  • 13
  • 30
1
vote
1 answer

Docker xterm.js attach

I'm trying to build a simple in-browser shell using Docker and xterm.js. I've correctly hooked up the frontend using xterm.js's attach addon. How does one connect to Docker via websockets?
Will
  • 1,171
  • 2
  • 14
  • 26
1
vote
2 answers

Unable to pull from GCR registry using docker engine-api and long lived JSON file

In the advanced authentication methods documentation for google cloud container registry explains a method for login to the registry using a JSON Key file with the docker cli, this just works fine $ docker login -u _json_key -p "$(cat…
1
vote
0 answers

Convert docker-compose.yml to json that DockerAPI /services/create accepts?

I want to deploy service into already running Docker Stack via Docker API for Go-lang. As dockerAPI only accepts json as described in their docs, I an searching for a tool that could covert compose.yaml to the json accepted by…
wannamit
  • 117
  • 3
  • 9
1
vote
1 answer

How do I monitor events using the Docker Rest API in C?

I want to monitor events from my docker daemon in a C application, but I'm unclear how to subscribe to that API. This is probably just a Rest API in C question. All of the examples I find with Docker do a single call and response.
Coop
  • 189
  • 1
  • 15