Enhancement: Curses-like printing for docker stats thanks to tcell
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Hi everyone.
I wrote some code to bring docker stats the ability to display stats in a curses-way.
I use tcell to do it.
To use the new feature you just need to run docker stats --tcell.
The code compiles and works since stats are displayed.
If a new container is launched while stats already run the new stats are added to display (like with classical display).
If the windows is resized the display adapts.
Unfortunately I saw multiple problem to this new enhancement:
-
I had to add 5 new packages in vendor (tcell, encoding, go-colorful, go-runewidth and encoding) to be able to use
tcell. -
Running
make -f docker.Makefile lintfailed with:
make: *** [docker.Makefile:110: lint] Error 1
cli/command/container/hijack.go:188:1:warning: nolint directive did not match any issue (nolint) cli/command/trust/signer_remove.go:79:1:warning: nolint directive did not match any issue (nolint)
- Running
make -f docker.Makefile test-unitfailed with:
DONE 1298 tests, 2 skipped, 1 failure in 10.956s
=== Skipped === SKIP: cli/command/container TestSplitCpArg/absolute_path_with_drive (0.00s) --- SKIP: TestSplitCpArg/absolute_path_with_drive (0.00s) cp_test.go:185: testcase.os != "" && testcase.os != runtime.GOOS
=== SKIP: cli/command/image TestNewHistoryCommandSuccess (0.00s)
history_test.go:52: notUTCTimezone: expected output requires UTC timezone
=== Failed
=== FAIL: cli/command/trust TestSignCommandLocalFlag (0.15s)
sign_test.go:307: assertion failed: expected error to contain "error contacting notary server: dial tcp: lookup reg-name.io", got "Error: error contacting notary server: remote error: tls: handshake failure"
- Running
make -f docker.Makefile test-ecefailed with:
DONE 85 tests, 3 skipped, 54 failures in 253.539s
=== Skipped === SKIP: e2e/cli-plugins TestCLIPluginDialStdio (0.00s) dial_test.go:16: skipping plugin dial-stdio test since DOCKER_CLI_PLUGIN_USE_DIAL_STDIO is not set
=== SKIP: e2e/stack TestDeployWithNamedResources/Kubernetes (0.00s)
--- SKIP: TestDeployWithNamedResources/Kubernetes (0.00s)
deploy_test.go:22: FIXME(chris-crone): currently does not work with compose for kubernetes.
=== SKIP: e2e/stack TestRemove/Kubernetes (0.00s)
--- SKIP: TestRemove/Kubernetes (0.00s)
remove_test.go:22: !environment.KubernetesEnabled()
=== Failed
=== FAIL: e2e/cli-plugins TestClashWithGlobalArgs/short-with-val (0.11s)
--- FAIL: TestClashWithGlobalArgs/short-with-val (0.11s)
flags_test.go:61: assertion failed:
Command: docker --config /tmp/plugin-test-164578201 helloworld -c Christmas
ExitCode: 0
Stdout: Merry Christmas!
Stderr: terminal entry not found
terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestClashWithGlobalArgs/short-with-val#01 (0.11s)
--- FAIL: TestClashWithGlobalArgs/short-with-val#01 (0.11s)
flags_test.go:61: assertion failed:
Command: docker --config /tmp/plugin-test-164578201 helloworld --context Christmas
ExitCode: 0
Stdout: Merry Christmas!
Stderr: terminal entry not found
terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestClashWithGlobalArgs (0.35s)
=== FAIL: e2e/cli-plugins TestGlobalArgsOnlyParsedOnce/builtin (0.08s)
--- FAIL: TestGlobalArgsOnlyParsedOnce/builtin (0.08s)
flags_test.go:115: assertion failed:
Command: docker --config /tmp/plugin-test-479383588 -H tcp://172.18.0.5:2375 version -f {{.Client.Version}}
ExitCode: 0
Stdout: 19.09.0-dev
Stderr: terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestGlobalArgsOnlyParsedOnce/plugin (0.10s)
--- FAIL: TestGlobalArgsOnlyParsedOnce/plugin (0.10s)
flags_test.go:115: assertion failed:
Command: docker --config /tmp/plugin-test-479383588 -H tcp://172.18.0.5:2375 helloworld apiversion
ExitCode: 0
Stdout: 1.40
Stderr: terminal entry not found
terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestGlobalArgsOnlyParsedOnce (0.24s)
=== FAIL: e2e/cli-plugins TestCliPluginsVersion/global-version (0.04s)
--- FAIL: TestCliPluginsVersion/global-version (0.04s)
flags_test.go:250: assertion failed:
Command: docker --config /tmp/plugin-test-568294646 version
ExitCode: 0
Stdout: Client:
Version: 19.09.0-dev
API version: 1.40
Go version: go1.12.7
Git commit:
Built: Tue Aug 6 17:40:44 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.1
API version: 1.40 (minimum version 1.12)
Go version: go1.12.5
Git commit: 74b1e89e8a
Built: Thu Jul 25 21:27:55 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.2.6
GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc:
Version: 1.0.0-rc8
GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f
docker-init:
Version: 0.18.0
GitCommit: fec3683
Stderr: terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestCliPluginsVersion/global-version-flag (0.04s)
--- FAIL: TestCliPluginsVersion/global-version-flag (0.04s)
flags_test.go:250: assertion failed:
Command: docker --config /tmp/plugin-test-568294646 --version
ExitCode: 0
Stdout: Docker version 19.09.0-dev, build
Stderr: terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestCliPluginsVersion/global-short-version-flag (0.03s)
--- FAIL: TestCliPluginsVersion/global-short-version-flag (0.03s)
flags_test.go:250: assertion failed:
Command: docker --config /tmp/plugin-test-568294646 -v
ExitCode: 0
Stdout: Docker version 19.09.0-dev, build
Stderr: terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestCliPluginsVersion/global-version-flag-with-unknown-arg (0.03s)
--- FAIL: TestCliPluginsVersion/global-version-flag-with-unknown-arg (0.03s)
flags_test.go:250: assertion failed:
Command: docker --config /tmp/plugin-test-568294646 --version foo
ExitCode: 0
Stdout: Docker version 19.09.0-dev, build
Stderr: terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestCliPluginsVersion/global-short-version-flag-with-unknown-arg (0.03s)
--- FAIL: TestCliPluginsVersion/global-short-version-flag-with-unknown-arg (0.03s)
flags_test.go:250: assertion failed:
Command: docker --config /tmp/plugin-test-568294646 -v foo
ExitCode: 0
Stdout: Docker version 19.09.0-dev, build
Stderr: terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestCliPluginsVersion/plugin-with-version (0.06s)
--- FAIL: TestCliPluginsVersion/plugin-with-version (0.06s)
flags_test.go:250: assertion failed:
Command: docker --config /tmp/plugin-test-568294646 helloworld version
ExitCode: 0
Stdout: Hello World!
Stderr: terminal entry not found
terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestCliPluginsVersion (0.58s)
=== FAIL: e2e/cli-plugins TestGlobalHelp (0.07s)
help_test.go:23: assertion failed:
--- ←
+++ →
@@ -1,2 +1 @@
-terminal entry not found
=== FAIL: e2e/cli-plugins TestRunNonexisting (0.06s)
run_test.go:24: assertion failed:
--- expected
+++ actual
@@ -1,2 +1,3 @@
+terminal entry not found
docker: 'nonexistent' is not a docker command.
See 'docker --help'
=== FAIL: e2e/cli-plugins TestHelpNonexisting (0.02s)
run_test.go:37: assertion failed:
--- expected
+++ actual
@@ -1,2 +1,3 @@
+terminal entry not found
unknown help topic: nonexistent
=== FAIL: e2e/cli-plugins TestNonexistingHelp (0.05s)
run_test.go:47: assertion failed:
Command: docker --config /tmp/plugin-test-117648010 nonexistent --help
ExitCode: 0
Stdout:
Usage: docker [OPTIONS] COMMAND
A self-sufficient runtime for containers
Options:
--config string Location of client config files (default
"/root/.docker")
-c, --context string Name of the context to use to connect to the
daemon (overrides DOCKER_HOST env var and
default context set with "docker context use")
-D, --debug Enable debug mode
-H, --host list Daemon socket(s) to connect to
-l, --log-level string Set the logging level
("debug"|"info"|"warn"|"error"|"fatal")
(default "info")
--tls Use TLS; implied by --tlsverify
--tlscacert string Trust certs signed only by this CA (default
"/root/.docker/ca.pem")
--tlscert string Path to TLS certificate file (default
"/root/.docker/cert.pem")
--tlskey string Path to TLS key file (default
"/root/.docker/key.pem")
--tlsverify Use TLS and verify the remote
-v, --version Print version information and quit
Management Commands:
builder Manage builds
config Manage Docker configs
container Manage containers
context Manage contexts
engine Manage the docker engine
helloworld* A basic Hello World plugin for tests (Docker Inc., testing)
image Manage images
network Manage networks
node Manage Swarm nodes
nopersistentprerun*Testing without PersistentPreRun hooks (Docker Inc., testing)
plugin Manage plugins
secret Manage Docker secrets
service Manage services
stack Manage Docker stacks
swarm Manage Swarm
system Manage Docker
trust Manage trust on Docker images
volume Manage volumes
Commands:
attach Attach local standard input, output, and error streams to a running container
build Build an image from a Dockerfile
commit Create a new image from a container's changes
cp Copy files/folders between a container and the local filesystem
create Create a new container
diff Inspect changes to files or directories on a container's filesystem
events Get real time events from the server
exec Run a command in a running container
export Export a container's filesystem as a tar archive
history Show the history of an image
images List images
import Import the contents from a tarball to create a filesystem image
info Display system-wide information
inspect Return low-level information on Docker objects
kill Kill one or more running containers
load Load an image from a tar archive or STDIN
login Log in to a Docker registry
logout Log out from a Docker registry
logs Fetch the logs of a container
pause Pause all processes within one or more containers
port List port mappings or a specific mapping for the container
ps List containers
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
rename Rename a container
restart Restart one or more containers
rm Remove one or more containers
rmi Remove one or more images
run Run a command in a new container
save Save one or more images to a tar archive (streamed to STDOUT by default)
search Search the Docker Hub for images
start Start one or more stopped containers
stats Display a live stream of container(s) resource usage statistics
stop Stop one or more running containers
tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
top Display the running processes of a container
unpause Unpause all processes within one or more containers
update Update configuration of one or more containers
version Show the Docker version information
wait Block until one or more containers stop, then print their exit codes
Invalid Plugins:
badmeta invalid metadata: invalid character 'i' looking for beginning of object key string
Run 'docker COMMAND --help' for more information on a command.
Stderr: terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestRunBad (0.05s)
run_test.go:76: assertion failed:
--- expected
+++ actual
@@ -1,2 +1,3 @@
+terminal entry not found
docker: 'badmeta' is not a docker command.
See 'docker --help'
=== FAIL: e2e/cli-plugins TestHelpBad (0.03s)
run_test.go:89: assertion failed:
--- expected
+++ actual
@@ -1,2 +1,3 @@
+terminal entry not found
unknown help topic: badmeta
=== FAIL: e2e/cli-plugins TestBadHelp (0.09s)
run_test.go:99: assertion failed:
Command: docker --config /tmp/plugin-test-650512187 badmeta --help
ExitCode: 0
Stdout:
Usage: docker [OPTIONS] COMMAND
A self-sufficient runtime for containers
Options:
--config string Location of client config files (default
"/root/.docker")
-c, --context string Name of the context to use to connect to the
daemon (overrides DOCKER_HOST env var and
default context set with "docker context use")
-D, --debug Enable debug mode
-H, --host list Daemon socket(s) to connect to
-l, --log-level string Set the logging level
("debug"|"info"|"warn"|"error"|"fatal")
(default "info")
--tls Use TLS; implied by --tlsverify
--tlscacert string Trust certs signed only by this CA (default
"/root/.docker/ca.pem")
--tlscert string Path to TLS certificate file (default
"/root/.docker/cert.pem")
--tlskey string Path to TLS key file (default
"/root/.docker/key.pem")
--tlsverify Use TLS and verify the remote
-v, --version Print version information and quit
Management Commands:
builder Manage builds
config Manage Docker configs
container Manage containers
context Manage contexts
engine Manage the docker engine
helloworld* A basic Hello World plugin for tests (Docker Inc., testing)
image Manage images
network Manage networks
node Manage Swarm nodes
nopersistentprerun*Testing without PersistentPreRun hooks (Docker Inc., testing)
plugin Manage plugins
secret Manage Docker secrets
service Manage services
stack Manage Docker stacks
swarm Manage Swarm
system Manage Docker
trust Manage trust on Docker images
volume Manage volumes
Commands:
attach Attach local standard input, output, and error streams to a running container
build Build an image from a Dockerfile
commit Create a new image from a container's changes
cp Copy files/folders between a container and the local filesystem
create Create a new container
diff Inspect changes to files or directories on a container's filesystem
events Get real time events from the server
exec Run a command in a running container
export Export a container's filesystem as a tar archive
history Show the history of an image
images List images
import Import the contents from a tarball to create a filesystem image
info Display system-wide information
inspect Return low-level information on Docker objects
kill Kill one or more running containers
load Load an image from a tar archive or STDIN
login Log in to a Docker registry
logout Log out from a Docker registry
logs Fetch the logs of a container
pause Pause all processes within one or more containers
port List port mappings or a specific mapping for the container
ps List containers
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
rename Rename a container
restart Restart one or more containers
rm Remove one or more containers
rmi Remove one or more images
run Run a command in a new container
save Save one or more images to a tar archive (streamed to STDOUT by default)
search Search the Docker Hub for images
start Start one or more stopped containers
stats Display a live stream of container(s) resource usage statistics
stop Stop one or more running containers
tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
top Display the running processes of a container
unpause Unpause all processes within one or more containers
update Update configuration of one or more containers
version Show the Docker version information
wait Block until one or more containers stop, then print their exit codes
Invalid Plugins:
badmeta invalid metadata: invalid character 'i' looking for beginning of object key string
Run 'docker COMMAND --help' for more information on a command.
Stderr: terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestRunGood (0.05s)
run_test.go:124: assertion failed:
Command: docker --config /tmp/plugin-test-405444958 helloworld
ExitCode: 0
Stdout: Hello World!
Stderr: terminal entry not found
terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestHelpGood (0.04s)
run_test.go:139: assertion failed:
Command: docker --config /tmp/plugin-test-776431397 -l info help helloworld
ExitCode: 0
Stdout:
Usage: docker helloworld [OPTIONS] COMMAND
A basic Hello World plugin for tests
Options:
-c, --context string Is it Christmas?
-D, --debug Enable debug
--pre-run Log from prerun hook
--who string Who are we addressing?
Commands:
apiversion Print the API version of the server
exitstatus2 Exit with status 2
goodbye Say Goodbye instead of Hello
Run 'docker helloworld COMMAND --help' for more information on a command.
Stderr: terminal entry not found
terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestGoodHelp (0.04s)
run_test.go:154: assertion failed:
Command: docker --config /tmp/plugin-test-300391488 -l info helloworld --help
ExitCode: 0
Stdout:
Usage: docker helloworld [OPTIONS] COMMAND
A basic Hello World plugin for tests
Options:
-c, --context string Is it Christmas?
-D, --debug Enable debug
--pre-run Log from prerun hook
--who string Who are we addressing?
Commands:
apiversion Print the API version of the server
exitstatus2 Exit with status 2
goodbye Say Goodbye instead of Hello
Run 'docker helloworld COMMAND --help' for more information on a command.
Stderr: terminal entry not found
terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestRunGoodSubcommand (0.05s)
run_test.go:177: assertion failed:
Command: docker --config /tmp/plugin-test-321802911 helloworld goodbye
ExitCode: 0
Stdout: Goodbye World!
Stderr: terminal entry not found
terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestHelpGoodSubcommand (0.04s)
run_test.go:192: assertion failed:
Command: docker --config /tmp/plugin-test-532049778 -l info help helloworld goodbye
ExitCode: 0
Stdout:
Usage: docker helloworld goodbye
Say Goodbye instead of Hello
Stderr: terminal entry not found
terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestGoodSubcommandHelp (0.04s)
run_test.go:207: assertion failed:
Command: docker --config /tmp/plugin-test-173130281 -l info helloworld goodbye --help
ExitCode: 0
Stdout:
Usage: docker helloworld goodbye
Say Goodbye instead of Hello
Stderr: terminal entry not found
terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/cli-plugins TestCliInitialized/withhook (0.05s)
--- FAIL: TestCliInitialized/withhook (0.05s)
run_test.go:227: assertion failed:
--- ←
+++ →
@@ -1,3 +1 @@
-terminal entry not found
-terminal entry not found
Plugin PersistentPreRunE called
=== FAIL: e2e/cli-plugins TestCliInitialized (0.09s)
=== FAIL: e2e/container TestCreateWithContentTrust (35.65s)
create_test.go:18: assertion failed:
Command: docker image push registry:5000/trust-create:latest
ExitCode: 1
Error: exit status 1
Stdout: The push refers to repository [registry:5000/trust-create]
5bef08742407: Preparing
5bef08742407: Mounted from alpine
latest: digest: sha256:641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d size: 528
Signing and pushing trust metadata
Stderr: terminal entry not found
Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/container TestTrustedCreateFromUnreachableTrustServer (35.16s)
create_test.go:38: assertion failed:
Command: docker image push registry:5000/trust-create:latest
ExitCode: 1
Error: exit status 1
Stdout: The push refers to repository [registry:5000/trust-create]
5bef08742407: Preparing
5bef08742407: Layer already exists
latest: digest: sha256:641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d size: 528
Signing and pushing trust metadata
Stderr: terminal entry not found
Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/container TestTrustedCreateFromBadTrustServer (35.45s)
create_test.go:66: assertion failed:
Command: docker image push registry:5000/evil-alpine:latest
ExitCode: 1
Error: exit status 1
Stdout: The push refers to repository [registry:5000/evil-alpine]
5bef08742407: Preparing
5bef08742407: Mounted from trust-build1
latest: digest: sha256:641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d size: 528
Signing and pushing trust metadata
Stderr: terminal entry not found
Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/container TestRunAttachedFromRemoteImageAndRemove (1.68s)
run_test.go:28: assertion failed:
--- expected
+++ actual
@@ -1,2 +1,3 @@
+terminal entry not found
Unable to find image 'registry:5000/alpine:test-run-pulls' locally
test-run-pulls: Pulling from alpine
=== FAIL: e2e/container TestRunWithContentTrust (35.61s)
run_test.go:36: assertion failed:
Command: docker image push registry:5000/trust-run:latest
ExitCode: 1
Error: exit status 1
Stdout: The push refers to repository [registry:5000/trust-run]
5bef08742407: Preparing
5bef08742407: Mounted from trust-pull-unreachable
latest: digest: sha256:641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d size: 528
Signing and pushing trust metadata
Stderr: terminal entry not found
Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/context TestContextList (0.07s)
context_test.go:16: assertion failed:
Command: docker context ls
ExitCode: 0
Stdout: NAME DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
default * Current DOCKER_HOST based configuration unix:///var/run/docker.sock https://someserver (zoinx) swarm
remote my remote cluster ssh://someserver https://someserver (default) kubernetes
Stderr: terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/image TestBuildFromContextDirectoryWithTag (5.38s)
build_test.go:37: assertion failed:
Command: docker build -t myimage .
ExitCode: 0
Stdout: Sending build context to Docker daemon 4.608kB
Step 1/4 : FROM registry:5000/alpine:3.6
---> 76da55c8019d
Step 2/4 : COPY run /usr/bin/run
---> 3d67f56d8b61
Step 3/4 : RUN run
---> Running in c31f61696328
running
Removing intermediate container c31f61696328
---> 2b46233b7c8e
Step 4/4 : COPY data /data
---> 1df98813d0ca
Successfully built 1df98813d0ca
Successfully tagged myimage:latest
Stderr: terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/image TestTrustedBuild (35.43s)
build_test.go:56: assertion failed:
Command: docker image push registry:5000/trust-build1:latest
ExitCode: 1
Error: exit status 1
Stdout: The push refers to repository [registry:5000/trust-build1]
5bef08742407: Preparing
5bef08742407: Mounted from trust-create
latest: digest: sha256:641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d size: 528
Signing and pushing trust metadata
Stderr: terminal entry not found
Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/image TestTrustedBuildUntrustedImage (35.03s)
build_test.go:105: assertion failed:
Command: docker build -t myimage .
ExitCode: 1
Error: exit status 1
Stdout: Sending build context to Docker daemon
Stderr: terminal entry not found
error during connect: Post http://172.18.0.5:2375/v1.40/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=myimage&target=&ulimits=null&version=1: Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
Expected stderr to contain "does not have trust data for"
=== FAIL: e2e/image TestBuildIidFileSquash (0.08s)
build_test.go:112: assertion failed:
Command: docker info --format {{.ExperimentalBuild}}
ExitCode: 0
Stdout: false
Stderr: terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/image TestPullWithContentTrust (35.33s)
pull_test.go:22: assertion failed:
Command: docker image push registry:5000/trust-pull:latest
ExitCode: 1
Error: exit status 1
Stdout: The push refers to repository [registry:5000/trust-pull]
5bef08742407: Preparing
5bef08742407: Mounted from trust-build1
latest: digest: sha256:641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d size: 528
Signing and pushing trust metadata
Stderr: terminal entry not found
Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/image TestPullQuiet (0.06s)
pull_test.go:41: assertion failed:
--- ←
+++ →
@@ -1,2 +1 @@
-terminal entry not found
=== FAIL: e2e/image TestPullWithContentTrustUsesCacheWhenNotaryUnavailable (35.79s)
pull_test.go:49: assertion failed:
Command: docker image push registry:5000/trust-pull-unreachable:latest
ExitCode: 1
Error: exit status 1
Stdout: The push refers to repository [registry:5000/trust-pull-unreachable]
5bef08742407: Preparing
5bef08742407: Mounted from trust-pull
latest: digest: sha256:641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d size: 528
Signing and pushing trust metadata
Stderr: terminal entry not found
Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/image TestPushWithContentTrust (35.27s)
push_test.go:46: assertion failed:
Command: docker push registry:5000/trust-push:latest
ExitCode: 1
Error: exit status 1
Stdout: The push refers to repository [registry:5000/trust-push]
5bef08742407: Preparing
5bef08742407: Mounted from evil-alpine
latest: digest: sha256:641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d size: 528
Signing and pushing trust metadata
Stderr: terminal entry not found
Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/image TestPushWithContentTrustExistingTag (35.36s)
push_test.go:92: assertion failed:
Command: docker push registry:5000/trust-push-existing:latest
ExitCode: 1
Error: exit status 1
Stdout: The push refers to repository [registry:5000/trust-push-existing]
5bef08742407: Preparing
5bef08742407: Layer already exists
latest: digest: sha256:641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d size: 528
Signing and pushing trust metadata
Stderr: terminal entry not found
Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/image TestPushWithContentTrustReleasesDelegationOnly (5.08s)
push_test.go:343: assertion failed:
Command: /usr/local/bin/notary -c /tmp/notary_test-186305394/client-config.json init registry:5000/trust-push-releases-delegation
ExitCode: 1
Error: exit status 1
Stdout:
* fatal: client is offline
Stderr: time="2019-08-06T17:46:49Z" level=error msg="could not reach https://notary-server:4443: Get https://notary-server:4443/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/image TestPushWithContentTrustSignsAllFirstLevelRolesWeHaveKeysFor (5.05s)
push_test.go:343: assertion failed:
Command: /usr/local/bin/notary -c /tmp/notary_test-714246211/client-config.json init registry:5000/trust-push-releases-first-roles
ExitCode: 1
Error: exit status 1
Stdout:
* fatal: client is offline
Stderr: time="2019-08-06T17:46:55Z" level=error msg="could not reach https://notary-server:4443: Get https://notary-server:4443/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/image TestPushWithContentTrustSignsForRolesWithKeysAndValidPaths (5.05s)
push_test.go:343: assertion failed:
Command: /usr/local/bin/notary -c /tmp/notary_test-826635240/client-config.json init registry:5000/trust-push-releases-keys-valid-paths
ExitCode: 1
Error: exit status 1
Stdout:
* fatal: client is offline
Stderr: time="2019-08-06T17:47:00Z" level=error msg="could not reach https://notary-server:4443: Get https://notary-server:4443/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/plugin TestInstallWithContentTrust (38.37s)
trust_test.go:41: assertion failed:
Command: docker plugin push registry:5000/plugin-content-trust
ExitCode: 1
Error: exit status 1
Stdout: The push refers to repository [registry:5000/plugin-content-trust]
d90c53745ae6: Preparing
d90c53745ae6: Pushed
latest: digest: sha256:f2bb2ad9cff689823c1912e7a6e6ccb65ec0491dfafc804affbe372d0a22b844 size: 518
Signing and pushing trust metadata
Stderr: terminal entry not found
Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/plugin TestInstallWithContentTrustUntrusted (35.04s)
trust_test.go:68: assertion failed:
Command: docker plugin install --grant-all-permissions tiborvass/sample-volume-plugin:latest
ExitCode: 1
Error: exit status 1
Stdout:
Stderr: terminal entry not found
Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
Expected stderr to contain "Error: remote trust data does not exist"
=== FAIL: e2e/stack TestRemove/Swarm (1.04s)
--- FAIL: TestRemove/Swarm (1.04s)
remove_test.go:34: assertion failed:
Command: docker stack rm test-stack-remove-swarm --orchestrator swarm
ExitCode: 0
Stdout: Removing service test-stack-remove-swarm_one
Removing service test-stack-remove-swarm_two
Removing network test-stack-remove-swarm_default
Stderr: terminal entry not found
Failures:
Expected stderr to contain "[NOTHING]"
=== FAIL: e2e/stack TestRemove (1.04s)
=== FAIL: e2e/trust TestRevokeImage (35.13s)
revoke_test.go:55: assertion failed:
Command: docker -D trust sign registry:5000/revoke:v1
ExitCode: 1
Error: exit status 1
Stdout:
Stderr: terminal entry not found
time="2019-08-06T17:43:12Z" level=debug msg="reading certificate directory: /tmp/trust_test-168390389/tls/notary-server:4443"
time="2019-08-06T17:43:17Z" level=debug msg="Error pinging notary server "https://notary-server:4443/v2/": Get https://notary-server:4443/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
time="2019-08-06T17:43:17Z" level=debug msg="Making dir path: /tmp/trust_test-168390389/trust/tuf/registry:5000/revoke/changelist"
Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/trust TestRevokeRepo (35.12s)
revoke_test.go:64: assertion failed:
Command: docker -D trust sign registry:5000/revokerepo:v1
ExitCode: 1
Error: exit status 1
Stdout:
Stderr: terminal entry not found
time="2019-08-06T17:43:47Z" level=debug msg="reading certificate directory: /tmp/trust_test-208485328/tls/notary-server:4443"
time="2019-08-06T17:43:52Z" level=debug msg="Error pinging notary server "https://notary-server:4443/v2/": Get https://notary-server:4443/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
time="2019-08-06T17:43:52Z" level=debug msg="Making dir path: /tmp/trust_test-208485328/trust/tuf/registry:5000/revokerepo/changelist"
Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/trust TestSignLocalImage (35.19s)
sign_test.go:32: assertion failed:
Command: docker trust sign registry:5000/sign:v1
ExitCode: 1
Error: exit status 1
Stdout:
Stderr: terminal entry not found
Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
ExitCode was 1 expected 0
Expected no error
=== FAIL: e2e/trust TestSignWithLocalFlag (35.29s)
sign_test.go:58: assertion failed:
Command: docker -D trust sign registry:5000/signlocal:v1
ExitCode: 1
Error: exit status 1
Stdout:
Stderr: terminal entry not found
time="2019-08-06T17:44:58Z" level=debug msg="reading certificate directory: /tmp/trust_test-188076418/tls/notary-server:4443"
time="2019-08-06T17:45:03Z" level=debug msg="Error pinging notary server "https://notary-server:4443/v2/": Get https://notary-server:4443/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
time="2019-08-06T17:45:03Z" level=debug msg="Making dir path: /tmp/trust_test-188076418/trust/tuf/registry:5000/signlocal/changelist"
Error: error contacting notary server: dial tcp 82.216.111.26:4443: i/o timeout
Failures:
ExitCode was 1 expected 0
Expected no error
-
You need to type 'q' to stop displaying then 'Ctrl^C' to exit
docker stats. I did not exit the program when user types 'q' because I did not know if there is a SIGINT handler. -
I am not a go developer and it is possible that the code written is not the best object oriented code you ever saw.
I am open to any remarks and changes that can make the code better!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the docker stats --tcell entry point and review the reported vendor dependencies and terminal behavior. Run the docker.Makefile lint, test-unit, and test-ece targets, including the named failing plugin tests. Done means the curses-style stats display supports new containers and resizing without the reported test and lint failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100