-
Notifications
You must be signed in to change notification settings - Fork 203
Description
Hi, everyone!
I got the following problem. There are two machines, PC and laptop, and both are used to build Docker images. The machines are nearly identical in terms of hardware [graphics card is different, that's it most likely] and are even more similar in terms of software. Both are with Ubuntu 20.04, regularly upgraded, the same apt list --installed output, etc.
Here is my unit_tests json file with settings:
{
"schemaVersion": "2.0.0",
"metadataTest": {
"user": "11042",
"workdir": "/work",
"entrypoint": [
"/sbin/tini",
"--"
],
"cmd": [
"bash"
],
"env": [
{
"key": "USERID",
"value": "11042"
}
]
},
"fileExistenceTests": [
{
"name": "Check starting script",
"path": "/usr/bin/start-container",
"uid": 11042,
"gid": 11042,
"permissions": "-rwxr-xr-x",
"shouldExist": true,
"isExecutableBy": "owner"
}
],
"commandTests": [
{
"name": "Check archiver",
"command": "which",
"args": [
"p7zip"
],
"expectedOutput": [
"/usr/bin/p7zip"
]
}
]
}
No tabs, only spaces, tabulation is correct.
To test the container structure, I perform container-structure-test test --image aab11964e491 --config /tmp/unit_tests.json, where aab11964e491 is the Docker image ID. All tests are passed successfully on PC, but on laptop they fail:
========================================
====== Test file: unit_tests.json ======
========================================
=== RUN: Check archiver
--- FAIL
duration: 0s
Error: error setting env vars: Error creating container: no such image
=== RUN: Check starting script
--- FAIL
duration: 0s
Error: error setting env vars: Error creating container: no such image
=== RUN: Metadata Test
--- FAIL
duration: 0s
Error: Error retrieving image config: Error when inspecting image: no such image
=========================================
================ RESULTS ================
=========================================
Passes: 0
Failures: 3
Duration: 0s
Total tests: 3
FAIL
FATA[0000] FAIL
What could be the problem?
I tried versions 1.14.0 and 1.15.0 of the tool. The same result.
Thanks!