Browse code

frozen images: update to debian:bookworm-slim

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2023/06/22 23:04:26
Showing 11 changed files
... ...
@@ -130,7 +130,7 @@ ARG TARGETVARIANT
130 130
 RUN /download-frozen-image-v2.sh /build \
131 131
         busybox:latest@sha256:95cf004f559831017cdf4628aaf1bb30133677be8702a8c5f2994629f637a209 \
132 132
         busybox:glibc@sha256:1f81263701cddf6402afe9f33fca0266d9fff379e59b1748f33d3072da71ee85 \
133
-        debian:bullseye-slim@sha256:dacf278785a4daa9de07596ec739dbc07131e189942772210709c5c0777e8437 \
133
+        debian:bookworm-slim@sha256:2bc5c236e9b262645a323e9088dfa3bb1ecb16cc75811daf40a23a824d665be9 \
134 134
         hello-world:latest@sha256:d58e752213a51785838f9eed2b7a498ffa1cb3aa7f946dda11af39286c3db9a9 \
135 135
         arm32v7/hello-world:latest@sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1
136 136
 
... ...
@@ -1,7 +1,7 @@
1 1
 ## Generate `event_messages.bin`
2 2
 
3 3
 ```console
4
-$ docker run --rm -it -v "$(pwd):/winresources" debian:bullseye bash
4
+$ docker run --rm -it -v "$(pwd):/winresources" debian:bookworm-slim bash
5 5
 root@9ad2260f6ebc:/# apt-get update -y && apt-get install -y binutils-mingw-w64-x86-64
6 6
 root@9ad2260f6ebc:/# x86_64-w64-mingw32-windmc -v /winresources/event_messages.mc
7 7
 root@9ad2260f6ebc:/# mv MSG00001.bin /winresources/event_messages.bin
... ...
@@ -1,4 +1,4 @@
1
-FROM debian:bullseye-slim
1
+FROM debian:bookworm-slim
2 2
 RUN apt-get update && apt-get install -y gcc libc6-dev --no-install-recommends
3 3
 
4 4
 COPY . /usr/src/
... ...
@@ -1,4 +1,4 @@
1
-FROM debian:bullseye-slim
1
+FROM debian:bookworm-slim
2 2
 RUN apt-get update && apt-get install -y gcc libc6-dev --no-install-recommends
3 3
 
4 4
 COPY . /usr/src/
... ...
@@ -1674,7 +1674,7 @@ func (s *DockerDaemonSuite) TestDaemonNoSpaceLeftOnDeviceError(c *testing.T) {
1674 1674
 	defer s.d.Stop(c)
1675 1675
 
1676 1676
 	// pull a repository large enough to overfill the mounted filesystem
1677
-	pullOut, err := s.d.Cmd("pull", "debian:bullseye-slim")
1677
+	pullOut, err := s.d.Cmd("pull", "debian:bookworm-slim")
1678 1678
 	assert.Check(c, err != nil)
1679 1679
 	assert.Check(c, is.Contains(pullOut, "no space left on device"))
1680 1680
 }
... ...
@@ -1580,7 +1580,7 @@ func (s *DockerCLINetworkSuite) TestEmbeddedDNSInvalidInput(c *testing.T) {
1580 1580
 	cli.DockerCmd(c, "network", "create", "-d", "bridge", "nw1")
1581 1581
 
1582 1582
 	// Sending garbage to embedded DNS shouldn't crash the daemon
1583
-	cli.DockerCmd(c, "run", "-i", "--net=nw1", "--name=c1", "debian:bullseye-slim", "bash", "-c", "echo InvalidQuery > /dev/udp/127.0.0.11/53")
1583
+	cli.DockerCmd(c, "run", "-i", "--net=nw1", "--name=c1", "debian:bookworm-slim", "bash", "-c", "echo InvalidQuery > /dev/udp/127.0.0.11/53")
1584 1584
 }
1585 1585
 
1586 1586
 func (s *DockerCLINetworkSuite) TestDockerNetworkConnectFailsNoInspectChange(c *testing.T) {
... ...
@@ -2895,7 +2895,7 @@ func (s *DockerCLIRunSuite) TestRunUnshareProc(c *testing.T) {
2895 2895
 
2896 2896
 	go func() {
2897 2897
 		name := "acidburn"
2898
-		out, _, err := dockerCmdWithError("run", "--name", name, "--security-opt", "seccomp=unconfined", "debian:bullseye-slim", "unshare", "-p", "-m", "-f", "-r", "--mount-proc=/proc", "mount")
2898
+		out, _, err := dockerCmdWithError("run", "--name", name, "--security-opt", "seccomp=unconfined", "debian:bookworm-slim", "unshare", "-p", "-m", "-f", "-r", "--mount-proc=/proc", "mount")
2899 2899
 		if err == nil ||
2900 2900
 			!(strings.Contains(strings.ToLower(out), "permission denied") ||
2901 2901
 				strings.Contains(strings.ToLower(out), "operation not permitted")) {
... ...
@@ -2907,7 +2907,7 @@ func (s *DockerCLIRunSuite) TestRunUnshareProc(c *testing.T) {
2907 2907
 
2908 2908
 	go func() {
2909 2909
 		name := "cereal"
2910
-		out, _, err := dockerCmdWithError("run", "--name", name, "--security-opt", "seccomp=unconfined", "debian:bullseye-slim", "unshare", "-p", "-m", "-f", "-r", "mount", "-t", "proc", "none", "/proc")
2910
+		out, _, err := dockerCmdWithError("run", "--name", name, "--security-opt", "seccomp=unconfined", "debian:bookworm-slim", "unshare", "-p", "-m", "-f", "-r", "mount", "-t", "proc", "none", "/proc")
2911 2911
 		if err == nil ||
2912 2912
 			!(strings.Contains(strings.ToLower(out), "mount: cannot mount none") ||
2913 2913
 				strings.Contains(strings.ToLower(out), "permission denied") ||
... ...
@@ -2921,7 +2921,7 @@ func (s *DockerCLIRunSuite) TestRunUnshareProc(c *testing.T) {
2921 2921
 	/* Ensure still fails if running privileged with the default policy */
2922 2922
 	go func() {
2923 2923
 		name := "crashoverride"
2924
-		out, _, err := dockerCmdWithError("run", "--privileged", "--security-opt", "seccomp=unconfined", "--security-opt", "apparmor=docker-default", "--name", name, "debian:bullseye-slim", "unshare", "-p", "-m", "-f", "-r", "mount", "-t", "proc", "none", "/proc")
2924
+		out, _, err := dockerCmdWithError("run", "--privileged", "--security-opt", "seccomp=unconfined", "--security-opt", "apparmor=docker-default", "--name", name, "debian:bookworm-slim", "unshare", "-p", "-m", "-f", "-r", "mount", "-t", "proc", "none", "/proc")
2925 2925
 		if err == nil ||
2926 2926
 			!(strings.Contains(strings.ToLower(out), "mount: cannot mount none") ||
2927 2927
 				strings.Contains(strings.ToLower(out), "permission denied") ||
... ...
@@ -846,12 +846,12 @@ func (s *DockerCLIRunSuite) TestRunTmpfsMountsWithOptions(c *testing.T) {
846 846
 		assert.Assert(c, strings.Contains(out, option))
847 847
 	}
848 848
 
849
-	// We use debian:bullseye-slim as there is no findmnt in busybox. Also the output will be in the format of
849
+	// We use debian:bookworm-slim as there is no findmnt in busybox. Also the output will be in the format of
850 850
 	// TARGET PROPAGATION
851 851
 	// /tmp   shared
852 852
 	// so we only capture `shared` here.
853 853
 	expectedOptions = []string{"shared"}
854
-	out = cli.DockerCmd(c, "run", "--tmpfs", "/tmp:shared", "debian:bullseye-slim", "findmnt", "-o", "TARGET,PROPAGATION", "/tmp").Combined()
854
+	out = cli.DockerCmd(c, "run", "--tmpfs", "/tmp:shared", "debian:bookworm-slim", "findmnt", "-o", "TARGET,PROPAGATION", "/tmp").Combined()
855 855
 	for _, option := range expectedOptions {
856 856
 		assert.Assert(c, strings.Contains(out, option))
857 857
 	}
... ...
@@ -887,7 +887,7 @@ func (s *DockerCLIRunSuite) TestRunSysctls(c *testing.T) {
887 887
 	})
888 888
 }
889 889
 
890
-// TestRunSeccompProfileDenyUnshare checks that 'docker run --security-opt seccomp=/tmp/profile.json debian:bullseye-slim unshare' exits with operation not permitted.
890
+// TestRunSeccompProfileDenyUnshare checks that 'docker run --security-opt seccomp=/tmp/profile.json debian:bookworm-slim unshare' exits with operation not permitted.
891 891
 func (s *DockerCLIRunSuite) TestRunSeccompProfileDenyUnshare(c *testing.T) {
892 892
 	testRequires(c, testEnv.IsLocalDaemon, seccompEnabled, Apparmor)
893 893
 	const jsonData = `{
... ...
@@ -910,7 +910,7 @@ func (s *DockerCLIRunSuite) TestRunSeccompProfileDenyUnshare(c *testing.T) {
910 910
 	}
911 911
 	icmd.RunCommand(dockerBinary, "run", "--security-opt", "apparmor=unconfined",
912 912
 		"--security-opt", "seccomp="+tmpFile.Name(),
913
-		"debian:bullseye-slim", "unshare", "-p", "-m", "-f", "-r", "mount", "-t", "proc", "none", "/proc").Assert(c, icmd.Expected{
913
+		"debian:bookworm-slim", "unshare", "-p", "-m", "-f", "-r", "mount", "-t", "proc", "none", "/proc").Assert(c, icmd.Expected{
914 914
 		ExitCode: 1,
915 915
 		Err:      "Operation not permitted",
916 916
 	})
... ...
@@ -950,7 +950,7 @@ func (s *DockerCLIRunSuite) TestRunSeccompProfileDenyChmod(c *testing.T) {
950 950
 	})
951 951
 }
