зеркало из https://github.com/docker/kitematic.git
Fixing bug where docker-machine create would fail if ssh is not on path
This commit is contained in:
Родитель
93f532f7df
Коммит
f8448dff75
|
@ -153,7 +153,7 @@ module.exports = function (grunt) {
|
|||
files: [{
|
||||
expand: true,
|
||||
cwd: 'resources',
|
||||
src: ['docker*'],
|
||||
src: ['docker*', 'boot2docker.iso', 'ssh.exe', 'OPENSSH_LICENSE'],
|
||||
dest: 'dist/Kitematic-win32/resources/resources/'
|
||||
}],
|
||||
options: {
|
||||
|
@ -164,7 +164,7 @@ module.exports = function (grunt) {
|
|||
files: [{
|
||||
expand: true,
|
||||
cwd: 'resources',
|
||||
src: ['**/*'],
|
||||
src: ['docker*', 'boot2docker.iso', 'macsudo', 'terminal'],
|
||||
dest: '<%= OSX_FILENAME %>/Contents/Resources/resources/'
|
||||
}, {
|
||||
src: 'util/kitematic.icns',
|
||||
|
|
|
@ -58,9 +58,9 @@ var DockerMachine = {
|
|||
create: function () {
|
||||
var dockerversion = util.packagejson()['docker-version'];
|
||||
if (util.isWindows()) {
|
||||
return util.exec([this.command(), '--native-ssh', '-D', 'create', '-d', 'virtualbox', '--virtualbox-boot2docker-url', path.join(process.cwd(), 'resources', 'boot2docker-' + dockerversion + '.iso'), '--virtualbox-memory', '2048', NAME]);
|
||||
return util.exec([this.command(), '-D', 'create', '-d', 'virtualbox', '--virtualbox-memory', '2048', NAME]);
|
||||
} else {
|
||||
return util.exec([this.command(), '-D', 'create', '-d', 'virtualbox', '--virtualbox-boot2docker-url', path.join(process.cwd(), 'resources', 'boot2docker-' + dockerversion + '.iso'), '--virtualbox-memory', '2048', NAME]);
|
||||
return util.exec([this.command(), '-D', 'create', '-d', 'virtualbox' ,'--virtualbox-boot2docker-url', path.join(process.cwd(), 'resources', 'boot2docker-' + dockerversion + '.iso'), '--virtualbox-memory', '2048', NAME]);
|
||||
}
|
||||
},
|
||||
start: function () {
|
||||
|
@ -161,8 +161,7 @@ var DockerMachine = {
|
|||
{env: {
|
||||
'DOCKER_HOST' : machine.url,
|
||||
'DOCKER_CERT_PATH' : path.join(util.home(), '.docker/machine/machines/' + machine.name),
|
||||
'DOCKER_TLS_VERIFY': 1,
|
||||
'PATH': resources.resourceDir() + ';' + process.env.PATH
|
||||
'DOCKER_TLS_VERIFY': 1
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -174,9 +173,6 @@ var DockerMachine = {
|
|||
});
|
||||
}
|
||||
},
|
||||
exec: function () {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = DockerMachine;
|
||||
|
|
|
@ -10,6 +10,15 @@ var app = remote.require('app');
|
|||
module.exports = {
|
||||
exec: function (args, options) {
|
||||
options = options || {};
|
||||
|
||||
// Add resources dir to exec path for Windows
|
||||
if (this.isWindows()) {
|
||||
options.env = options.env || {};
|
||||
if (!options.env.PATH) {
|
||||
options.env.PATH = process.env.RESOURCES_PATH + ';' + process.env.PATH;
|
||||
}
|
||||
}
|
||||
|
||||
let fn = Array.isArray(args) ? exec : child_process.exec;
|
||||
return new Promise((resolve, reject) => {
|
||||
fn(args, options, (stderr, stdout, code) => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче