5 ms·
Wow. I understand now where you were going with google/nftables. Awesome work ! Do you know if it's possible to pack arbitrary files in a gokrazy image ? Like
by Aissen 8y ago
Wow. I understand now where you were going with google/nftables. Awesome work !
Do you know if it's possible to pack arbitrary files in a gokrazy image ? Like configuration files, data files, or any other native binary ?
- secure 8y agoThanks! gokrazy images currently only contain Go packages, so depending on what you want to do, the best way might be to bundle the file(s) into a Go package. For router7 specifically, rtr7-recover’s -backup flag accepts a tar.gz archive, which will be unpacked to the persistent data partition /perm. This mechanism is used to restore state and configuration when reverting faulty updates. You can use this mechanism, or https://github.com/gokrazy/breakglass https://github.com/gokrazy/breakglass if you prefer an interactive shell, to place files in /perm. That said, I was thinking about an -overlay flag for the gokr-packer, too, so that you could indeed place additional files in the static root file system. I’ll see if it could be done any other way, but this might be a good escape hatch for when the pure-Go model isn’t applicable (e.g. large legacy applications which cannot easily be ported to Go).