Skip to content

Commit 24a37b0

Browse files
committed
feat: implement support for network mode
Breaking: new default network mode is `none` for any RUN steps. Fixes #184 Signed-off-by: Andrey Smirnov <[email protected]>
1 parent 40ad501 commit 24a37b0

File tree

14 files changed

+211
-110
lines changed

14 files changed

+211
-110
lines changed

.github/renovate.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@
3030
"pin",
3131
"digest"
3232
]
33+
},
34+
{
35+
"enabled": false,
36+
"matchFileNames": [
37+
"Dockerfile"
38+
]
39+
},
40+
{
41+
"enabled": false,
42+
"matchFileNames": [
43+
".github/workflows/*.yaml"
44+
]
3345
}
3446
],
3547
"separateMajorMinor": false

.golangci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2024-12-18T18:57:15Z by kres fcff05e.
3+
# Generated on 2025-01-29T09:45:00Z by kres 987bf4d.
44

55
# options for analysis running
66
run:
@@ -17,7 +17,6 @@ output:
1717
path: stdout
1818
print-issued-lines: true
1919
print-linter-name: true
20-
uniq-by-line: true
2120
path-prefix: ""
2221

2322
# all available settings of specific linters
@@ -144,6 +143,7 @@ issues:
144143
max-issues-per-linter: 10
145144
max-same-issues: 3
146145
new: false
146+
uniq-by-line: true
147147

148148
severity:
149149
default-severity: error

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
44
#
5-
# Generated on 2024-12-18T18:57:15Z by kres fcff05e.
5+
# Generated on 2025-01-29T09:45:00Z by kres 987bf4d.
66

77
ARG TOOLCHAIN
88

@@ -11,7 +11,7 @@ FROM ghcr.io/siderolabs/ca-certificates:v1.9.0 AS image-ca-certificates
1111
FROM ghcr.io/siderolabs/fhs:v1.9.0 AS image-fhs
1212

1313
# runs markdownlint
14-
FROM docker.io/oven/bun:1.1.40-alpine AS lint-markdown
14+
FROM docker.io/oven/bun:1.1.43-alpine AS lint-markdown
1515
WORKDIR /src
1616
1717
COPY .markdownlint.json .

Makefile

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2024-12-18T18:57:15Z by kres fcff05e.
3+
# Generated on 2025-01-29T09:45:00Z by kres 987bf4d.
44

55
# common variables
66

@@ -17,15 +17,15 @@ WITH_RACE ?= false
1717
REGISTRY ?= ghcr.io
1818
USERNAME ?= siderolabs
1919
REGISTRY_AND_USERNAME ?= $(REGISTRY)/$(USERNAME)
20-
PROTOBUF_GO_VERSION ?= 1.36.0
20+
PROTOBUF_GO_VERSION ?= 1.36.2
2121
GRPC_GO_VERSION ?= 1.5.1
22-
GRPC_GATEWAY_VERSION ?= 2.24.0
22+
GRPC_GATEWAY_VERSION ?= 2.25.1
2323
VTPROTOBUF_VERSION ?= 0.6.0
24-
GOIMPORTS_VERSION ?= 0.28.0
24+
GOIMPORTS_VERSION ?= 0.29.0
2525
DEEPCOPY_VERSION ?= v0.5.6
26-
GOLANGCILINT_VERSION ?= v1.62.2
26+
GOLANGCILINT_VERSION ?= v1.63.4
2727
GOFUMPT_VERSION ?= v0.7.0
28-
GO_VERSION ?= 1.23.4
28+
GO_VERSION ?= 1.23.5
2929
GO_BUILDFLAGS ?=
3030
GO_LDFLAGS ?=
3131
CGO_ENABLED ?= 0
@@ -41,13 +41,13 @@ PLATFORM ?= linux/amd64
4141
PROGRESS ?= auto
4242
PUSH ?= false
4343
CI_ARGS ?=
44-
BUILDKIT_MULTI_PLATFORM ?= 1
44+
BUILDKIT_MULTI_PLATFORM ?=
4545
COMMON_ARGS = --file=Dockerfile
4646
COMMON_ARGS += --provenance=false
4747
COMMON_ARGS += --progress=$(PROGRESS)
4848
COMMON_ARGS += --platform=$(PLATFORM)
49-
COMMON_ARGS += --push=$(PUSH)
5049
COMMON_ARGS += --build-arg=BUILDKIT_MULTI_PLATFORM=$(BUILDKIT_MULTI_PLATFORM)
50+
COMMON_ARGS += --push=$(PUSH)
5151
COMMON_ARGS += --build-arg=ARTIFACTS="$(ARTIFACTS)"
5252
COMMON_ARGS += --build-arg=SHA="$(SHA)"
5353
COMMON_ARGS += --build-arg=TAG="$(TAG)"
@@ -149,20 +149,23 @@ clean: ## Cleans up all artifacts.
149149
target-%: ## Builds the specified target defined in the Dockerfile. The build result will only remain in the build cache.
150150
@$(BUILD) --target=$* $(COMMON_ARGS) $(TARGET_ARGS) $(CI_ARGS) .
151151

