diff --git a/Gruntfile.js b/Gruntfile.js index f597865cea..6c61a18c68 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,13 +3,8 @@ var execFile = require('child_process').execFile; var packagejson = require('./package.json'); var electron = require('electron-prebuilt'); -var dockerHostname = packagejson['docker-version'].indexOf('rc') !== -1 ? 'test.docker.com' : 'get.docker.com'; - -var WINDOWS_DOCKER_URL = 'https://' + dockerHostname + '/builds/Windows/x86_64/docker-' + packagejson['docker-version'] + '.exe'; -var DARWIN_DOCKER_URL = 'https://' + dockerHostname + '/builds/Darwin/x86_64/docker-' + packagejson['docker-version']; var WINDOWS_DOCKER_MACHINE_URL = 'https://github.com/docker/machine/releases/download/v' + packagejson['docker-machine-version'] + '/docker-machine_windows-amd64.exe'; var DARWIN_DOCKER_MACHINE_URL = 'https://github.com/docker/machine/releases/download/v' + packagejson['docker-machine-version'] + '/docker-machine_darwin-amd64'; -var DARWIN_COMPOSE_URL = 'https://github.com/docker/compose/releases/download/' + packagejson['docker-compose-version'] + '/docker-compose-Darwin-x86_64'; module.exports = function (grunt) { require('load-grunt-tasks')(grunt); @@ -143,20 +138,10 @@ module.exports = function (grunt) { // docker binaries 'download-binary': { - docker: { - version: packagejson['docker-version'], - binary: path.join('resources', 'docker'), - download: 'curl:docker' - }, 'docker-machine': { version: packagejson['docker-machine-version'], binary: path.join('resources', 'docker-machine'), download: 'curl:docker-machine' - }, - 'docker-compose': { - version: packagejson['docker-compose-version'], - binary: path.join('resources', 'docker-compose'), - download: 'curl:docker-compose' } }, @@ -221,17 +206,9 @@ module.exports = function (grunt) { // download binaries curl: { - docker: { - src: process.platform === 'win32' ? WINDOWS_DOCKER_URL : DARWIN_DOCKER_URL, - dest: process.platform === 'win32' ? path.join('resources', 'docker.exe') : path.join('resources', 'docker') - }, 'docker-machine': { src: process.platform === 'win32' ? WINDOWS_DOCKER_MACHINE_URL : DARWIN_DOCKER_MACHINE_URL, dest: process.platform === 'win32' ? path.join('resources', 'docker-machine.exe') : path.join('resources', 'docker-machine') - }, - 'docker-compose': { - src: DARWIN_COMPOSE_URL, - dest: 'resources/docker-compose' } }, @@ -256,22 +233,6 @@ module.exports = function (grunt) { } }, - // javascript - babel: { - options: { - sourceMap: 'inline', - blacklist: 'regenerator' - }, - dist: { - files: [{ - expand: true, - cwd: 'src/', - src: ['**/*.js'], - dest: 'build/', - }] - } - }, - plistbuddy: { addBundleURLTypes: { method: 'Add', @@ -307,6 +268,22 @@ module.exports = function (grunt) { } }, + // javascript + babel: { + options: { + sourceMap: 'inline', + blacklist: 'regenerator' + }, + dist: { + files: [{ + expand: true, + cwd: 'src/', + src: ['**/*.js'], + dest: 'build/', + }] + } + }, + shell: { electron: { command: electron + ' ' + 'build', @@ -361,14 +338,10 @@ module.exports = function (grunt) { } }); - if (process.platform === 'win32') { - grunt.registerTask('default', ['download-binary:docker', 'download-binary:docker-machine', 'newer:babel', 'less', 'newer:copy:dev', 'shell:electron', 'watchChokidar']); - } else { - grunt.registerTask('default', ['download-binary', 'newer:babel', 'less', 'newer:copy:dev', 'shell:electron', 'watchChokidar']); - } + grunt.registerTask('default', ['download-binary', 'newer:babel', 'less', 'newer:copy:dev', 'shell:electron', 'watchChokidar']); if (process.platform === 'win32') { - grunt.registerTask('release', ['clean:release', 'download-binary:docker', 'download-binary:docker-machine', 'babel', 'less', 'copy:dev', 'electron:windows', 'copy:windows', 'rcedit:exes', 'prompt:create-windows-installer', 'create-windows-installer', 'rename:installer']); + grunt.registerTask('release', ['clean:release', 'download-binary', 'babel', 'less', 'copy:dev', 'electron:windows', 'copy:windows', 'rcedit:exes', 'prompt:create-windows-installer', 'create-windows-installer', 'rename:installer']); } else { grunt.registerTask('release', ['clean:release', 'download-binary', 'babel', 'less', 'copy:dev', 'electron:osx', 'copy:osx', 'plistbuddy', 'shell:sign', 'shell:zip']); } diff --git a/docs/Dockerfile b/docs/Dockerfile index ac3cf79880..041cd99d5f 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -1,30 +1,27 @@ -FROM docs/base:hugo +FROM docs/base:latest MAINTAINER Mary Anthony (@moxiegirl) -# to get the git info for this repo +# To get the git info for this repo COPY . /src COPY . /docs/content/kitematic/ +RUN svn checkout https://github.com/docker/compose/trunk/docs /docs/content/compose +RUN svn checkout https://github.com/docker/docker/trunk/docs /docs/content/docker +RUN svn checkout https://github.com/docker/swarm/trunk/docs /docs/content/swarm +RUN svn checkout https://github.com/docker/distribution/trunk/docs /docs/content/registry +RUN svn checkout https://github.com/docker/tutorials/trunk/docs /docs/content +RUN svn checkout https://github.com/docker/opensource/trunk/docs /docs/content/opensource +RUN svn checkout https://github.com/docker/machine/trunk/docs /docs/content/machine + + # Sed to process GitHub Markdown # 1-2 Remove comment code from metadata block # 3 Change ](/word to ](/project/ in links # 4 Change ](word.md) to ](/project/word) # 5 Remove .md extension from link text -# 6 Change ](./ to ](/project/word) -# 7 Change ](../../ to ](/project/ -# 8 Change ](../ to ](/project/ -# 9 Change ](# to ](/project/ +# 6 Change ](../ to ](/project/word) +# 7 Change ](../../ to ](/project/ --> not implemented # -RUN find /docs/content/kitematic -type f -name "*.md" -exec sed -i.old \ - -e '/^/g' \ - -e '/^/g' \ - -e 's/\(\]\)\([(]\)\(\/\)/\1\2\/kitematic\//g' \ - -e 's/\(\][(]\)\([A-z].*\)\(\.md\)/\1\/kitematic\/\2/g' \ - -e 's/\([(]\)\(.*\)\(\.md\)/\1\2/g' \ - -e 's/\(\][(]\)\(\.\/\)/\1\/kitematic\//g' \ - -e 's/\(\][(]\)\(\.\.\/\.\.\/\)/\1\/kitematic\//g' \ - -e 's/\(\][(]\)\(\.\.\/\)/\1\/kitematic\//g' {} \; - - - \ No newline at end of file +# +RUN /src/pre-process.sh /docs diff --git a/docs/faq.md b/docs/faq.md index 69a7290e91..06efb92e7a 100755 --- a/docs/faq.md +++ b/docs/faq.md @@ -31,10 +31,8 @@ the Docker Remote API. ### Which platforms does Kitematic support? -Right now Kitematic only works on Mac OS X. That said, Windows is on the -short-term -[roadmap](https://github.com/kitematic/kitematic/blob/master/ROADMAP.md) (coming -soon!) and a Linux version is in high demand. +Right now Kitematic works on Mac OS X and Windows. Linux is planned in the future. Review our product +[roadmap](https://github.com/kitematic/kitematic/blob/master/ROADMAP.md) for more information. ### Why does Kitematic collect usage analytics and bug reports? diff --git a/docs/index.md b/docs/index.md index ef3fd45ec3..2d81b7c047 100755 --- a/docs/index.md +++ b/docs/index.md @@ -9,45 +9,8 @@ weight=2 +++ -# Kitematic: Install Kitematic +# Kitematic -You install Kitematic much the same way you install any application on a Mac or -Windows PC: download an image and run an installer. +Kitematic, the Docker GUI, runs on Mac OS X and Windows operating systems. Beginning with the 1.8 Docker release, you use the Docker Toolbox to install Kitematic. See the [Mac OS X installation guide]({{% thebaseurl %}}mac) or the [Windows installation guide]({{% thebaseurl %}}installation/windows) for details on installing with Docker Toolbox. -## Download Kitematic - -[Download the Kitematic zip file](https://kitematic.com/download/), unzip the -file by double-clicking it, and then double-click the application to run it. -You'll probably also want to put the application in your Applications folder. - -## Initial Setup - -Opening Kitematic for the first time sets up everything you need to run Docker -containers. If you don't already have VirtualBox installed, Kitematic will -download and install the latest version. - -![Installing](../images/installing.png) - -All Done! Within a minute you should be ready to start running your first -container! - -![containers](../images/containers.png) - -## Technical Details - -Kitematic is a self-contained .app, with an exception: - -- It will install VirtualBox if it's not already installed. - -### Why does Kitematic need my root password? - -Kitematic needs your root password for two reasons: - -- Installing VirtualBox requires root access as it includes Mac OS X kernel extensions. -- Copying `docker` and `docker-machine` to `/usr/local/bin` may require root - permission if the default permissions for this directory have been changed - prior to installing Kitematic. - -## Next Steps - -For information about using Kitematic, take a look at the [User Guide](/userguide). +For information about using Kitematic, take a look at the [User Guide](userguide). diff --git a/docs/pre-process.sh b/docs/pre-process.sh new file mode 100755 index 0000000000..75e9611f2f --- /dev/null +++ b/docs/pre-process.sh @@ -0,0 +1,61 @@ +#!/bin/bash -e + +# Populate an array with just docker dirs and one with content dirs +docker_dir=(`ls -d /docs/content/docker/*`) +content_dir=(`ls -d /docs/content/*`) + +# Loop content not of docker/ +# +# Sed to process GitHub Markdown +# 1-2 Remove comment code from metadata block +# 3 Remove .md extension from link text +# 4 Change ](/ to ](/project/ in links +# 5 Change ](word) to ](/project/word) +# 6 Change ](../../ to ](/project/ +# 7 Change ](../ to ](/project/word) +# +for i in "${content_dir[@]}" +do + : + case $i in + "/docs/content/windows") + ;; + "/docs/content/mac") + ;; + "/docs/content/linux") + ;; + "/docs/content/docker") + y=${i##*/} + find $i -type f -name "*.md" -exec sed -i.old \ + -e '/^/g' \ + -e '/^/g' {} \; + ;; + *) + y=${i##*/} + find $i -type f -name "*.md" -exec sed -i.old \ + -e '/^/g' \ + -e '/^/g' \ + -e 's/\(\]\)\([(]\)\(\/\)/\1\2\/'$y'\//g' \ + -e 's/\(\][(]\)\([A-z].*\)\(\.md\)/\1\/'$y'\/\2/g' \ + -e 's/\([(]\)\(.*\)\(\.md\)/\1\2/g' \ + -e 's/\(\][(]\)\(\.\/\)/\1\/'$y'\//g' \ + -e 's/\(\][(]\)\(\.\.\/\.\.\/\)/\1\/'$y'\//g' \ + -e 's/\(\][(]\)\(\.\.\/\)/\1\/'$y'\//g' {} \; + ;; + esac +done + +# +# Move docker directories to content +# +for i in "${docker_dir[@]}" +do + : + if [ -d $i ] + then + mv $i /docs/content/ + fi +done + +rm -rf /docs/content/docker + diff --git a/docs/userguide.md b/docs/userguide.md index 672f65dc78..7085922b44 100755 --- a/docs/userguide.md +++ b/docs/userguide.md @@ -16,7 +16,7 @@ Kitematic is an open source project built to simplify and streamline using Docker on a Mac or Windows (coming soon) PC. Kitematic automates the Docker installation and setup process and provides an intuitive graphical user interface (GUI) for running Docker containers. Kitematic integrates with -[Docker Machine](http://docs.docker.com/machine/) to provision a VirtualBox VM +[Docker Machine]({{% thebaseurl %}}machine/) to provision a VirtualBox VM and install the Docker Engine locally on your machine. Once installed, the Kitematic GUI launches and from the home screen you will be diff --git a/package.json b/package.json index f76476b0bd..8b41e88ef6 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,8 @@ "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } ], - "docker-version": "1.8.0-rc1", - "docker-machine-version": "0.4.0-rc1", - "docker-compose-version": "1.4.0rc2", + "docker-version": "1.8.0-rc2", + "docker-machine-version": "0.4.0-rc2", "electron-version": "0.27.2", "virtualbox-version": "5.0.0", "virtualbox-filename": "VirtualBox-5.0.0.pkg", diff --git a/resources/terminal b/resources/terminal index af5af69872..ea55c18810 100755 --- a/resources/terminal +++ b/resources/terminal @@ -1,8 +1,7 @@ #!/bin/bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -PATH=$DIR:$PATH -CMD="export PATH='$PATH' && clear && $*" +CMD="clear && $*" ITERM_EXISTS=`osascript <