Skip to content

Commit

Permalink
Use unix socket for buildkitd connection
Browse files Browse the repository at this point in the history
  • Loading branch information
motoki317 committed Apr 3, 2024
1 parent 8cf2dfa commit 6456cc9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .local-dev/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/buildkitd-sock
/dind
# needs uid 472 gid 472
/grafana
Expand Down
2 changes: 1 addition & 1 deletion .local-dev/config/ns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ image:
components:
builder:
buildkit:
address: tcp://buildkitd:1234
address: unix:///run/buildkit/buildkitd.sock
buildpack:
helper:
address: http://buildpack:1235
Expand Down
8 changes: 7 additions & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ services:
- ./.local-dev/config/ns.yaml:/config.yaml
- ./.local-dev/keys:/keys
- ./.local-dev/local-storage:/data
- ./.local-dev/buildkitd-sock:/run/buildkit
- ~/.ssh/known_hosts:/root/.ssh/known_hosts
depends_on:
mysql:
Expand Down Expand Up @@ -178,11 +179,16 @@ services:
image: moby/buildkit:latest
restart: always
privileged: true
command: --addr tcp://0.0.0.0:1234
command: --addr unix:///run/buildkit/buildkitd.sock
volumes:
- ./.local-dev/buildkitd-sock:/run/buildkit
- ./.local-dev/buildkitd/buildkitd.toml:/etc/buildkit/buildkitd.toml
networks:
- default
deploy:
resources:
limits:
cpus: "1"

static-server:
image: caddy:2-alpine
Expand Down

0 comments on commit 6456cc9

Please sign in to comment.