From: Ian Eure <ian@retrospec.tv>
To: Samuel Schmidt <samuel@schmidt-contact.com>
Cc: Rodrigo Morales <me@rodrigomorales.site>, help-guix@gnu.org
Subject: Re: Error when trying to run "docker-compose up"
Date: Sun, 17 Mar 2024 13:16:42 -0700 [thread overview]
Message-ID: <871q88vbl5.fsf@meson> (raw)
In-Reply-To: <1490502251.1052552.1710098230842@fidget.co-bxl>
Samuel Schmidt <samuel@schmidt-contact.com> writes:
> Hello,
>
> I am facing the same problem, but I have to use docker-compose.
> I guess there are no plans to fix this atm? :/ Or did you find
> any help regarding this problem?
>
> Am 17.01.2024 um 21:53, Rodrigo Morales <me@rodrigomorales.site>
> schrieb:Rodrigo Morales <me@rodrigomorales.site> writes:
>
>> Does anyone know what could be the problem?
>
> I found this thread [1] on help-guix from 2019 where a user
> reports
> having errores with docker-compose. A user replies:
>
> #+BEGIN_QUOTE
> The root of this problem is that our docker-compose package is
> very
> old: it was added in January 2016(!), and has never been updated
> since. I guess that proves how unneccessary Docker is once
> you've
> discovered Guix… ducks
> #+END_QUOTE
>
> Furthermore, I noticed that the version of docker-compose is
> 1.29.2 and
> upstream [2] is at 2.12.0, so even if I fix this problem. I'll
> be using
> an old version of docker-compose. For my use case, it would be
> more
> useful to use the latest version of docker-compose, so if I
> wanted to
> use docker-compose under Guix, I would need for me to write a
> Guix
> package for that version.
>
Note also that this is a Docker Compose v1->v2 upgrade. The newer
version is completely different from v1, it’s a plugin that
integrates with the Docker CLI, so you run `docker compose' rather
than `docker-compose'. We likely need a completely new package
for it.
> I have one question: The user above states that Docker is
> unnecessary
> once you have discovered Guix. I have been using Guix for around
> 6
> months, but I don't see how I could use Guix for running a web
> server on
> a container that uses node.js and postgresql. The reason why I
> initially
> wanted to use docker is because I find it more convenient to run
> a web
> server with node.js and postgresql. Any information on this
> topic is
> appreciated.
>
I continue to find both Guix and Docker useful. While they have
some overlapping goals, I don’t believe either can replace the
other.
The closest thing to Docker Compose I’m aware of that you can do
with pure Guix is create an operating-system with the services you
want to run, then use `guix system image -t docker
my-machine-definition.scm' to bundle it as a Docker image. This
will bring up a container with the base Guix and those services
running inside.
This setup lacks some niceties which Compose has:
Everything seems to run in the same namespace[1], so a compromise
of one service is more likely to compromise the whole system.
Compose is more resistant to this, since each service runs in its
own namespace (that is, container). I don’t know of a Guix
equivalent for the Compose style of multi-container setup.
I haven’t compared, but I strongly suspect the image sizes are
larger than an equivalent plain Docker image, due to having the
base Guix inside them, whereas many Docker images use (or have the
option of) an Alpine base.
It can only run things with a Guix package and Shepherd service to
manage it.
Updates are likely slower than vendor-provided Docker images.
It’s also a more involved setup -- you have to write the config,
and build the image, and load it, and run it. In fact, I have yet
to actually make a system image that works *at all*. Compose is
dead simple in comparison.
— Ian
[1]: At least, if Shepherd can run services in their own
namespaces, like Docker can, the manual is silent on the topic.
next prev parent reply other threads:[~2024-03-17 20:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 19:43 Error when trying to run "docker-compose up" Rodrigo Morales
2024-01-17 20:53 ` Rodrigo Morales
2024-01-17 21:05 ` Rodrigo Morales
2024-01-17 21:30 ` Rodrigo Morales
2024-03-10 19:17 ` Samuel Schmidt
2024-03-10 19:25 ` Tomas Volf
2024-03-17 20:16 ` Ian Eure [this message]
2024-03-22 12:27 ` Samuel Schmidt
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=871q88vbl5.fsf@meson \
--to=ian@retrospec.tv \
--cc=help-guix@gnu.org \
--cc=me@rodrigomorales.site \
--cc=samuel@schmidt-contact.com \
/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.
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).