Git Product home page Git Product logo

docker-api.el's Introduction

Docker Remote API

Emacs interface to the Docker Remote API.

Examples

List images

(--each (docker-api-images)
  (message "image: %s size: %d" (car (assoc-default 'RepoTags it)) (assoc-default 'Size it)))

Different DOCKER_HOST

(docker-api-with-connection "http://myhost.com:1234"
  (docker-api-images))

TRAMP

(let ((default-directory "/ssh:[email protected]:"))
  (docker-api-images))

Utilities

docker-api-http-request (method path)

Make a docker HTTP request using method ('get, 'post or 'delete) at PATH (/images/json, etc).

docker-api-json-request (method path)

Same as docker-api-http-request but parses results as JSON.

docker-api.el's People

Contributors

silex avatar syohex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-api.el's Issues

with-docker-daemon

@tzz

@Silex since you could be dealing with multiple daemons across multiple machines, maybe something like this would make sense:

(with-docker-daemon mydaemon
(docker-image-pull ...))
Without the with-docker-daemon wrapper, all the operations then implicitly work on the local Docker daemon, as users would expect.

It's unclear what happens if you take an image from one daemon and hand it to another. Maybe across daemons, the image is serialized as just a string... and other things are just not portable, like running processes, but could again be serialized to strings.

Docker API over Tramp

Could you please consider also supporting Tramp syntax somehow? It would be ridiculously useful to me to be able to use Docker remotely over Tramp/SSH. I don't have a strong opinion on the syntax but something like /user@host:/var/docker/docker.sock could be good enough.

https://github.com/emacs-pe/docker-tramp.el calls shell commands remotely, while access to the actual API would be much more reliable and scalable.

OO api with eieio?

Do we want to make some kind of OO api?

For example:

(let ((images (docker-images))
      (first-image (car images)))
  (docker-image-pull first-image)
  (docker-image-push first-image "Foo:bar")
  (docker-image-rmi first-image))

With eieio methods for each api (pull/push/etc).

Inspiration: https://github.com/swipely/docker-api

Improve docker-connection options

Right now the options to configure the docker connection is tightly coupled to how make-network-process works, which has an API kinda bizarre and unintuitive.

Refactor the options so it parses ONE url instead, like:

(setq docker-connection-url "file:///var/docker/docker.sock")
(setq docker-connection-url "http://somehost.com:1234")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.