Merge branch 'master' into windows

This commit is contained in:
Jeffrey Morgan 2015-06-09 23:18:12 -07:00
commit a232108dd3
9 changed files with 30 additions and 17 deletions

View File

@ -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`

View File

@ -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?

View File

@ -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();
});
}

View File

@ -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",

View File

@ -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 => {

View File

@ -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()) {

View File

@ -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;

View File

@ -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);

View File

@ -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');
},