952 952
 
953
-// TestRunSeccompProfileDenyUnshareUserns checks that 'docker run debian:bullseye-slim unshare --map-root-user --user sh -c whoami' with a specific profile to
953
+// TestRunSeccompProfileDenyUnshareUserns checks that 'docker run debian:bookworm-slim unshare --map-root-user --user sh -c whoami' with a specific profile to
954 954
 // deny unshare of a userns exits with operation not permitted.
955 955
 func (s *DockerCLIRunSuite) TestRunSeccompProfileDenyUnshareUserns(c *testing.T) {
956 956
 	testRequires(c, testEnv.IsLocalDaemon, seccompEnabled, Apparmor)
... ...
@@ -982,7 +982,7 @@ func (s *DockerCLIRunSuite) TestRunSeccompProfileDenyUnshareUserns(c *testing.T)
982 982
 	}
983 983
 	icmd.RunCommand(dockerBinary, "run",
984 984
 		"--security-opt", "apparmor=unconfined", "--security-opt", "seccomp="+tmpFile.Name(),
985
-		"debian:bullseye-slim", "unshare", "--map-root-user", "--user", "sh", "-c", "whoami").Assert(c, icmd.Expected{
985
+		"debian:bookworm-slim", "unshare", "--map-root-user", "--user", "sh", "-c", "whoami").Assert(c, icmd.Expected{
986 986
 		ExitCode: 1,
987 987
 		Err:      "Operation not permitted",
988 988
 	})
... ...
@@ -1034,12 +1034,12 @@ func (s *DockerCLIRunSuite) TestRunSeccompProfileAllow32Bit(c *testing.T) {
1034 1034
 	icmd.RunCommand(dockerBinary, "run", "syscall-test", "exit32-test").Assert(c, icmd.Success)
1035 1035
 }
1036 1036
 
1037
-// TestRunSeccompAllowSetrlimit checks that 'docker run debian:bullseye-slim ulimit -v 1048510' succeeds.
1037
+// TestRunSeccompAllowSetrlimit checks that 'docker run debian:bookworm-slim ulimit -v 1048510' succeeds.
1038 1038
 func (s *DockerCLIRunSuite) TestRunSeccompAllowSetrlimit(c *testing.T) {
1039 1039
 	testRequires(c, testEnv.IsLocalDaemon, seccompEnabled)
1040 1040
 
1041 1041
 	// ulimit uses setrlimit, so we want to make sure we don't break it
1042
-	icmd.RunCommand(dockerBinary, "run", "debian:bullseye-slim", "bash", "-c", "ulimit -v 1048510").Assert(c, icmd.Success)
1042
+	icmd.RunCommand(dockerBinary, "run", "debian:bookworm-slim", "bash", "-c", "ulimit -v 1048510").Assert(c, icmd.Success)
1043 1043
 }
1044 1044
 
1045 1045
 func (s *DockerCLIRunSuite) TestRunSeccompDefaultProfileAcct(c *testing.T) {
... ...
@@ -1335,7 +1335,7 @@ func (s *DockerCLIRunSuite) TestRunApparmorProcDirectory(c *testing.T) {
1335 1335
 func (s *DockerCLIRunSuite) TestRunSeccompWithDefaultProfile(c *testing.T) {
1336 1336
 	testRequires(c, testEnv.IsLocalDaemon, seccompEnabled)
1337 1337
 
1338
-	out, _, err := dockerCmdWithError("run", "--security-opt", "seccomp=../profiles/seccomp/default.json", "debian:bullseye-slim", "unshare", "--map-root-user", "--user", "sh", "-c", "whoami")
1338
+	out, _, err := dockerCmdWithError("run", "--security-opt", "seccomp=../profiles/seccomp/default.json", "debian:bookworm-slim", "unshare", "--map-root-user", "--user", "sh", "-c", "whoami")
1339 1339
 	assert.ErrorContains(c, err, "", out)
1340 1340
 	assert.Equal(c, strings.TrimSpace(out), "unshare: unshare failed: Operation not permitted")
1341 1341
 }
... ...
@@ -50,7 +50,7 @@ func ensureSyscallTest(ctx context.Context, c *testing.T) {
50 50
 
51 51
 	dockerFile := filepath.Join(tmp, "Dockerfile")
52 52
 	content := []byte(`
53
-	FROM debian:bullseye-slim
53
+	FROM debian:bookworm-slim
54 54
 	COPY . /usr/bin/
55 55
 	`)
56 56
 	err = os.WriteFile(dockerFile, content, 0o600)
... ...
@@ -66,7 +66,7 @@ func ensureSyscallTest(ctx context.Context, c *testing.T) {
66 66
 }
67 67
 
68 68
 func ensureSyscallTestBuild(ctx context.Context, c *testing.T) {
69
-	err := load.FrozenImagesLinux(ctx, testEnv.APIClient(), "debian:bullseye-slim")
69
+	err := load.FrozenImagesLinux(ctx, testEnv.APIClient(), "debian:bookworm-slim")
70 70
 	assert.NilError(c, err)
71 71
 
72 72
 	var buildArgs []string
... ...
@@ -104,7 +104,7 @@ func ensureNNPTest(ctx context.Context, c *testing.T) {
104 104
 
105 105
 	dockerfile := filepath.Join(tmp, "Dockerfile")
106 106
 	content := `
107
-	FROM debian:bullseye-slim
107
+	FROM debian:bookworm-slim
108 108
 	COPY . /usr/bin
109 109
 	RUN chmod +s /usr/bin/nnp-test
110 110
 	`
... ...
@@ -121,7 +121,7 @@ func ensureNNPTest(ctx context.Context, c *testing.T) {
121 121
 }
122 122
 
123 123
 func ensureNNPTestBuild(ctx context.Context, c *testing.T) {
124
-	err := load.FrozenImagesLinux(ctx, testEnv.APIClient(), "debian:bullseye-slim")
124
+	err := load.FrozenImagesLinux(ctx, testEnv.APIClient(), "debian:bookworm-slim")
125 125
 	assert.NilError(c, err)
126 126
 
127 127
 	var buildArgs []string
... ...
@@ -44,7 +44,7 @@ func TestBuildUserNamespaceValidateCapabilitiesAreV2(t *testing.T) {
44 44
 	clientUserRemap := dUserRemap.NewClientT(t)
45 45
 	defer clientUserRemap.Close()
46 46
 
47
-	err = load.FrozenImagesLinux(ctx, clientUserRemap, "debian:bullseye-slim")
47
+	err = load.FrozenImagesLinux(ctx, clientUserRemap, "debian:bookworm-slim")
48 48
 	assert.NilError(t, err)
49 49
 
50 50
 	dUserRemapRunning := true
... ...
@@ -56,7 +56,7 @@ func TestBuildUserNamespaceValidateCapabilitiesAreV2(t *testing.T) {
56 56
 	}()
57 57
 
58 58
 	dockerfile := `
59
-		FROM debian:bullseye-slim
59
+		FROM debian:bookworm-slim
60 60
 		RUN apt-get update && apt-get install -y libcap2-bin --no-install-recommends
61 61
 		RUN setcap CAP_NET_BIND_SERVICE=+eip /bin/sleep
62 62
 	`
... ...
@@ -14,7 +14,7 @@ import (
14 14
 	"gotest.tools/v3/assert"
15 15
 )
16 16
 
17
-var frozenImages = []string{"busybox:latest", "busybox:glibc", "hello-world:frozen", "debian:bullseye-slim"}
17
+var frozenImages = []string{"busybox:latest", "busybox:glibc", "hello-world:frozen", "debian:bookworm-slim"}
18 18
 
19 19
 type protectedElements struct {
20 20
 	containers map[string]struct{}