File tree Expand file tree Collapse file tree 4 files changed +88
-0
lines changed Expand file tree Collapse file tree 4 files changed +88
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Use to set up a dev environment for buildkit.
4
+ # Not meant for production deployments.
5
+ # Use the same way you would use docker compose.
6
+ #
7
+ # $ hack/compose up -d --build
8
+ #
9
+ # Can be extended for local development by adding
10
+ # a compose.override.yaml file to the same directory.
11
+ #
12
+ # Additional config files for extra services can
13
+ # also be placed in the same folder and they will
14
+ # be automatically ignored by git.
15
+ #
16
+ # To access the newly created development buildkit,
17
+ # use either:
18
+ #
19
+ # $ buildctl --addr tcp://127.0.0.1:1234 ...
20
+ #
21
+ # or alternatively configure a new builder with buildx.
22
+ #
23
+ # $ docker buildx create \
24
+ # --bootstrap \
25
+ # --name dev \
26
+ # --driver remote \
27
+ # tcp://127.0.0.1:1234
28
+ # $ docker buildx --builder dev ...
29
+
30
+ . $( dirname $0 ) /util
31
+ set -eu -o pipefail
32
+
33
+ filesDir=$( dirname $0 ) /composefiles
34
+
35
+ args=(compose ' -f' " $filesDir /compose.yaml" )
36
+ if [ -f " $filesDir /compose.override.yaml" ]; then
37
+ args+=(' -f' " $filesDir /compose.override.yaml" )
38
+ fi
39
+
40
+ dockerCmd " ${args[@]} " " $@ "
Original file line number Diff line number Diff line change
1
+ # Exclude everything to allow this folder to be used for other service
2
+ # configurations.
3
+ *
4
+
5
+ # Specifically allow certain configuration files.
6
+ ! .gitignore
7
+ ! buildkitd.toml
8
+ ! compose.yaml
Original file line number Diff line number Diff line change
1
+ debug = true
2
+
3
+ [grpc ]
4
+ address = [ " tcp://0.0.0.0:1234" ]
5
+ debugAddress = " 0.0.0.0:6060"
Original file line number Diff line number Diff line change
1
+ name : buildkit
2
+ services :
3
+ buildkit :
4
+ container_name : buildkit-dev
5
+ build :
6
+ context : ../..
7
+ args :
8
+ BUILDKIT_DEBUG : 1
9
+ image : moby/buildkit:local
10
+ ports :
11
+ - 127.0.0.1:1234:1234
12
+ - 127.0.0.1:5000:5000
13
+ - 127.0.0.1:6060:6060
14
+ restart : always
15
+ privileged : true
16
+ environment :
17
+ DELVE_PORT : 5000
18
+ OTEL_EXPORTER_OTLP_TRACES_ENDPOINT : http://jaeger:4317
19
+ configs :
20
+ - source : buildkit_config
21
+ target : /etc/buildkit/buildkitd.toml
22
+ volumes :
23
+ - buildkit:/var/lib/buildkit
24
+
25
+ jaeger :
26
+ image : jaegertracing/all-in-one:latest
27
+ ports :
28
+ - 127.0.0.1:16686:16686
29
+
30
+ volumes :
31
+ buildkit :
32
+
33
+ configs :
34
+ buildkit_config :
35
+ file : ./buildkitd.toml
You can’t perform that action at this time.
0 commit comments