unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: paul via Guix-patches via <guix-patches@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 70265@debbugs.gnu.org, Andrew Tropin <andrew@trop.in>,
	Tanguy Le Carrour <tanguy@bioneland.org>,
	paren@disroot.org
Subject: [bug#70265] Add docker cli Guix Home service and some docker authentication plugins
Date: Thu, 16 May 2024 00:49:37 +0200	[thread overview]
Message-ID: <db2997e0-10a8-7bc9-a73d-091188121b7d@autistici.org> (raw)
In-Reply-To: <87a5l5ttz5.fsf_-_@gnu.org>

Hello Ludo’ ,

I think you are raising a fair point. I was also not sure about whether 
to upstream this service, even if I have been using it for some months.

On 5/4/24 18:36, Ludovic Courtès wrote:
> A more general question: do you think this particular example (libsecret
> plugin) could be solved in another way without involving Home?  (For
> example by having a plugin search path in the package.)
>
> Do you have other use cases in mind?
My main use case for this is currently is docker compose v2. I packaged 
the binary from github in my personal channel [0] and with this service 
[1]in my home-environment I'm able to use docker compose (without dash) 
commands.
> The reason I’m asking is that it feels heavyweight for what looks like
> “basic” Docker configuration.

It definitely is and whether to accept this patch imho depends on the 
ETA for the optimal solution. Assuming someone packages docker compose 
v2 and its dependencies, then as far as I'm aware there are are 3 ways 
to make docker-cli aware of plugins on Guix:

1. this service, i.e. listing plugins in docker's configuration file. 
the advantage of this solution is that it doesn't require changing the 
docker-cli package. the disadvantage is that docker for some reason 
always tries to write the following to the config file, even if it is 
not needed :

"auths": { "https://index.docker.io/v1/": {} }

this is why i added it in the documentation, but as you pointed out it 
is useless.

2. We make a docker-cli-with-bundled-plugins function or similar that 
takes a list of plugin packages and hardcodes their paths into docker's 
source code before compilation. This is the approach I took here [2]. 
This currently requires recompilation every time since docker compose v2 
is not in guix.

3. We patch docker [3] to make it aware of plugins with a search path 
like DOCKER_CLI_PLUGINS . But I don't think this patch should live in 
Guix. It should go into docker mainline to make sure that it is 
supported also in future releases. I never tried contributing to docker, 
this does not seem a complex change but I wonder why it was never done 
until now.

Given all of the above the shortest way to achieve my goal of using 
docker compose v2 seemed #1 but I can see how for the Guix project the 
best would be #3. What do you think (and everyone CCed as well)? Could 
this service be a temporary workaround (after addressing your comments), 
while I try to see whether docker mainline could be interested in a patch?

I will address your comments after we reach consensus on how to proceed, 
so that I don't make everyone lose more time than I already have. Thank 
you all for your work,

giacomo

[0]: 
https://gitlab.com/orang3/small-guix/-/blob/master/small-guix/packages/compose.scm
[1]: 
https://gitlab.com/orang3/guix-deployments/-/blob/main/modules/common/home/fishinthecalculator/home-configuration.scm?ref_type=heads#L71
[2]: 
https://github.com/bonfire-networks/bonfire-app/blob/main/manifest.scm#L57
[3]: 
https://github.com/docker/cli/blob/master/cli-plugins/manager/manager_unix.go





      reply	other threads:[~2024-05-15 22:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-07 20:54 [bug#70265] Add docker cli Guix Home service and some docker authentication plugins paul via Guix-patches via
2024-04-07 20:57 ` [bug#70265] [PATCH 1/3] gnu: Add docker-credential-secretservice Giacomo Leidi via Guix-patches via
2024-04-07 20:57   ` [bug#70265] [PATCH 2/3] gnu: Add docker-credential-pass Giacomo Leidi via Guix-patches via
2024-04-07 20:57   ` [bug#70265] [PATCH 3/3] gnu: Add home-docker-cli-service-type Giacomo Leidi via Guix-patches via
2024-05-04 16:36     ` [bug#70265] Add docker cli Guix Home service and some docker authentication plugins Ludovic Courtès
2024-05-15 22:49       ` paul via Guix-patches via [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=db2997e0-10a8-7bc9-a73d-091188121b7d@autistici.org \
    --to=guix-patches@gnu.org \
    --cc=70265@debbugs.gnu.org \
    --cc=andrew@trop.in \
    --cc=goodoldpaul@autistici.org \
    --cc=ludo@gnu.org \
    --cc=paren@disroot.org \
    --cc=tanguy@bioneland.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).