Skip to content

Commit 5f004d2

Browse files
committed
Workaround and document weird docker issue
Signed-off-by: apostasie <[email protected]>
1 parent 9b1cf67 commit 5f004d2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/nerdctl/container/container_commit_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ func TestCommit(t *testing.T) {
3636
helpers.Anyhow("rmi", "-f", data.Identifier())
3737
},
3838
Setup: func(data test.Data, helpers test.Helpers) {
39+
// FIXME: short of pulling first, docker will fail to start the container.
40+
// Debugging shows container exited immediately. Nothing in the container logs. Not much in journalctl.
41+
// It is not clear what is happening.
42+
helpers.Ensure("pull", testutil.CommonImage)
3943
helpers.Ensure("run", "-d", "--name", data.Identifier(), testutil.CommonImage, "sleep", "infinity")
4044
nerdtest.EnsureContainerStarted(helpers, data.Identifier())
4145
helpers.Ensure("exec", data.Identifier(), "sh", "-euxc", `echo hello-test-commit > /foo`)
@@ -59,6 +63,8 @@ func TestCommit(t *testing.T) {
5963
helpers.Anyhow("rmi", "-f", data.Identifier())
6064
},
6165
Setup: func(data test.Data, helpers test.Helpers) {
66+
// See note above about docker failing.
67+
helpers.Ensure("pull", testutil.CommonImage)
6268
helpers.Ensure("run", "-d", "--name", data.Identifier(), testutil.CommonImage, "sleep", "infinity")
6369
nerdtest.EnsureContainerStarted(helpers, data.Identifier())
6470
helpers.Ensure("exec", data.Identifier(), "sh", "-euxc", `echo hello-test-commit > /foo`)

0 commit comments

Comments
 (0)