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

docker does not respect sig-proxy without -t, com.docker.cli does #2653

Closed
aeruder opened this issue Jul 25, 2020 · 3 comments · Fixed by docker-archive/compose-cli#423
Closed
Labels

Comments

@aeruder
Copy link

aeruder commented Jul 25, 2020

This seems related to #2607 but not entirely sure.

Description

Without -t docker does not seem to respect sig-proxy.

Ran this

docker run --rm --env TINI_VERBOSITY=3 --env TINI_KILL_PROCESS_GROUP=1 --init --entrypoint= --sig-proxy=true -i --attach stdin --attach stdout --attach stderr ubuntu perl -E '$SIG{INT} = sub { say "hi" }; $SIG{TERM} = sub { say "term"; }; say "starting" ; STDOUT->flush; sleep 100'

Expected this:

starting
^Chi
[INFO  tini (1)] Spawned child process 'perl' with pid '6'
[DEBUG tini (1)] Passing signal: 'Interrupt'
[DEBUG tini (1)] Received SIGCHLD
[DEBUG tini (1)] Reaped child with pid: '6'
[INFO  tini (1)] Main child exited normally (with status '0')

Got this:

starting
^C%

(and if you run docker ps you'll see that it is still running).

  • HOWEVER

If you repeat the above experiment using com.docker.cli it works fine. Also if you use -t it is fine.

Output of docker version:

Docker version 19.03.12, build 48a66213fe

Output of docker info:

Client:
 Debug Mode: false

Server:
 Containers: 24
  Running: 1
  Paused: 0
  Stopped: 23
 Images: 719
 Server Version: 19.03.12
 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: 7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.19.76-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 3.848GiB
 Name: docker-desktop
 ID: E2XT:3NCM:FAF3:2FLZ:K42B:J5QT:VUWI:HYCC:RKUG:25FB:ZHDI:O6RT
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 74
  Goroutines: 61
  System Time: 2020-07-25T00:35:10.3179254Z
  EventsListeners: 3
 HTTP Proxy: gateway.docker.internal:3128
 HTTPS Proxy: gateway.docker.internal:3129
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: true
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

OS X running Docker Desktop Edge.

% ls -lsa /usr/local/bin/docker
0 lrwxr-xr-x  1 root  admin  54 Jun 28 14:19 /usr/local/bin/docker -> /Applications/Docker.app/Contents/Resources/bin/docker
% ls -lsa /usr/local/bin/com.docker.cli
0 lrwxr-xr-x  1 root  admin  62 Jul 17 20:11 /usr/local/bin/com.docker.cli -> /Applications/Docker.app/Contents/Resources/bin/com.docker.cli
% which docker
/usr/local/bin/docker
% which com.docker.cli
/usr/local/bin/com.docker.cli

@thaJeztah
Copy link
Member

Thanks for reporting! @chris-crone PTAL

@chris-crone
Copy link
Member

Thanks for the report @aeruder, this looks like a bug. I've added it to our backlog to fix.

In the meantime, you can opt out of the cloud integration CLI from the Desktop preferences:
Screenshot 2020-07-27 at 16 37 10

@thaJeztah
Copy link
Member

I think this should be fixed by docker-archive/compose-cli#423. Trying on a current Docker Desktop install with "cloud experience" enabled;

$ docker run --rm --env TINI_VERBOSITY=3 --env TINI_KILL_PROCESS_GROUP=1 --init --entrypoint= --sig-proxy=true -i --attach stdin --attach stdout --attach stderr ubuntu perl -E '$SIG{INT} = sub { say "hi" }; $SIG{TERM} = sub { say "term"; }; say "starting" ; STDOUT->flush; sleep 100'
starting
^Chi
[INFO  tini (1)] Spawned child process 'perl' with pid '7'
[DEBUG tini (1)] Passing signal: 'Interrupt'
[DEBUG tini (1)] Received SIGCHLD
[DEBUG tini (1)] Reaped child with pid: '7'
[INFO  tini (1)] Main child exited normally (with status '0')

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

Successfully merging a pull request may close this issue.

3 participants