diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cf4dbb202e..8fc1617a3d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,13 +18,14 @@ Before you fil an issue or a pull request, quickly read of the following tips on ### Prerequisites Most of the time, you'll have installed Kitematic before contibuting, but for the -sake of completeness, you can also install [Node.js](https://nodejs.org/) and the latest Xcode from the Apple App Store and then run from your Git clone. +sake of completeness, you can also install [Node.js 0.10.38](https://nodejs.org/dist/v0.10.38/). -Running `npm start` will download and install the OS X Docker client, -[Docker machine](https://github.com/docker/machine), -the [Boot2Docker iso](https://github.com/boot2docker/boot2docker), -[Electron](http://electron.atom.io/), and [VirtualBox](https://www.virtualbox.org/) -if needed. +### Other Prerequisites (Mac) +- The latest Xcode from the Apple App Store. + +### Other Prerequisites (Windows) +- [Visual Studio 2013 Community](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx) (or similar) +- [Python](https://www.python.org/downloads/release/python-2710/) ### Getting Started @@ -34,6 +35,11 @@ To run the app in development: - `npm start` +Running `npm start` will download and install the OS X Docker client, +[Docker Machine](https://github.com/docker/machine), [Docker Compose](https://github.com/docker/compose) +the [Boot2Docker iso](https://github.com/boot2docker/boot2docker), +[Electron](http://electron.atom.io/). + ### Building & Release - `npm run release` diff --git a/docs/index.md b/docs/index.md index 0ddfc9f3b9..60a58533b2 100755 --- a/docs/index.md +++ b/docs/index.md @@ -28,10 +28,9 @@ container! ## Technical Details -Kitematic is a self-contained .app, with a two exceptions: +Kitematic is a self-contained .app, with an exception: - It will install VirtualBox if it's not already installed. -- It copies the `docker` and `docker-machine` binaries to `/usr/local/bin` for convenience. ### Why does Kitematic need my root password? diff --git a/gulpfile.js b/gulpfile.js index 09b70a92b9..6099fb736b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -207,7 +207,7 @@ gulp.task('download-docker', function (cb) { } else { request('https://get.docker.com/builds/Darwin/x86_64/docker-' + packagejson['docker-version']) .pipe(fs.createWriteStream('./resources/docker')).on('finish', function () { - fs.chmodSync('./resources/docker', 755); + fs.chmodSync('./resources/docker', 0755); cb(); }); } @@ -230,7 +230,7 @@ gulp.task('download-docker-machine', function (cb) { } else { request('https://github.com/docker/machine/releases/download/v' + packagejson['docker-machine-version'] + '/docker-machine_darwin-amd64') .pipe(fs.createWriteStream('./resources/docker-machine')).on('finish', function () { - fs.chmodSync('./resources/docker-machine', 755); + fs.chmodSync('./resources/docker-machine', 0755); cb(); }); } @@ -252,7 +252,7 @@ gulp.task('download-docker-compose', function (cb) { gutil.log(gutil.colors.green('Downloading Docker Compose')); request('https://github.com/docker/compose/releases/download/' + packagejson['docker-compose-version'] + '/docker-compose-Darwin-x86_64') .pipe(fs.createWriteStream('./resources/docker-compose')).on('finish', function () { - fs.chmodSync('./resources/docker-compose', 755); + fs.chmodSync('./resources/docker-compose', 0755); cb(); }); } diff --git a/package.json b/package.json index a2a6aabdd5..202163f4fb 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ } ], "docker-version": "1.6.2", - "docker-machine-version": "0.3.0-rc1", + "docker-machine-version": "0.3.0-rc2", "docker-compose-version": "1.2.0", "electron-version": "0.27.2", "virtualbox-version": "4.3.28", diff --git a/src/components/ContainerDetailsSubheader.react.js b/src/components/ContainerDetailsSubheader.react.js index bc9d4a348d..72f2f9d1aa 100644 --- a/src/components/ContainerDetailsSubheader.react.js +++ b/src/components/ContainerDetailsSubheader.react.js @@ -102,8 +102,12 @@ var ContainerDetailsSubheader = React.createClass({ if (!this.disableTerminal()) { metrics.track('Terminaled Into Container'); var container = this.props.container; - var shell = ContainerUtil.env(container).SHELL; - if(typeof shell === 'undefined') { + var shell = ContainerUtil.env(container).reduce((envs, env) => { + envs[env[0]] = env[1]; + return envs; + }, {}).SHELL; + + if(!shell) { shell = 'sh'; } machine.ip().then(ip => { diff --git a/src/components/ContainerHomeFolders.react.js b/src/components/ContainerHomeFolders.react.js index 88196f5022..4bd3ef8bd7 100644 --- a/src/components/ContainerHomeFolders.react.js +++ b/src/components/ContainerHomeFolders.react.js @@ -25,7 +25,7 @@ var ContainerHomeFolder = React.createClass({ }, (index) => { if (index === 0) { var volumes = _.clone(this.props.container.Volumes); - var newHostVolume = path.join(util.home(), 'Kitematic', this.props.container.Name, containerVolume); + var newHostVolume = path.join(util.home(), util.documents(), 'Kitematic', this.props.container.Name, containerVolume); volumes[containerVolume] = newHostVolume; var binds = _.pairs(volumes).map(function (pair) { if(util.isWindows()) { diff --git a/src/utils/DockerUtil.js b/src/utils/DockerUtil.js index 1109a381d1..46dceeb5a1 100644 --- a/src/utils/DockerUtil.js +++ b/src/utils/DockerUtil.js @@ -103,6 +103,8 @@ export default { containerData.Env = containerData.Config.Env; } + containerData.Volumes = _.mapObject(containerData.Volumes, () => {return {};}); + let existing = this.client.getContainer(name); existing.kill(() => { existing.remove(() => { @@ -203,7 +205,6 @@ export default { containerServerActions.error({name, error}); return; } - existingData.name = existingData.Name || name; if (existingData.Config && existingData.Config.Image) { existingData.Image = existingData.Config.Image; diff --git a/src/utils/RegHubUtil.js b/src/utils/RegHubUtil.js index 8bad189107..cf00640249 100644 --- a/src/utils/RegHubUtil.js +++ b/src/utils/RegHubUtil.js @@ -56,7 +56,7 @@ module.exports = { recommended: function () { request.get('https://kitematic.com/recommended.json', (error, response, body) => { if (error) { - repositoryServerActions.recommendedError({error}); + repositoryServerActions.error({error}); } let data = JSON.parse(body); diff --git a/src/utils/Util.js b/src/utils/Util.js index 0430d3de71..799d718c80 100644 --- a/src/utils/Util.js +++ b/src/utils/Util.js @@ -41,6 +41,9 @@ module.exports = { home: function () { return app.getPath('home'); }, + documents: function () { + return this.isWindows() ? 'My\ Documents' : 'Documents'; + }, supportDir: function () { return app.getPath('userData'); },