152+
registry-%: ## Builds the specified target defined in the Dockerfile and the output is an image. The image is pushed to the registry if PUSH=true.
153+
@$(MAKE) target-$* TARGET_ARGS="--tag=$(REGISTRY)/$(USERNAME)/$(IMAGE_NAME):$(IMAGE_TAG)" BUILDKIT_MULTI_PLATFORM=1
154+
152155
local-%: ## Builds the specified target defined in the Dockerfile using the local output type. The build result will be output to the specified local destination.
153156
@$(MAKE) target-$* TARGET_ARGS="--output=type=local,dest=$(DEST) $(TARGET_ARGS)"
154157
@PLATFORM=$(PLATFORM) DEST=$(DEST) bash -c '\
155158
for platform in $$(tr "," "\n" <<< "$$PLATFORM"); do \
156-
echo $$platform; \
157159
directory="$${platform//\//_}"; \
158160
if [[ -d "$$DEST/$$directory" ]]; then \
161+
echo $$platform; \
159162
mv -f "$$DEST/$$directory/"* $$DEST; \
160163
rmdir "$$DEST/$$directory/"; \
161164
fi; \
162165
done'
163166

164167
generate: ## Generate .proto definitions.
165-
@$(MAKE) local-$@ DEST=./ BUILDKIT_MULTI_PLATFORM=0
168+
@$(MAKE) local-$@ DEST=./
166169

167170
lint-golangci-lint: ## Runs golangci-lint linter.
168171
@$(MAKE) target-$@
@@ -233,7 +236,7 @@ lint: lint-golangci-lint lint-gofumpt lint-govulncheck lint-markdown ## Run all
233236

234237
.PHONY: image-bldr
235238
image-bldr: ## Builds image for bldr.
236-
@$(MAKE) target-$@ TARGET_ARGS="--tag=$(REGISTRY)/$(USERNAME)/bldr:$(IMAGE_TAG)"
239+
@$(MAKE) registry-$@ IMAGE_NAME="bldr"
237240

238241
.PHONY: integration.test
239242
integration.test:

go.mod

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,32 @@ go 1.23.4
55
require (
66
github.com/Masterminds/semver v1.5.0
77
github.com/Masterminds/sprig/v3 v3.3.0
8-
github.com/containerd/platforms v0.2.1
8+
github.com/containerd/platforms v1.0.0-rc.1
99
github.com/emicklei/dot v1.6.4
1010
github.com/google/go-github/v67 v67.0.0
1111
github.com/hashicorp/go-multierror v1.1.1
12-
github.com/moby/buildkit v0.18.2
12+
github.com/moby/buildkit v0.19.0
1313
github.com/moby/docker-image-spec v1.3.1
1414
github.com/opencontainers/go-digest v1.0.0
1515
github.com/opencontainers/image-spec v1.1.0
16-
github.com/otiai10/copy v1.14.0
16+
github.com/otiai10/copy v1.14.1
1717
github.com/siderolabs/gen v0.8.0
1818
github.com/spf13/cobra v1.8.1
1919
github.com/stretchr/testify v1.10.0
20-
golang.org/x/oauth2 v0.24.0
20+
golang.org/x/oauth2 v0.25.0
2121
golang.org/x/sync v0.10.0
2222
gopkg.in/yaml.v3 v3.0.1
2323
)
2424

