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

Make the "shell" action to start the dockerRunScript.sh script using a terminal application #55

Closed
erotte opened this issue Apr 17, 2018 · 4 comments

Comments

@erotte
Copy link

erotte commented Apr 17, 2018

Expected Behavior

pressing 'L' should open a login shell to the selected container

Actual Behavior

The file dockerRunScript.sh is opened in a text editir (XCode)

Steps to Re-produce the Problem

  1. start dockly

  2. press 'l'

  3. dockerRunScript.sh opens in XCode

Context

  • Operating System: macOS 10.13.3
  • Node.js version (run node --version): 8.10.0
  • Package version:
  • Docker version (run docker --version): 18.03.0-ce, build 0520e24
  • Is docker installed locally? yes
  • Do you have containers created? yes
  • Does this file exists /var/run/docker.sock ? yes
  • Output of docker info:

Containers: 3
Running: 2
Paused: 0
Stopped: 1
Images: 44
Server Version: 18.03.0-ce
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 logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfd04396dc68220d1cecbe686a6cc3aa5ce3667c
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.87-linuxkit-aufs
Operating System: Docker for Mac
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.952GiB
Name: linuxkit-025000000001
ID: YWTZ:UZVV:RABG:5NRK:C2AC:Q2CR:QT5N:GXYT:7FCX:PWED:CHTF:MWMK
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 35
Goroutines: 53
System Time: 2018-04-17T21:55:18.3367154Z
EventsListeners: 2
HTTP Proxy: docker.for.mac.http.internal:3128
HTTPS Proxy: docker.for.mac.http.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

@lirantal lirantal self-assigned this Apr 18, 2018
@lirantal lirantal added the bug label Apr 18, 2018
@lirantal
Copy link
Owner

Hi Eckhard,

I believe this happens because XCode in your setup is associated with opening/editing .sh files.
Could you update file associations so that a terminal app like iterm or similar will run those type of files?

I'm also open to ideas about how to explicitly spawn terminal apps with the script but it would probably require some OS and apps detection.

@erotte
Copy link
Author

erotte commented Apr 18, 2018

Hi,
I'm not sure what's the desired behaviour but I would expect that dockerRunScript.sh should be executed as shell script instead of opening it in the associated application.
Am I wrong?

@lirantal
Copy link
Owner

Eckhard,

We simply execute the script with whatever program is associated to it, which obviously changes from OS to OS. If you're able to make the change in your OS config to associate .sh files with a terminal program it should solve the problem.

As a more permanent solution though, I suggest we attempt to detect the OS and run the dockerRunScript.sh file with related terminal applications. For example, if we detect it's a Windows we can fire up powershell, or if it's a Mac we can fire up iterm as the app.

@lirantal lirantal added enhancement and removed bug labels Apr 21, 2018
@lirantal lirantal changed the title "shell" action just opens dockerRunScript.sh in editor (MacOs) Make the "shell" action to start the dockerRunScript.sh script using a terminal application Apr 21, 2018
@lirantal
Copy link
Owner

Closing due to inactivity, but will be happy to receive PRs on this in the future!

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

No branches or pull requests

2 participants