Skip to content

Commit 33cc06f

Browse files
authored
Merge pull request #51394 from vvoland/51393-28.x
[28.x backport] Dockerfile: update runc binary to v1.3.3
2 parents 4489660 + bd98008 commit 33cc06f

5 files changed

Lines changed: 27 additions & 19 deletions

File tree

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,8 @@ WORKDIR /usr/src/runc
260260
RUN git init . && git remote add origin "https://github.com/opencontainers/runc.git"
261261
# RUNC_VERSION should match the version that is used by the containerd version
262262
# that is used. If you need to update runc, open a pull request in the containerd
263-
# project first, and update both after that is merged. When updating RUNC_VERSION,
264-
# consider updating runc in vendor.mod accordingly.
265-
ARG RUNC_VERSION=v1.3.0
263+
# project first, and update both after that is merged.
264+
ARG RUNC_VERSION=v1.3.3
266265
RUN git fetch -q --depth 1 origin "${RUNC_VERSION}" +refs/tags/*:refs/tags/* && git checkout -q FETCH_HEAD
267266

268267
FROM base AS runc-build

hack/dockerfile/install/runc.installer

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ set -e
77
# The version of runc should match the version that is used by the containerd
88
# version that is used. If you need to update runc, open a pull request in
99
# the containerd project first, and update both after that is merged.
10-
#
11-
# When updating RUNC_VERSION, consider updating runc in vendor.mod accordingly
12-
: "${RUNC_VERSION:=v1.3.0}"
10+
: "${RUNC_VERSION:=v1.3.3}"
1311

1412
install_runc() {
1513
RUNC_BUILDTAGS="${RUNC_BUILDTAGS:-"seccomp"}"

integration-cli/docker_cli_build_unix_test.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,18 @@ func (s *DockerCLIBuildSuite) TestBuildResourceConstraintsAreUsed(c *testing.T)
3333
RUN ["/hello"]
3434
`))
3535
cli.Docker(
36-
cli.Args("build", "--no-cache", "--rm=false", "--memory=64m", "--memory-swap=-1", "--cpuset-cpus=0", "--cpuset-mems=0", "--cpu-shares=100", "--cpu-quota=8000", "--ulimit", "nofile=42", "--label="+buildLabel, "-t", name, "."),
36+
cli.Args("build",
37+
"--no-cache",
38+
"--rm=false",
39+
"--memory=64m",
40+
"--memory-swap=-1",
41+
"--cpuset-cpus=0",
42+
"--cpuset-mems=0",
43+
"--cpu-shares=100",
44+
"--cpu-quota=8000",
45+
"--ulimit", "nofile=50",
46+
"--label="+buildLabel,
47+
"-t", name, "."),
3748
cli.InDir(ctx.Dir),
3849
).Assert(c, icmd.Success)
3950

@@ -63,7 +74,7 @@ func (s *DockerCLIBuildSuite) TestBuildResourceConstraintsAreUsed(c *testing.T)
6374
assert.Equal(c, c1.CPUShares, int64(100), "resource constraints not set properly for CPUShares")
6475
assert.Equal(c, c1.CPUQuota, int64(8000), "resource constraints not set properly for CPUQuota")
6576
assert.Equal(c, c1.Ulimits[0].Name, "nofile", "resource constraints not set properly for Ulimits")
66-
assert.Equal(c, c1.Ulimits[0].Hard, int64(42), "resource constraints not set properly for Ulimits")
77+
assert.Equal(c, c1.Ulimits[0].Hard, int64(50), "resource constraints not set properly for Ulimits")
6778

6879
// Make sure constraints aren't saved to image
6980
cli.DockerCmd(c, "run", "--name=test", name)

integration-cli/docker_cli_daemon_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ func deleteInterface(t *testing.T, ifName string) {
391391
}
392392

393393
func (s *DockerDaemonSuite) TestDaemonUlimitDefaults(c *testing.T) {
394-
s.d.StartWithBusybox(testutil.GetContext(c), c, "--default-ulimit", "nofile=42:42", "--default-ulimit", "nproc=1024:1024")
394+
s.d.StartWithBusybox(testutil.GetContext(c), c, "--default-ulimit", "nofile=50:50", "--default-ulimit", "nproc=1024:1024")
395395

396396
out, err := s.d.Cmd("run", "--ulimit", "nproc=2048", "--name=test", "busybox", "/bin/sh", "-c", "echo $(ulimit -n); echo $(ulimit -u)")
397397
if err != nil {
@@ -405,15 +405,15 @@ func (s *DockerDaemonSuite) TestDaemonUlimitDefaults(c *testing.T) {
405405
nofile := strings.TrimSpace(outArr[0])
406406
nproc := strings.TrimSpace(outArr[1])
407407

408-
if nofile != "42" {
409-
c.Fatalf("expected `ulimit -n` to be `42`, got: %s", nofile)
408+
if nofile != "50" {
409+
c.Fatalf("expected `ulimit -n` to be `50`, got: %s", nofile)
410410
}
411411
if nproc != "2048" {
412412
c.Fatalf("expected `ulimit -u` to be 2048, got: %s", nproc)
413413
}
414414

415415
// Now restart daemon with a new default
416-
s.d.Restart(c, "--default-ulimit", "nofile=43")
416+
s.d.Restart(c, "--default-ulimit", "nofile=50")
417417

418418
out, err = s.d.Cmd("start", "-a", "test")
419419
if err != nil {
@@ -427,8 +427,8 @@ func (s *DockerDaemonSuite) TestDaemonUlimitDefaults(c *testing.T) {
427427
nofile = strings.TrimSpace(outArr[0])
428428
nproc = strings.TrimSpace(outArr[1])
429429

430-
if nofile != "43" {
431-
c.Fatalf("expected `ulimit -n` to be `43`, got: %s", nofile)
430+
if nofile != "50" {
431+
c.Fatalf("expected `ulimit -n` to be `50`, got: %s", nofile)
432432
}
433433
if nproc != "2048" {
434434
c.Fatalf("expected `ulimit -u` to be 2048, got: %s", nproc)

integration-cli/docker_cli_run_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3099,10 +3099,10 @@ func (s *DockerCLIRunSuite) TestRunWithUlimits(c *testing.T) {
30993099
// Not applicable on Windows as uses Unix specific functionality
31003100
testRequires(c, DaemonIsLinux)
31013101

3102-
out := cli.DockerCmd(c, "run", "--name=testulimits", "--ulimit", "nofile=42", "busybox", "/bin/sh", "-c", "ulimit -n").Combined()
3102+
out := cli.DockerCmd(c, "run", "--name=testulimits", "--ulimit", "nofile=50", "busybox", "/bin/sh", "-c", "ulimit -n").Combined()
31033103
ul := strings.TrimSpace(out)
3104-
if ul != "42" {
3105-
c.Fatalf("expected `ulimit -n` to be 42, got %s", ul)
3104+
if ul != "50" {
3105+
c.Fatalf("expected `ulimit -n` to be 50, got %s", ul)
31063106
}
31073107
}
31083108

@@ -3924,13 +3924,13 @@ func (s *DockerDaemonSuite) TestRunWithUlimitAndDaemonDefault(c *testing.T) {
39243924
assert.NilError(c, err)
39253925
assert.Assert(c, is.Contains(out, "[nofile=65535:65535]"))
39263926
name = "test-B"
3927-
_, err = d.Cmd("run", "--name", name, "--ulimit=nofile=42", "-d", "busybox", "top")
3927+
_, err = d.Cmd("run", "--name", name, "--ulimit=nofile=50", "-d", "busybox", "top")
39283928
assert.NilError(c, err)
39293929
assert.NilError(c, d.WaitRun(name))
39303930

39313931
out, err = d.Cmd("inspect", "--format", "{{.HostConfig.Ulimits}}", name)
39323932
assert.NilError(c, err)
3933-
assert.Assert(c, is.Contains(out, "[nofile=42:42]"))
3933+
assert.Assert(c, is.Contains(out, "[nofile=50:50]"))
39343934
}
39353935

39363936
func (s *DockerCLIRunSuite) TestRunStoppedLoggingDriverNoLeak(c *testing.T) {

0 commit comments

Comments
 (0)