Skip to content

Commit

Permalink
adding basic functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
iamsoorena committed Aug 13, 2018
1 parent 50752c2 commit e6501c3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
14 changes: 14 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#! /usr/bin/env node

var spawn = require('child_process').spawn;

var child = spawn(`docker`,
[
'exec',
'-it',
process.argv[2],
'bash',
'-c',
`stty cols ${process.stdout.columns} rows ${process.stdout.rows} && bash`
], {
stdio: 'inherit'});
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "goinside",
"version": "0.1.0",
"description": "a command line tool that makes it easy to go inside docker containers",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand All @@ -15,6 +14,10 @@
],
"author": "Soorena Soleimani",
"license": "MIT",
"bin": {
"goinside": "index.js"
},
"preferGlobal": true,
"bugs": {
"url": "https://github.com/iamsoorena/goinside/issues"
},
Expand Down

0 comments on commit e6501c3

Please sign in to comment.