fiatjaf / njump

mirror of https://git.njump.me/njump
MIT License
108 stars 24 forks source link

podman/docker container #3

Open micressor opened 1 year ago

micressor commented 1 year ago

i would be very happy about a podman/docker container that I can easily run.

micressor commented 11 months ago

The dockerfile seems to use almost 30GB of temporary space to build the container.

fiatjaf commented 11 months ago

Do you understand why?

micressor commented 11 months ago

I think it is due to the different build stages. As soon as the container is running and I run a clean up

podman system prune --all -f

the disk usage of podman is reduced to about 100mb (what the njump container/image) itself needs.

cxplay commented 11 months ago

The dockerfile seems to use almost 30GB of temporary space to build the container.

It's best not to use containers if you don't have enough disk space, or try building them on a dedicated machine and deploying them on a node machine.

fiatjaf commented 11 months ago

Just use the Go compiler or download a precompiled binary. Docker is a nuisance.

micressor commented 11 months ago

I can't tell. For me as an operator and not a developer, distribution packages or a container are a benefit ;-)

I cannot currently build njump on debian 10:

TAILWIND_DEBUG=true go run .
invalid go version '1.21.0': must match format 1.23

Long story short, the Dockerfile works, just needs a lot of temporary space.

The pre-compiled binary njump-v0.0.1-linux-amd64 seems to have a problem. The layout is completely distorted. According to the network analyzer, something from the tailwind bundle is not loading correctly.

fiatjaf commented 11 months ago

The precompile binaries were indeed broken. They're fixed now in the new release. Thank you.

About Docker, we'll accept contributions that make the Docker build less wasteful in resources. I have no idea of how to do that myself.

To build locally unfortunately you need the latest Go version, I'll try to not force that as a requirement in the future.

micressor commented 11 months ago

The precompile binaries were indeed broken. They're fixed now in the new release. Thank you.

yes! Now it works - thanks a lot.

To build locally unfortunately you need the latest Go version, I'll try to not force that as a requirement in the future.

That would be very helpful - thanks.