@mzan Cool!

Naive question: Instead of,

FROM debian:latest

and some,

RUN apt-get install -y make git sqlite3 libsqlite3-dev bash curl coreutils util-linux

why not build using Guix a Docker thing containing that? E.g.,

guix pack -f docker make git sqlite3 libsqlite3-dev bash curl coreutils util-linux --image-tag=guix

FROM guix
COPY …
COPY …
RUN cd / && rm …
VOLUME /writefreely-data

This way, the only part you don’t fully control with Guix is about writefreely_0.15.1_linux_amd64.tar.gz, no?

Follow

@zimoun I should try, because I nevere used "guix pack".

On the same line, before writing the post, I tried also with

guix shell --container --emulate-fhs bash coreutils sqlite

and the pre-compiled Writefreely binary was running inside this shell.

Probably, I can also create directly a Guix system container with the pre-compiled binary, without using Docker altogether.

In any case, I discarded all these reasonable and more elegant intermediate solutions, and I opted for a full "desperate-mode" solution based completely on Docker, because before this, I spent some time trying to package Writefreely without success. So I were burn-out.

This approach is feasible also for all other services with a more complex Dockerfile.

@mzan Well, usually my workflow’s to first go with “guix shell -CF” and if all is fine then to pack this environment with “guix pack”. IMHO, Docker’s helpul because based on the image produced by “guix pack”, I can write a Dockerfile that describe the sequence of commands I typed inside “guix shell -CF”.

Yeah, create something with Guix System’d be nice but it’s much more work! And sometimes, I prefer too having something half-baked but working than having nothing. 😀

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.