2525
require (
2626
dario.cat/mergo v1.0.1 // indirect
27-
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
27+
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 // indirect
2828
github.com/Masterminds/goutils v1.1.1 // indirect
2929
github.com/Masterminds/semver/v3 v3.3.0 // indirect
30-
github.com/containerd/containerd v1.7.24 // indirect
31-
github.com/containerd/errdefs v0.3.0 // indirect
30+
github.com/containerd/containerd/v2 v2.0.2 // indirect
31+
github.com/containerd/errdefs v1.0.0 // indirect
3232
github.com/containerd/log v0.1.0 // indirect
33-
github.com/containerd/ttrpc v1.2.5 // indirect
33+
github.com/containerd/ttrpc v1.2.7 // indirect
3434
github.com/containerd/typeurl/v2 v2.2.3 // indirect
3535
github.com/davecgh/go-spew v1.1.1 // indirect
3636
github.com/distribution/reference v0.6.0 // indirect
@@ -51,6 +51,7 @@ require (
5151
github.com/mitchellh/reflectwalk v1.0.2 // indirect
5252
github.com/moby/locker v1.0.1 // indirect
5353
github.com/moby/sys/signal v0.7.1 // indirect
54+
github.com/otiai10/mint v1.6.3 // indirect
5455
github.com/pkg/errors v0.9.1 // indirect
5556
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
5657
github.com/pmezard/go-difflib v1.0.0 // indirect
@@ -60,20 +61,20 @@ require (
6061
github.com/sirupsen/logrus v1.9.3 // indirect
6162
github.com/spf13/cast v1.7.0 // indirect
6263
github.com/spf13/pflag v1.0.5 // indirect
63-
github.com/tonistiigi/fsutil v0.0.0-20241121093142-31cf1f437184 // indirect
64-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect
65-
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.46.1 // indirect
66-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
67-
go.opentelemetry.io/otel v1.28.0 // indirect
68-
go.opentelemetry.io/otel/metric v1.28.0 // indirect
69-
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
70-
go.opentelemetry.io/otel/trace v1.28.0 // indirect
71-
golang.org/x/crypto v0.27.0 // indirect
72-
golang.org/x/net v0.29.0 // indirect
73-
golang.org/x/sys v0.26.0 // indirect
74-
golang.org/x/text v0.18.0 // indirect
75-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
76-
google.golang.org/grpc v1.66.3 // indirect
77-
google.golang.org/protobuf v1.35.1 // indirect
64+
github.com/tonistiigi/fsutil v0.0.0-20250113203817-b14e27f4135a // indirect
65+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0 // indirect
66+
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.56.0 // indirect
67+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect
68+
go.opentelemetry.io/otel v1.31.0 // indirect
69+
go.opentelemetry.io/otel/metric v1.31.0 // indirect
70+
go.opentelemetry.io/otel/sdk v1.31.0 // indirect
71+
go.opentelemetry.io/otel/trace v1.31.0 // indirect
72+
golang.org/x/crypto v0.31.0 // indirect
73+
golang.org/x/net v0.33.0 // indirect
74+
golang.org/x/sys v0.28.0 // indirect
75+
golang.org/x/text v0.21.0 // indirect
76+
google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect
77+
google.golang.org/grpc v1.68.1 // indirect
78+
google.golang.org/protobuf v1.35.2 // indirect
7879
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
7980
)

0 commit comments

Comments
 (0)