docker-api

Docker - Enable Remote HTTP API with SystemD and “daemon.json”

妖精的绣舞 提交于 2019-12-05 02:24:40
问题 Disclaimer: On a old machine with Ubuntu 14.04 with Upstart as init system I have enabled the HTTP API by defining DOCKER_OPTS on /etc/default/docker . It works. $ docker version Client: Version: 1.11.2 (...) Server: Version: 1.11.2 (...) Problem: This does solution does not work on a recent machine with Ubuntu 16.04 with SystemD. As stated on the top of the recent file installed /etc/default/docker : # Docker Upstart and SysVinit configuration file # # THIS FILE DOES NOT APPLY TO SYSTEMD # #

How to connect to an existing docker network with docker remote API (through dockerode)

╄→尐↘猪︶ㄣ 提交于 2019-12-04 11:59:15
I use docker-compose to create a "park" of container inter-linked. Nothing special here, I have API/Frontend/Backend etc.. There is my docker-compose.yml : version: "2" services: api: build: ./deimos_api/docker ports: - "39999:80" volumes: - ./deimos_api:/root/deimos_api asset: build: ./deimos_asset/docker ports: - "8000:80" volumes: - ./deimos_asset:/root/deimos_asset depends_on: - api links: - api data-manager: build: ./deimos_data_manager/docker ports: - "3333:3333" volumes: - ./deimos_data_manager:/root/deimos_data_manager depends_on: - api links: - api backend: build: ./deimos_backend

Docker - Enable Remote HTTP API with SystemD and “daemon.json”

孤街醉人 提交于 2019-12-03 17:22:27
Disclaimer: On a old machine with Ubuntu 14.04 with Upstart as init system I have enabled the HTTP API by defining DOCKER_OPTS on /etc/default/docker . It works. $ docker version Client: Version: 1.11.2 (...) Server: Version: 1.11.2 (...) Problem: This does solution does not work on a recent machine with Ubuntu 16.04 with SystemD. As stated on the top of the recent file installed /etc/default/docker : # Docker Upstart and SysVinit configuration file # # THIS FILE DOES NOT APPLY TO SYSTEMD # # Please see the documentation for "systemd drop-ins": # https://docs.docker.com/engine/articles/systemd

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

雨燕双飞 提交于 2019-11-28 18:39:45
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? docker-machine upgrade <your-machine> will do the trick. This can happen - as it did for me - even if you're not using RCs and your machine was newly created. It would be due to an ISO cache issue. The error is commented in this thread . If the docker client is 1.9.x and the server is running docker 1.8.x, the error message is observed. If someone happens to get this error,

How to build an Image using Docker API?

邮差的信 提交于 2019-11-28 12:24:01
问题 I am trying to build a docker Image using the APIs mentioned in the official link. But I am unable to get what the document says: Example request: POST /v1.24/build HTTP/1.1 {{ TAR STREAM }} There are few things which are confusing me, 1) Where to mention the path for the Dockerfile ? 2) "The archive must include a build instructions file, typically called Dockerfile at the archive’s root." This statement from docker docs, the confusion here is what is archive's root ? 3) What is the command

Build Docker Image From Go Code

◇◆丶佛笑我妖孽 提交于 2019-11-28 00:12:06
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" "github.com/docker/engine-api/types" "golang.org/x/net/context" ) func main() { defaultHeaders := map[string]string{"User-Agent": "engine-api-cli-1.0"} cli, err := client.NewClient("unix:///var/run/docker.sock", "v1.22", nil, defaultHeaders) if err != nil { panic(err) } fmt.Print(cli.ClientVersion()) opt := types.ImageBuildOptions{ CPUSetCPUs: "2", CPUSetMems: "12", CPUShares: 20, CPUQuota: 10,

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

两盒软妹~` 提交于 2019-11-27 14:11:27
问题 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 docker-machine in the VirtualBox. I found that if Docker configuration included -H tcp://0.0.0.0:2375 , that would do the trick exposing the API on port 2375 of the docker machine, but for the life of me I can't find where this configuration is stored

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

∥☆過路亽.° 提交于 2019-11-27 11:34:03
问题 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? 回答1: docker-machine upgrade <your-machine> will do the trick. This can happen - as it did for me - even if you're not using RCs and your machine was newly created. It would be due to an ISO cache issue. The error is commented in this thread. If the docker client is 1.9.x and