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
2
votes
2 answers

Call Docker API without docker daemon

I was wondering is there a way to make a call to Docker API without docker daemon. I went through their docs and a little bit of source code behind Docker CLI and couldn't find an answer. I want to make a HTTP/HTTPS call to Docker API directly! I…
Nikola Đuza
  • 455
  • 5
  • 11
2
votes
1 answer

Com.github.dockerjava.api.exception.DockerClientException: Certificate path (DOCKER_CERT_PATH) ‘/root/.docker/certs’ doesn’t exist General Discussions

I try to make simple Docker-Java application on Centos 7. Building image and container invocation are successful. This is my code: public class JavaClient { public static void main(String[] args) throws Exception { // TODO…
Joseph Hwang
  • 1,337
  • 3
  • 38
  • 67
2
votes
2 answers

Error delete image from Docker Registry using API v2

I'm trying to remove images from Docker Registry using API v2 folloving сommand: curl -k -v -u 'docker:sdf' -X DELETE https://localhost:5000/v2/bkf/ebbg/manifests/1 But I get next error: > DELETE /v2/bkf/ebbg/manifests/1 HTTP/1.1 > Authorization:…
1
vote
1 answer

How can I stream a docker container log to Webbrowser using express without reloading the page?

What is the best way to stream my docker container log to my Webbrowser without refreshing using express and node-docker-api. This is my current script. app.get('/container/:id/log', async function(req, res){ await checkTokenHeader(req, res); …
DGINX
  • 44
  • 1
  • 7
1
vote
0 answers

Is there a way to find the digest of a docker image with a given tag on a specific date?

I am trying to get the corresponding digest of a docker image with a given tag on a specific date (since the image under the tag might have been overwritten since then), such as getting the digest of the image alpine:latest on 17/12/2020. Is there a…
smgtkn
  • 59
  • 5
1
vote
1 answer

How to make a HEAD request to Docker Hub API to get the manifest?

I need to reach manifests of a lot of images on Docker hub, but every GET request for getting manifest is counted as a pull, as a result, I am restricted by the rate limits of docker hub. Is there a way to get the manifest with a HEAD request…
smgtkn
  • 59
  • 5
1
vote
0 answers

Backup PGSQL in a container using Golang docker SDK

On host machine I have docker-compose stack that have a service called transactions-db its a PostgreSQL container I want to create a backup service using Golang to be able to create .sql to be used for restores later on docker-compose.yml for backup…
1
vote
0 answers

Open terminal windows using Go and Docker SDK

I'm using Go to create a kind of custom client for Docker. It parses a YAML file, creates the containers with some hard-coded options and then creates terminal windows in order to be able to interact with the containers. However, I'm struggling with…
Awacate
  • 125
  • 2
  • 10
1
vote
2 answers

Act Not able to Use Docker API

I am trying to locally test github actions with the open-source Act utility. "Think globally, act locally" I have copied the git hub repository for which i want to check github action and it does contains .github/workflow folders. I run this…
1
vote
1 answer

Cannot connect to the Docker daemon via docker-sdk golang

Docker is running, ContainerExecCreate creates a container, but ContainerExecAttach returns: Cannot connect to the Docker daemon at unix: ///var/run/docker.sock in response. Is the docker daemon running? What could be the problem. import ( …
fabelx
  • 197
  • 1
  • 12
1
vote
1 answer

docker stats --one-shot explanation

I am trying to implement an api endpoint for docker stats --one-shot but I simply do not understand the difference between --one-shot and --no-stream. The API documentation is located here but doesn't illuminate much. I know this seems like a simple…
cdoern
  • 97
  • 1
  • 12
1
vote
1 answer

docker node js file storage volume

I made an app that download images and save them to a directory called storage. everything works great in development but in container I got…
ShaSha
  • 589
  • 3
  • 9
  • 24
1
vote
1 answer

Docker API: Error processing tar file(exit status 1): archive/tar: invalid tar header

I want to upload a zip file to my tomcat container using docker API. http://{mydockerHost}:2375/containers/{containerId}/archive?path=/usr/local/tomcat/ But this i am getting this kind of expection, { "message": "Error processing tar file(exit…
Manoj M
  • 19
  • 4
1
vote
1 answer

How to create container with named volume?

How to create container with named docker volume using the docker-java library?
Gavlos
  • 197
  • 1
  • 14
1
vote
0 answers

Docker-py client gives "invalid client port specification"

I am using the docker-py client to create containers on a need basis. So for this, I am using a generator to come up with a port number and trying to use httpd image on a particular port of the host from the generator. But, the client gives out…
j-code
  • 11
  • 2