Kitematic
Kitematic is an application built using electron and is powered by the Docker Engine. While it's work in progress, the goal is to make Kitematic a high-performance, portable Javascript ES6 application built with React and Flux (using alt. It adopts a single data flow pattern:
There are three primary types of objects:
Actions:
Interact with the system (Docker Engine, Docker Machine, Registries, Hub, etc)
Views:
Views make up the UI, and trigger available actions.
- Stores: Stores store the state of the application.
* Utils: Utils interact with APIs, outside systems, CLI tools and generate. They are called by user-generated actions and in return, also create actions based on API return values, CLI output etc.
Install
Kitematic is a self-contained .app , with a two exceptions:
- It will install VirtualBox if it's not already installed.
- It copies the docker and docker-machine binaries to /usr/local/bin for convenience.
Getting Started
- npm install
- npm start
- npm run release
- Unit Tests: npm test
Testing
Kitematic uses the Jest framework by Facebook. To keep tests fast, please mock as much as possible.
Code Guidelines
Run npm run lint before committing to ensure your javascript is up to standard. Feel free to suggest changes to the lint spec in .jshint.
Contributor Prcess
- grunt package tech
- electron tech
- replace docker.io by im.hzspeed.cn
- from starting to running process.
- source code
source code
src
actions/.js components/.js stores/.js utils/.js *.js browser.js(electron) main.js(app.js->react主应用) npm start->browser->index.hmtl(main.js->app.js->reactor->router.js(set,get)|routes.js) menutemplate.js
utils ContainerUtil.js DockerMachineUtil.js DockerUtil.js HubUtil.js let HUB2_ENDPOINT = process.env.HUB2_ENDPOINT || 'https://hub.docker.com/v2'; MetricsUtil.js RegHubUtil.js https://kitematic.com/recommended.json let REGHUB2_ENDPOINT = process.env.REGHUB2_ENDPOINT || 'https://hub.docker.com/v2'; SetupUtil.js Util.js VirtualBox.js WebUtil.js script.src = 'http://localhost:35729/livereload.js';
stores AccountStore.js export default alt.createStore(AccountStore); ContainerStore.js RepositoryStore.js SetupStore.js TagStore.js
actions AccountAction.js AccountServerAction.js export default alt.createActions(AccountServerActions); ContainerAction.js ContainerSererActions.js RepositoryAction.js RepositoryServerActions.js SetupActions.js SetupServerAction.js TagAction.js TagServerActions.js
styles
styles/bootstrap/mixins/.less .less bootstrap.less(mixins.less,.less) mixins.less(mixins/.less) .less main.less(bootstrap/bootstrap.less,.less)
kitematic login
123.58.191.68 - - [24/Mar/2016:18:12:20 +0800] "POST /v2/users/login/ HTTP/1.1" 401 195 "-" "-"
docker login
123.58.191.68 - - [24/Mar/2016:18:08:38 +0800] "GET /v2/ HTTP/1.1" 401 195 "-" "docker/1.9.1-cs2 go/go1.4.3 git-commit/4ade326 kernel/3.16.0-0.bpo.4-amd64 os/linux arch/amd64" 123.58.191.68 - hujb2000 [24/Mar/2016:18:08:38 +0800] "GET /v2/ HTTP/1.1" 200 2 "-" "docker/1.9.1-cs2 go/go1.4.3 git-commit/4ade326 kernel/3.16.0-0.bpo.4-amd64 os/linux arch/amd64"
docker logout im.hzspeed.cn 目前的搭建方法:只能登录,但不能判断用户,不能区分租户。
root@hjb:/home/hjb/icp# docker login -u hujb2000 -e [email protected] hub.c.163.com Password: Error response from daemon: no successful auth challenge for https://hub.c.163.com/v2/ - errors: [token auth attempt for registry https://hub.c.163.com/v2/: https://hub-auth.c.163.com/auth?account=hujb2000&service=Docker+Registry request failed with status: 401 Unauthorized]