Have a pixelated bonfire to warm your night. (Image size is ~ 19KiB.)
from GustavoM@lemmy.world to linux@lemmy.ml on 08 Dec 2023 22:45
https://lemmy.world/post/9327177

Nothing too shabby, but still. To run it you need docker, and after that just type

docker run -it --rm --log-driver none --read-only --net none --cap-drop=ALL --security-opt=no-new-privileges defnotgustavom/pixfire4

…and you will be greeted with a little, small, very pixelated bonfire.

“Why docker and not just a simple command?”

Mostly because of those two flags: --read-only and –net none. Can’t get better than this. :^)

This also came up while in a self-learning process, but I don’t want to “flex” it here.

#linux

threaded - newest

Helix@feddit.de on 08 Dec 2023 23:42 next collapse

cba, can you upload a gif?

JetpackJackson@feddit.de on 09 Dec 2023 00:09 next collapse

What does “cba” mean

jmd_akbar@aussie.zone on 09 Dec 2023 00:36 next collapse

Cba = “Can’t be arsed”

JetpackJackson@feddit.de on 09 Dec 2023 02:16 collapse

Thanks!

hersh@literature.cafe on 09 Dec 2023 00:37 collapse

Can’t be arsed.

It means you don’t care to put in the effort required.

dictionary.cambridge.org/dictionary/…/arsed

JetpackJackson@feddit.de on 09 Dec 2023 01:41 collapse

Thank you!

QuazarOmega@lemy.lol on 10 Dec 2023 12:49 collapse

Here it is:

<img alt="" src="https://lemy.lol/pictrs/image/f73a81f2-a4f6-4688-a657-717636827310.mp4">

Helix@feddit.de on 10 Dec 2023 15:58 collapse

Nice, thanks.

gomp@lemmy.ml on 09 Dec 2023 09:18 next collapse

Wow! This is almost as useful as neofetch ;-)

blotz@lemmy.world on 09 Dec 2023 09:55 next collapse

What is the original size of the program before docker?

edit: Also the docker sandbox is not perfect for running unsafe programs. You could still have programs slow down your entire system by taking as many resources as possible. eg. forkbombs.

floridaman@lemmy.blahaj.zone on 10 Dec 2023 01:00 collapse

Doesn’t docker have a flag for limiting system usage? Like max mem, cores/threads etc? I swear I remember using something like this before.

blotz@lemmy.world on 10 Dec 2023 09:20 collapse

Linux has ulimit so I assume docker does aswell

QuazarOmega@lemy.lol on 09 Dec 2023 21:57 collapse

Doesn’t work with podman (on my machine at least), any suggestions?

Error: copying system image from manifest list: writing blob: adding layer with blob "sha256:f1c0eb6f4ccdca4b72528f451baf6f4027f4b0965396bc4d885e27fd58cba771": processing tar file(potentially insufficient UIDs or GIDs available in user namespace (requested 151413:12311 for /bin): Check /etc/subuid and /etc/subgid if configured locally and run "podman system migrate": lchown /bin: invalid argument): exit status 1
GustavoM@lemmy.world on 09 Dec 2023 22:42 collapse

Did you tried running it as another user? I’ve set binary ownership via chmod to the non-root user in the container.

QuazarOmega@lemy.lol on 10 Dec 2023 10:24 next collapse

I’ll try that, I also read around that I could increase my UID namespace range (not that I understand what it means 🫣), so I’ll try that too

Edit: Now I half understand after reading these:

  1. github.com/containers/podman/issues/12715

  2. docs.podman.io/en/latest/markdown/podman.1.html#r…

3.https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md#etcsubuid-and-etcsubgid-configuration

4.https://opensource.com/article/19/2/how-does-rootless-podman-work

  1. github.com/containers/podman/issues/2542#issuecom…
QuazarOmega@lemy.lol on 10 Dec 2023 10:55 collapse

Tried with another user and it works, looks really cool btw!

Any way to quit gracefully though?
I tried both Ctrl+C and Ctrl+Z but it just ignores the signals, I could only resort to killing it

GustavoM@lemmy.world on 10 Dec 2023 13:43 collapse

Thanks. And CTRL + C is a bit wonky since it waits for the command to reach the end of the code to trigger it, but it works. (It’s intended to be “gloriously minimal”, so theres that. With built-in functions, and the least amount of code and calls.)

QuazarOmega@lemy.lol on 10 Dec 2023 19:53 collapse

I see, weirdly it works every time on my own user, but it is on my second one that it doesn’t, the two applications are different though, did I somehow pull two different images?

With built-in functions, and the least amount of code and calls

I’m a bit curious, can you share the repository?

GustavoM@lemmy.world on 10 Dec 2023 20:32 collapse

I’ve no idea. Still, running it on my rpi 4 and on my orange pi zero 3 has given me the same expected experience without any sudden changes.

I’m a bit curious, can you share the repository?

Here you go.