0

I want to run docker commands (mainly docker build and docker run) from a downloadable, desktop application (an Electron application), likely by accessing the Docker API. However, rather than having the user download both the Docker client and this application, I was wondering whether there was any way to bundle both in the same install?

SI2
  • 43
  • 1
  • 7
  • 2
    You do NOT want to do that. Docker runs a service on the machine, and that service runs with privileges. That is something the user must consciously install. – root Jan 12 '20 at 10:17
  • I'll definitely make that explicit on install but particularly as it will predominantly be used internally, that shouldn't be an issue. – SI2 Jan 12 '20 at 11:10
  • 1
    You don't need a `docker` binary just to make client calls. Use a [client library](https://docs.docker.com/develop/sdk/) to talk to the Docker daemon. Also, think hard about security, since it's very easy to use `docker run` to root a system. – David Maze Jan 12 '20 at 11:17
  • By shipping versions of docker you become responsible of updating and maintaining this docker installation (e.g. providing security updates). Are you sure you want to do that? Anyway the number of different operating systems is too large to ship docker with your app. – Robert Jan 12 '20 at 12:39
  • Shipping Docker might be infeasible but it looks like using [containerd](https://containerd.io/) might be the solution (in the same way that the Docker client does it). The [client package](https://github.com/containerd/containerd/blob/master/docs/getting-started.md) seems surprisingly simple. Would this be a potential solution? – SI2 Jan 13 '20 at 08:35

0 Answers0