Skip to content

A container image that prints info about its environment, and has testing features

Notifications You must be signed in to change notification settings

mt-inside/envbin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1fbea6f · Sep 19, 2024
Aug 23, 2023
Feb 23, 2024
Aug 23, 2023
Jun 9, 2022
Aug 23, 2023
Sep 19, 2024
Dec 12, 2020
Apr 5, 2024
Apr 5, 2024
Sep 19, 2024
Aug 23, 2023
Sep 19, 2024
Sep 19, 2024
Mar 27, 2021
Apr 5, 2024
Mar 11, 2021

Repository files navigation

Use

Run from container image:

docker run -t --rm ghcr.io/mt-inside/envbin:v0.0.8 dump

Download single, statically-linked binary. Binaries are not available for Mac, because reasons.

wget -O envbin https://github.com/mt-inside/envbin/releases/download/v0.0.8/envbin-$(uname -s)-$(uname -m)
chmod u+x envbin
./envbin dump

On builds, linking, and CGO

gousb needs libusb, so we need CGO to call it. Because we use CGO, we don't get static linking by default. Trying to statically link is basically a folly across Linux and Darwin, and using Go's native cross-compilation (GH Actions do this when building raw binaries). Thus we don't try, and will get dynamically-linked binaries. libusb will need to be present when we cross-compile? Or do we just need headers? These binaries will need libusb, and the right version of the right libc at runtime, which isn't ideal.

The native tag tries to exclude things that are unlikely to work in a container or other sandbox, ie not running "natively" on the host.