Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal state of the DockerContainer is not reset after container.Terminate(ctx) #93

Closed
mdelapenya opened this issue Sep 5, 2019 · 1 comment

Comments

@mdelapenya
Copy link
Collaborator

mdelapenya commented Sep 5, 2019

Describe the bug
I'm working on exposing the inspectContainer method, and I realised that the Terminate method does not reset the internal state of the DockerContainer instance: raw and uuid

To Reproduce
I'm sending a PR for this. First commit will be a unit test

Expected behavior
After a container is terminated, its internal state (uuid and raw) is reset

docker info
output of the command:

Client:
 Debug Mode: false

Server:
 Containers: 3
  Running: 3
  Paused: 0
  Stopped: 0
 Images: 306
 Server Version: 19.03.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
 runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.9.184-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.787GiB
 Name: docker-desktop
 ID: BMI5:JZNA:56SZ:5U24:RYWQ:OJQB:AXJA:LQP6:ZGVF:VGNO:M63Z:6W7X
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 55
  Goroutines: 65
  System Time: 2019-09-05T07:25:03.9382341Z
  EventsListeners: 2
 HTTP Proxy: gateway.docker.internal:3128
 HTTPS Proxy: gateway.docker.internal:3129
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine
mdelapenya referenced this issue in mdelapenya/testcontainers-go Sep 5, 2019
gianarb added a commit that referenced this issue Sep 9, 2019
(#93) Reset internal state after container.Terminate(), and expose InspectContainer
@mdelapenya
Copy link
Collaborator Author

Merged, thanks!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant