8 Commits

Author SHA1 Message Date
Tonis Tiigi
33088c1a56 hack: allow passing config file to test and shell script
One should not use their regular docker credentials here
but make a special config file with only public readonly
token inside.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-01-30 19:00:29 -08:00
Tonis Tiigi
d4cd0194d8 add CNI bridge network provider
This adds a new network configuration based on CNI bridge.
Unlike the existing CNI provider this does not require
user to provide CNI configuration and plugins externally.

The minimal set of plugins required to use the network mode
is provided together with buildkit. Currently, bridge
mode is opt-in but intention is to make it default after
a testing period of one release cycle.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-01-09 18:06:14 -08:00
Tonis Tiigi
f4fdff2c70 hack: update BUILDKIT_DEBUG handling
-ne comparison errors "[: : integer expression expected" on
empty value.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-09-26 21:06:14 -07:00
Jonathan A. Sternberg
a468561e90 dockerfile: introduce a debug variant for the buildkit docker image
This introduces a debug variant of the buildkit docker image. This
version builds the binary in a way that disables optimizations so that
it can be run properly with delve. It also builds and installs delve
only in the debug variant of the image.

For the debug variant, a shim `buildkitd` binary is created that execs
with the proper arguments to delve and forwards to the underlying
binary.

In order to use this version, you can set `--build-arg BUILD_VARIANT=debug`
and it will pick up this version of the image. The default is `release`.
The debug variant is only available for linux and the variant is ignored
for any other target os. Most other targets don't support `buildkitd` at
all so the only os this affects is freebsd.

delve is exposed on port 5000 by default and this can be accessed from
the host by using `-p 5000:5000`. If there is a port conflict on the
host, `-p XXXX:5000` can be used instead. It's also highly recommended
that you do `-p 127.0.0.1:5000:5000` instead. This is because docker
defaults to exposing ports to any interface which exposes the debug port
to the open internet. This is generally a good practice for running
buildkit on a tcp address anyway and the same applies to delve.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2023-09-26 16:48:55 -05:00
Tonis Tiigi
c67ce3316b shell: start shell from cmd, not entrypoint
Dev stage now requires custom entrypoint for containerd
tests so setting entrypoint would override that and make
the tests fail.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-06-28 20:28:58 -07:00
Tonis Tiigi
0fec928d69 hack: add correct entrypoint to shell script
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-01-24 12:48:33 -08:00
Tonis Tiigi
9c672574e5 hack: allow mounting in workdir in shell
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-09-07 15:47:54 -07:00
Tonis Tiigi
d44a406213 add hack/shell helper for dev shell environment
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-08 14:30:40 -07:00