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
31
votes
6 answers

Docker - Error response from daemon: client is newer than server

After creating a new machine with Docker Machine, I'm getting the following error: $ docker ps Error response from daemon: client is newer than server(client API version 1.21, server API version: 1.19) How can I fix this?
Marc Perrin-Pelletier
  • 12,696
  • 8
  • 28
  • 36
24
votes
3 answers

docker and mysql: Got an error reading communication packets

I have a problem with connectivity in docker. I use an official mysql 5.7 image and Prisma server. When I start it via prisma cli, that uses docker compose underneath (described here) everything works. But I need to start this containers…
Terion
  • 2,396
  • 3
  • 28
  • 42
15
votes
1 answer

How to push an image to a docker registry using the docker Registry API v2

I'm a writing a docker registry API wrapper to pull images from one private registry and push them to another. Based on the documentation first I need to pull the manifest and the layers for an image:tag. Following Puling An Image I've…
mdo123
  • 1,757
  • 3
  • 16
  • 34
14
votes
5 answers

How can I use Docker Registry HTTP API V2 to obtain a list of all repositories in a docker registry?

An external organization that I work with has given me access to a private (auth token protected) docker registry, and eventually I would like to be able to query this registry, using docker's HTTP API V2, in order to obtain a list of all the…
stachyra
  • 4,423
  • 4
  • 20
  • 34
13
votes
7 answers

Build Docker Image From Go Code

I'm trying to build a Docker image using the Docker API and Docker Go libraries (https://github.com/docker/engine-api/). Code example: package main import ( "fmt" "github.com/docker/engine-api/client" …
Mangirdas
  • 243
  • 1
  • 3
  • 9
12
votes
2 answers

Set PortBindings config for ContainerCreate function in golang sdk for docker api

Basically i need to something like this docker run -p something:something --name xxxx imagename in golang sdk (this one https://docs.docker.com/engine/api/sdks/) for docker api, my current code looks like this exposedPorts, portBindings, _ :=…
Adit
  • 183
  • 1
  • 8
9
votes
2 answers

How to enable Docker API access from Windows running Docker Toolbox (docker machine)

I am running the latest Docker Toolbox, using latest Oracle VirtualBox, with Windows 7 as a host OS. I am trying to enable non-TLS access to Docker remote API, so I could use Postman REST client running on Windows and hit docker API running on…
VladH
  • 702
  • 1
  • 6
  • 16
9
votes
1 answer

How to "delete" an image from a private Docker Registry?

I'm writing an API client for docker and the registry API is difficult to work with. I'm trying to delete an image from the registry however I keep getting this error [ { code: 'UNSUPPORTED', message: 'The operation is unsupported.' } ] My steps to…
Aage Torleif
  • 1,907
  • 1
  • 20
  • 37
8
votes
1 answer

Handling docker events in shell script

I would like to catch docker events and do something if something is happend. There are lots of ways to "get/print events": # With curl curl --unix-socket /var/run/docker.sock http:/v1.40/events # With nc echo -e "GET /events HTTP/1.0\r\n" | nc -U…
7
votes
1 answer

Docker Golang API create a container with files from memory

Currently, to get files into a container using the golang api I first must create the container and then use the CopyToContainer function (Example Below). Is it possible to create a container and specify files for it to have at create time, without…
7
votes
1 answer

What is the exact difference between SizeRootFs and SizeRw in Docker containers?

In the list of docker containers you can get the container sizes SizeRootFs and SizeRw, but I can't find what the sizes exact mean.
Martijn van Maasakkers
  • 2,647
  • 3
  • 16
  • 20
6
votes
3 answers

Can we build a docker image using .tar or zip archive

Can we build a docker image using tarball or zip archive which includes dockerfile inside that. I need to build a image from archives by using docker api. Is there any reference or resource , I have search for 3o minutes but couldn't find…
Abdul Rehman
  • 5,326
  • 9
  • 77
  • 150
6
votes
3 answers

Golang - Docker API - parse result of ImagePull

I'm developing a Go script that uses the Docker API for the purposes of my project. After I login to my repository, I pull the Docker image I want, but the problem is that the ImagePull function returns an instance of io.ReadCloser, which I'm only…
Radoslav Stoyanov
  • 1,460
  • 5
  • 27
  • 40
5
votes
1 answer

How to build an Image using Docker API Python Client?

I just have started Docker Api and explored various parts.But I'm stuck to build an image using docker api by using python client, actually I couldn't understand how to setup various required arguments for docker client.images.build() method ? Help…
Abdul Rehman
  • 5,326
  • 9
  • 77
  • 150
4
votes
2 answers

setting ports for container in docker for docker golang api

I am looking forward to do something below like this using docker golang api cmd : docker run -t -i -p 8989:8080 "image-name" /bin/bash Also I am using golang sdk https://github.com/moby/moby/client or https://godoc.org/github.com/moby/moby/client…
Insignianode
  • 41
  • 1
  • 3
1
2 3
12 13