├── .dockerignore ├── .gitignore ├── .mailmap ├── .travis.yml ├── AUTHORS ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── MAINTAINERS ├── Makefile ├── NOTICE ├── README.md ├── VERSION ├── api ├── MAINTAINERS ├── README.md ├── api_unit_test.go ├── client │ ├── cli.go │ ├── commands.go │ ├── hijack.go │ └── utils.go ├── common.go └── server │ ├── MAINTAINERS │ ├── server.go │ └── server_unit_test.go ├── archive ├── MAINTAINERS ├── README.md ├── archive.go ├── archive_test.go ├── changes.go ├── changes_test.go ├── common.go ├── diff.go ├── testdata │ └── broken.tar ├── time_linux.go ├── time_unsupported.go └── wrap.go ├── builtins └── builtins.go ├── contrib ├── MAINTAINERS ├── README ├── check-config.sh ├── completion │ ├── bash │ │ └── docker │ ├── fish │ │ └── docker.fish │ └── zsh │ │ └── _docker ├── desktop-integration │ ├── README.md │ ├── data │ │ └── Dockerfile │ └── iceweasel │ │ └── Dockerfile ├── docker-device-tool │ └── device_tool.go ├── host-integration │ ├── Dockerfile.dev │ ├── Dockerfile.min │ ├── manager.go │ ├── manager.sh │ └── manager │ │ ├── systemd │ │ └── upstart ├── init │ ├── openrc │ │ ├── docker.confd │ │ └── docker.initd │ ├── systemd │ │ ├── MAINTAINERS │ │ ├── docker.service │ │ └── docker.socket │ ├── sysvinit-debian │ │ ├── docker │ │ └── docker.default │ ├── sysvinit-redhat │ │ ├── docker │ │ └── docker.sysconfig │ └── upstart │ │ └── docker.conf ├── mkimage-alpine.sh ├── mkimage-arch-pacman.conf ├── mkimage-arch.sh ├── mkimage-busybox.sh ├── mkimage-crux.sh ├── mkimage-debootstrap.sh ├── mkimage-rinse.sh ├── mkimage-unittest.sh ├── mkimage-yum.sh ├── mkimage.sh ├── mkimage │ ├── .febootstrap-minimize │ ├── busybox-static │ ├── debootstrap │ ├── mageia-urpmi │ └── rinse ├── mkseccomp.pl ├── mkseccomp.sample ├── nuke-graph-directory.sh ├── syntax │ ├── textmate │ │ ├── Docker.tmbundle │ │ │ ├── Preferences │ │ │ │ └── Dockerfile.tmPreferences │ │ │ ├── Syntaxes │ │ │ │ └── Dockerfile.tmLanguage │ │ │ └── info.plist │ │ ├── MAINTAINERS │ │ └── README.md │ └── vim │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc │ │ └── dockerfile.txt │ │ ├── ftdetect │ │ └── dockerfile.vim │ │ └── syntax │ │ └── dockerfile.vim ├── udev │ └── 80-docker.rules └── vagrant-docker │ └── README.md ├── daemon ├── MAINTAINERS ├── README.md ├── attach.go ├── build.go ├── changes.go ├── commit.go ├── config.go ├── container.go ├── container_unit_test.go ├── copy.go ├── create.go ├── daemon.go ├── daemon_aufs.go ├── daemon_btrfs.go ├── daemon_devicemapper.go ├── daemon_no_aufs.go ├── delete.go ├── execdriver │ ├── MAINTAINERS │ ├── driver.go │ ├── execdrivers │ │ └── execdrivers.go │ ├── lxc │ │ ├── MAINTAINERS │ │ ├── driver.go │ │ ├── info.go │ │ ├── info_test.go │ │ ├── init.go │ │ ├── lxc_init_linux.go │ │ ├── lxc_init_unsupported.go │ │ ├── lxc_template.go │ │ └── lxc_template_unit_test.go │ ├── native │ │ ├── configuration │ │ │ ├── parse.go │ │ │ └── parse_test.go │ │ ├── create.go │ │ ├── driver.go │ │ ├── driver_unsupported.go │ │ ├── driver_unsupported_nocgo.go │ │ ├── info.go │ │ ├── init.go │ │ └── template │ │ │ └── default_template.go │ ├── pipes.go │ ├── termconsole.go │ └── utils.go ├── export.go ├── graphdriver │ ├── aufs │ │ ├── aufs.go │ │ ├── aufs_test.go │ │ ├── dirs.go │ │ ├── migrate.go │ │ ├── mount.go │ │ ├── mount_linux.go │ │ └── mount_unsupported.go │ ├── btrfs │ │ ├── MAINTAINERS │ │ ├── btrfs.go │ │ ├── btrfs_test.go │ │ └── dummy_unsupported.go │ ├── devmapper │ │ ├── MAINTAINERS │ │ ├── README.md │ │ ├── attach_loopback.go │ │ ├── deviceset.go │ │ ├── devmapper.go │ │ ├── devmapper_doc.go │ │ ├── devmapper_log.go │ │ ├── devmapper_test.go │ │ ├── devmapper_wrapper.go │ │ ├── driver.go │ │ ├── ioctl.go │ │ └── mount.go │ ├── driver.go │ ├── graphtest │ │ └── graphtest.go │ └── vfs │ │ ├── driver.go │ │ └── vfs_test.go ├── history.go ├── image_delete.go ├── info.go ├── inspect.go ├── kill.go ├── list.go ├── logs.go ├── monitor.go ├── network_settings.go ├── networkdriver │ ├── bridge │ │ ├── driver.go │ │ └── driver_test.go │ ├── ipallocator │ │ ├── allocator.go │ │ └── allocator_test.go │ ├── network.go │ ├── network_test.go │ ├── portallocator │ │ ├── portallocator.go │ │ └── portallocator_test.go │ ├── portmapper │ │ ├── mapper.go │ │ ├── mapper_test.go │ │ ├── mock_proxy.go │ │ └── proxy.go │ └── utils.go ├── pause.go ├── resize.go ├── restart.go ├── start.go ├── state.go ├── state_test.go ├── stop.go ├── top.go ├── utils.go ├── utils_linux.go ├── utils_nolinux.go ├── utils_test.go ├── volumes.go └── wait.go ├── docker ├── README.md ├── client.go ├── daemon.go ├── docker.go └── flags.go ├── dockerinit └── dockerinit.go ├── dockerversion └── dockerversion.go ├── docs ├── .gitignore ├── Dockerfile ├── MAINTAINERS ├── README.md ├── docs-update.py ├── man │ ├── Dockerfile │ ├── Dockerfile.5.md │ ├── README.md │ ├── docker-attach.1.md │ ├── docker-build.1.md │ ├── docker-commit.1.md │ ├── docker-cp.1.md │ ├── docker-diff.1.md │ ├── docker-events.1.md │ ├── docker-export.1.md │ ├── docker-history.1.md │ ├── docker-images.1.md │ ├── docker-import.1.md │ ├── docker-info.1.md │ ├── docker-inspect.1.md │ ├── docker-kill.1.md │ ├── docker-load.1.md │ ├── docker-login.1.md │ ├── docker-logout.1.md │ ├── docker-logs.1.md │ ├── docker-pause.1.md │ ├── docker-port.1.md │ ├── docker-ps.1.md │ ├── docker-pull.1.md │ ├── docker-push.1.md │ ├── docker-restart.1.md │ ├── docker-rm.1.md │ ├── docker-rmi.1.md │ ├── docker-run.1.md │ ├── docker-save.1.md │ ├── docker-search.1.md │ ├── docker-start.1.md │ ├── docker-stop.1.md │ ├── docker-tag.1.md │ ├── docker-top.1.md │ ├── docker-unpause.1.md │ ├── docker-version.1.md │ ├── docker-wait.1.md │ ├── docker.1.md │ └── md2man-all.sh ├── mkdocs.yml ├── release.sh ├── s3_website.json ├── sources │ ├── article-img │ │ └── architecture.svg │ ├── articles.md │ ├── articles │ │ ├── ambassador_pattern_linking.md │ │ ├── baseimages.md │ │ ├── basics.md │ │ ├── certificates.md │ │ ├── cfengine_process_management.md │ │ ├── chef.md │ │ ├── dsc.md │ │ ├── host_integration.md │ │ ├── https.md │ │ ├── networking.md │ │ ├── puppet.md │ │ ├── runmetrics.md │ │ ├── security.md │ │ └── using_supervisord.md │ ├── contributing.md │ ├── contributing │ │ ├── contributing.md │ │ └── devenvironment.md │ ├── docker-hub │ │ ├── accounts.md │ │ ├── builds.md │ │ ├── groups.png │ │ ├── home.md │ │ ├── hub-images │ │ │ ├── bb_hooks.png │ │ │ ├── bb_menu.png │ │ │ ├── bb_post-hook.png │ │ │ ├── deploy_key.png │ │ │ ├── gh_docker-service.png │ │ │ ├── gh_menu.png │ │ │ ├── gh_service_hook.png │ │ │ ├── gh_settings.png │ │ │ └── github_deploy_key.png │ │ ├── hub.png │ │ ├── index.md │ │ ├── orgs.png │ │ ├── repos.md │ │ └── repos.png │ ├── examples.md │ ├── examples │ │ ├── apt-cacher-ng.Dockerfile │ │ ├── apt-cacher-ng.md │ │ ├── couchdb_data_volumes.md │ │ ├── mongodb.md │ │ ├── mongodb │ │ │ └── Dockerfile │ │ ├── nodejs_web_app.md │ │ ├── postgresql_service.Dockerfile │ │ ├── postgresql_service.md │ │ ├── running_redis_service.md │ │ ├── running_riak_service.md │ │ ├── running_ssh_service.Dockerfile │ │ └── running_ssh_service.md │ ├── faq.md │ ├── genindex.md │ ├── http-routingtable.md │ ├── index.md │ ├── installation.md │ ├── installation │ │ ├── MAINTAINERS │ │ ├── amazon.md │ │ ├── archlinux.md │ │ ├── binaries.md │ │ ├── centos.md │ │ ├── cruxlinux.md │ │ ├── debian.md │ │ ├── fedora.md │ │ ├── frugalware.md │ │ ├── gentoolinux.md │ │ ├── google.md │ │ ├── images │ │ │ ├── osx-installer.png │ │ │ ├── win │ │ │ │ ├── _01.gif │ │ │ │ ├── _02.gif │ │ │ │ ├── _06.gif │ │ │ │ ├── cygwin.gif │ │ │ │ ├── hp_bios_vm.JPG │ │ │ │ ├── putty.gif │ │ │ │ ├── putty_2.gif │ │ │ │ ├── run_02_.gif │ │ │ │ ├── run_03.gif │ │ │ │ ├── run_04.gif │ │ │ │ ├── ssh-config.gif │ │ │ │ ├── ts_go_bios.JPG │ │ │ │ └── ts_no_docker.JPG │ │ │ ├── windows-boot2docker-start.png │ │ │ └── windows-installer.png │ │ ├── mac.md │ │ ├── openSUSE.md │ │ ├── rackspace.md │ │ ├── rhel.md │ │ ├── softlayer.md │ │ ├── ubuntulinux.md │ │ └── windows.md │ ├── introduction │ │ └── understanding-docker.md │ ├── jsearch.md │ ├── reference.md │ ├── reference │ │ ├── api │ │ │ ├── README.md │ │ │ ├── _static │ │ │ │ └── io_oauth_authorization_page.png │ │ │ ├── docker-io_api.md │ │ │ ├── docker_io_accounts_api.md │ │ │ ├── docker_remote_api.md │ │ │ ├── docker_remote_api_v1.0.md │ │ │ ├── docker_remote_api_v1.1.md │ │ │ ├── docker_remote_api_v1.10.md │ │ │ ├── docker_remote_api_v1.11.md │ │ │ ├── docker_remote_api_v1.12.md │ │ │ ├── docker_remote_api_v1.13.md │ │ │ ├── docker_remote_api_v1.14.md │ │ │ ├── docker_remote_api_v1.2.md │ │ │ ├── docker_remote_api_v1.3.md │ │ │ ├── docker_remote_api_v1.4.md │ │ │ ├── docker_remote_api_v1.5.md │ │ │ ├── docker_remote_api_v1.6.md │ │ │ ├── docker_remote_api_v1.7.md │ │ │ ├── docker_remote_api_v1.8.md │ │ │ ├── docker_remote_api_v1.9.md │ │ │ ├── hub_registry_spec.md │ │ │ ├── registry_api.md │ │ │ └── remote_api_client_libraries.md │ │ ├── builder.md │ │ ├── commandline │ │ │ ├── cli.md │ │ │ └── docker_images.gif │ │ └── run.md │ ├── robots.txt │ ├── search.md │ ├── static_files │ │ ├── README.md │ │ ├── docker_pull_chart.png │ │ ├── docker_push_chart.png │ │ └── dockerlogo-v.png │ ├── terms.md │ ├── terms │ │ ├── container.md │ │ ├── filesystem.md │ │ ├── image.md │ │ ├── images │ │ │ ├── docker-filesystems-busyboxrw.png │ │ │ ├── docker-filesystems-debian.png │ │ │ ├── docker-filesystems-debianrw.png │ │ │ ├── docker-filesystems-generic.png │ │ │ ├── docker-filesystems-multilayer.png │ │ │ ├── docker-filesystems-multiroot.png │ │ │ └── docker-filesystems.svg │ │ ├── layer.md │ │ ├── registry.md │ │ └── repository.md │ ├── toctree.md │ └── userguide │ │ ├── dockerhub.md │ │ ├── dockerimages.md │ │ ├── dockerizing.md │ │ ├── dockerlinks.md │ │ ├── dockerrepos.md │ │ ├── dockervolumes.md │ │ ├── index.md │ │ ├── login-web.png │ │ ├── register-web.png │ │ ├── search.png │ │ ├── usingdocker.md │ │ └── webapp1.png └── theme │ ├── MAINTAINERS │ └── mkdocs │ ├── autoindex.html │ ├── base.html │ ├── beta_warning.html │ ├── breadcrumbs.html │ ├── css │ ├── animate-custom.css │ ├── bootstrap-custom.css │ ├── docs.css │ ├── font │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ └── fontawesome-webfont.woff │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ └── glyphicons-halflings.png │ ├── main.css │ └── prettify-1.0.css │ ├── fonts │ ├── LigatureSymbols.textClipping │ ├── LigatureSymbols │ │ ├── LigatureSymbols-2.11.eot │ │ ├── LigatureSymbols-2.11.otf │ │ ├── LigatureSymbols-2.11.svg │ │ ├── LigatureSymbols-2.11.ttf │ │ ├── LigatureSymbols-2.11.woff │ │ ├── README.txt │ │ ├── index.html │ │ └── style.css │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff │ ├── footer.html │ ├── header.html │ ├── images │ ├── arrow left.svg │ ├── arrow right.svg │ ├── docker-inc-light.svg │ ├── docker-logo-compressed.png │ ├── docker-top-logo.png │ ├── docker-white.png │ ├── docker-white.svg │ ├── external-link-icon.png │ ├── external-link-icon.psd │ ├── footer-links.png │ ├── fork-us-on-github.png │ ├── glyphicons-halflings-white.png │ ├── glyphicons-halflings.png │ ├── homepage-docker-logo.png │ ├── page-blocks_03.png │ ├── page-blocks_03.svg │ ├── page-blocks_05.png │ ├── page-blocks_05.svg │ ├── page-blocks_07.png │ ├── page-blocks_07.svg │ ├── social │ │ └── docker_social_logos.png │ ├── source_artwork │ │ └── banner-frontpage-usecases.ai │ └── website-footer_clean.svg │ ├── img │ ├── favicon.png │ ├── footer │ │ ├── arrowhead-submit-email-icon.svg │ │ ├── docker-blog-24.png │ │ ├── docker-blog-48.png │ │ ├── facebook-24.png │ │ ├── facebook-48.png │ │ ├── googleplus-24.png │ │ ├── googleplus-48.png │ │ ├── slideshare-24.png │ │ ├── slideshare-48.png │ │ ├── twitter-24.png │ │ ├── twitter-48.png │ │ ├── youtube-24.png │ │ └── youtube-48.png │ ├── form │ │ ├── check-mark-green.svg │ │ ├── padlock-icon-active.svg │ │ └── padlock-icon-inactive.svg │ ├── icons │ │ ├── README.md │ │ ├── caret-down-create-new-icon.svg │ │ ├── cloud-download-dashboard-icon.svg │ │ ├── comment-simple.png │ │ ├── comment-simple.svg │ │ ├── framed-icon-checked-repository.png │ │ ├── framed-icon-checked-repository.svg │ │ ├── framed-icon-empty-repository.png │ │ ├── framed-icon-empty-repository.svg │ │ ├── framed-icon-linked-repository.png │ │ ├── framed-icon-linked-repository.svg │ │ ├── framed-icon-normal-repository.png │ │ ├── framed-icon-normal-repository.svg │ │ ├── framed-icon-official-repository.png │ │ ├── framed-icon-official-repository.svg │ │ ├── framed-icon-private-repository.png │ │ ├── framed-icon-private-repository.svg │ │ ├── icon-device.png │ │ ├── icon-edit.png │ │ ├── icon-file.png │ │ ├── icon-folder.png │ │ ├── icon-link.png │ │ ├── icon-minus.png │ │ ├── icon-normal-repository-frameless.png │ │ ├── icon-normal-repository-frameless.svg │ │ ├── icon-normal-repository.png │ │ ├── icon-normal-repository.svg │ │ ├── icon-plus.png │ │ ├── icon-private-repository-frameless.png │ │ ├── icon-private-repository-frameless.svg │ │ ├── icon-private-repository.png │ │ ├── icon-private-repository.svg │ │ ├── icon-trusted-repository-frameless.png │ │ ├── icon-trusted-repository-frameless.svg │ │ ├── icon-trusted-repository.png │ │ ├── icon-trusted-repository.svg │ │ ├── official-repository-icon.png │ │ ├── repository-icons.ai │ │ ├── star-icon.svg │ │ ├── star-simple.png │ │ ├── star-simple.svg │ │ └── trusted-icon.svg │ ├── lightbox │ │ ├── add-button-icon.svg │ │ ├── escape-lightbox-icon-over.svg │ │ └── escape-lightbox-icon.svg │ ├── nav │ │ ├── caret-down-subnav-icon.svg │ │ ├── caret-down-user-icon-over.svg │ │ ├── caret-down-user-icon.svg │ │ ├── docker-logo-loggedin.png │ │ ├── docker-logo-loggedin.svg │ │ ├── docker-logo-loggedout.png │ │ └── search-icon.svg │ ├── tutorial │ │ ├── DockerHub-Tutorial-05.psd.svg │ │ ├── caret-left-icon-over.svg │ │ ├── caret-left-icon.svg │ │ ├── exit-icon-over.svg │ │ ├── exit-icon.svg │ │ ├── question-mark-icon-over.svg │ │ └── question-mark-icon.svg │ └── universal │ │ ├── cloud-download-dashboard-icon.svg │ │ ├── docker-logo-pin+@2x.png │ │ ├── docker-logo-pin.png │ │ ├── official-repository-icon.png │ │ ├── star-icon.svg │ │ └── trusted-icon.svg │ ├── js │ ├── base.js │ ├── bootstrap-3.0.3.min.js │ ├── jquery-scrolltofixed-min.js │ └── prettify-1.0.min.js │ ├── nav.html │ ├── prev_next.html │ ├── tipuesearch │ ├── img │ │ ├── loader.gif │ │ └── search.png │ ├── tipuesearch.css │ ├── tipuesearch.js │ ├── tipuesearch.min.js │ ├── tipuesearch_content.js │ └── tipuesearch_set.js │ └── toc.html ├── engine ├── MAINTAINERS ├── engine.go ├── engine_test.go ├── env.go ├── env_test.go ├── hack.go ├── helpers_test.go ├── http.go ├── job.go ├── job_test.go ├── shutdown_test.go ├── streams.go ├── streams_test.go ├── table.go └── table_test.go ├── events ├── events.go └── events_test.go ├── graph ├── MAINTAINERS ├── export.go ├── graph.go ├── history.go ├── import.go ├── list.go ├── load.go ├── pools_test.go ├── pull.go ├── push.go ├── service.go ├── tag.go ├── tags.go ├── tags_unit_test.go └── viz.go ├── hack ├── CONTRIBUTORS.md ├── MAINTAINERS ├── MAINTAINERS.md ├── PACKAGERS.md ├── PRINCIPLES.md ├── README.md ├── RELEASE-CHECKLIST.md ├── ROADMAP.md ├── allmaintainers.sh ├── dind ├── generate-authors.sh ├── getmaintainer.sh ├── install.sh ├── make.sh ├── make │ ├── .ensure-busybox │ ├── .ensure-scratch │ ├── .validate │ ├── README.md │ ├── binary │ ├── cover │ ├── cross │ ├── dynbinary │ ├── dyntest-integration │ ├── dyntest-unit │ ├── test-integration │ ├── test-integration-cli │ ├── test-unit │ ├── tgz │ ├── ubuntu │ ├── validate-dco │ └── validate-gofmt ├── release.sh ├── stats.sh └── vendor.sh ├── image ├── graph.go └── image.go ├── integration-cli ├── MAINTAINERS ├── build_tests │ ├── TestAdd │ │ ├── DirContentToExistDir │ │ │ ├── Dockerfile │ │ │ └── test_dir │ │ │ │ └── test_file │ │ ├── DirContentToRoot │ │ │ ├── Dockerfile │ │ │ └── test_dir │ │ │ │ └── test_file │ │ ├── EtcToRoot │ │ │ └── Dockerfile │ │ ├── SingleFileToExistDir │ │ │ ├── Dockerfile │ │ │ └── test_file │ │ ├── SingleFileToNonExistDir │ │ │ ├── Dockerfile │ │ │ └── test_file │ │ ├── SingleFileToRoot │ │ │ └── Dockerfile │ │ ├── SingleFileToWorkdir │ │ │ └── Dockerfile │ │ └── WholeDirToRoot │ │ │ └── Dockerfile │ ├── TestBuildForceRm │ │ └── Dockerfile │ ├── TestBuildHistory │ │ └── Dockerfile │ ├── TestBuildRm │ │ ├── Dockerfile │ │ └── foo │ ├── TestBuildSixtySteps │ │ ├── Dockerfile │ │ └── foo │ ├── TestBuildWithInaccessibleFilesInContext │ │ ├── ignoredinaccessible │ │ │ ├── .dockerignore │ │ │ ├── Dockerfile │ │ │ └── directoryWeCantStat │ │ │ │ └── bar │ │ ├── inaccessibledirectory │ │ │ ├── Dockerfile │ │ │ └── directoryWeCantStat │ │ │ │ └── bar │ │ ├── inaccessiblefile │ │ │ ├── Dockerfile │ │ │ └── fileWithoutReadAccess │ │ └── linksdirectory │ │ │ ├── Dockerfile │ │ │ └── g │ ├── TestContextTar │ │ ├── Dockerfile │ │ └── foo │ └── TestCopy │ │ ├── DirContentToExistDir │ │ ├── Dockerfile │ │ └── test_dir │ │ │ └── test_file │ │ ├── DirContentToRoot │ │ ├── Dockerfile │ │ └── test_dir │ │ │ └── test_file │ │ ├── DisallowRemote │ │ └── Dockerfile │ │ ├── EtcToRoot │ │ └── Dockerfile │ │ ├── SingleFileToExistDir │ │ ├── Dockerfile │ │ └── test_file │ │ ├── SingleFileToNonExistDir │ │ ├── Dockerfile │ │ └── test_file │ │ ├── SingleFileToRoot │ │ └── Dockerfile │ │ ├── SingleFileToWorkdir │ │ └── Dockerfile │ │ └── WholeDirToRoot │ │ └── Dockerfile ├── docker_cli_attach_test.go ├── docker_cli_build_test.go ├── docker_cli_commit_test.go ├── docker_cli_cp_test.go ├── docker_cli_diff_test.go ├── docker_cli_events_test.go ├── docker_cli_export_import_test.go ├── docker_cli_history_test.go ├── docker_cli_images_test.go ├── docker_cli_import_test.go ├── docker_cli_info_test.go ├── docker_cli_inspect_test.go ├── docker_cli_kill_test.go ├── docker_cli_links_test.go ├── docker_cli_logs_test.go ├── docker_cli_nat_test.go ├── docker_cli_ps_test.go ├── docker_cli_pull_test.go ├── docker_cli_push_test.go ├── docker_cli_restart_test.go ├── docker_cli_rm_test.go ├── docker_cli_run_test.go ├── docker_cli_save_load_test.go ├── docker_cli_search_test.go ├── docker_cli_tag_test.go ├── docker_cli_top_test.go ├── docker_cli_version_test.go ├── docker_test_vars.go ├── docker_utils.go └── utils.go ├── integration ├── MAINTAINERS ├── README.md ├── api_test.go ├── auth_test.go ├── commands_test.go ├── container_test.go ├── fixtures │ └── https │ │ ├── ca.pem │ │ ├── client-cert.pem │ │ ├── client-key.pem │ │ ├── client-rogue-cert.pem │ │ ├── client-rogue-key.pem │ │ ├── server-cert.pem │ │ ├── server-key.pem │ │ ├── server-rogue-cert.pem │ │ └── server-rogue-key.pem ├── graph_test.go ├── https_test.go ├── runtime_test.go ├── server_test.go ├── utils_test.go └── z_final_test.go ├── links ├── links.go └── links_test.go ├── nat ├── nat.go ├── nat_test.go ├── sort.go └── sort_test.go ├── opts ├── envfile.go ├── ip.go ├── opts.go └── opts_test.go ├── pkg ├── README.md ├── broadcastwriter │ ├── broadcastwriter.go │ └── broadcastwriter_test.go ├── graphdb │ ├── MAINTAINERS │ ├── conn_sqlite3.go │ ├── conn_unsupported.go │ ├── graphdb.go │ ├── graphdb_test.go │ ├── sort.go │ ├── sort_test.go │ └── utils.go ├── httputils │ ├── MAINTAINERS │ └── resumablerequestreader.go ├── iptables │ ├── MAINTAINERS │ └── iptables.go ├── jsonlog │ └── jsonlog.go ├── listenbuffer │ └── buffer.go ├── log │ ├── log.go │ └── log_test.go ├── mflag │ ├── LICENSE │ ├── MAINTAINERS │ ├── README.md │ ├── example │ │ └── example.go │ ├── flag.go │ └── flag_test.go ├── mount │ ├── MAINTAINERS │ ├── flags.go │ ├── flags_freebsd.go │ ├── flags_linux.go │ ├── flags_unsupported.go │ ├── mount.go │ ├── mount_test.go │ ├── mounter_freebsd.go │ ├── mounter_linux.go │ ├── mounter_unsupported.go │ ├── mountinfo.go │ ├── mountinfo_freebsd.go │ ├── mountinfo_linux.go │ ├── mountinfo_linux_test.go │ └── mountinfo_unsupported.go ├── namesgenerator │ ├── names-generator.go │ └── names-generator_test.go ├── networkfs │ ├── MAINTAINERS │ ├── etchosts │ │ ├── etchosts.go │ │ └── etchosts_test.go │ └── resolvconf │ │ ├── resolvconf.go │ │ └── resolvconf_test.go ├── parsers │ ├── MAINTAINERS │ ├── filters │ │ ├── parse.go │ │ └── parse_test.go │ ├── kernel │ │ ├── kernel.go │ │ ├── kernel_test.go │ │ ├── uname_linux.go │ │ └── uname_unsupported.go │ ├── operatingsystem │ │ ├── operatingsystem.go │ │ └── operatingsystem_test.go │ ├── parsers.go │ └── parsers_test.go ├── proxy │ ├── MAINTAINERS │ ├── network_proxy_test.go │ ├── proxy.go │ ├── stub_proxy.go │ ├── tcp_proxy.go │ └── udp_proxy.go ├── signal │ ├── signal.go │ ├── signal_darwin.go │ ├── signal_freebsd.go │ ├── signal_linux.go │ ├── signal_unsupported.go │ └── trap.go ├── symlink │ ├── MAINTAINERS │ ├── fs.go │ ├── fs_test.go │ └── testdata │ │ └── fs │ │ ├── a │ │ ├── d │ │ ├── e │ │ └── f │ │ ├── b │ │ └── h │ │ ├── g │ │ └── i ├── sysinfo │ ├── MAINTAINERS │ └── sysinfo.go ├── system │ ├── MAINTAINERS │ ├── errors.go │ ├── stat_linux.go │ ├── stat_unsupported.go │ ├── utimes_darwin.go │ ├── utimes_freebsd.go │ ├── utimes_linux.go │ ├── utimes_test.go │ ├── utimes_unsupported.go │ ├── xattrs_linux.go │ └── xattrs_unsupported.go ├── systemd │ ├── MAINTAINERS │ ├── booted.go │ ├── listendfd.go │ └── sd_notify.go ├── tailfile │ ├── tailfile.go │ └── tailfile_test.go ├── tarsum │ ├── tarsum.go │ ├── tarsum_test.go │ └── testdata │ │ ├── 46af0962ab5afeb5ce6740d4d91652e69206fc991fd5328c1a94d364ad00e457 │ │ ├── json │ │ └── layer.tar │ │ └── 511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158 │ │ ├── json │ │ └── layer.tar ├── term │ ├── MAINTAINERS │ ├── term.go │ ├── termios_darwin.go │ ├── termios_freebsd.go │ └── termios_linux.go ├── testutils │ ├── MAINTAINERS │ ├── README.md │ └── utils.go ├── truncindex │ ├── MAINTAINERS │ ├── truncindex.go │ └── truncindex_test.go ├── units │ ├── MAINTAINERS │ ├── duration.go │ ├── duration_test.go │ ├── size.go │ └── size_test.go └── version │ ├── version.go │ └── version_test.go ├── reexec ├── README.md └── reexec.go ├── registry ├── MAINTAINERS ├── auth.go ├── auth_test.go ├── httpfactory.go ├── registry.go ├── registry_mock_test.go ├── registry_test.go ├── service.go ├── session.go └── types.go ├── runconfig ├── compare.go ├── config.go ├── config_test.go ├── hostconfig.go ├── merge.go ├── parse.go └── parse_test.go ├── utils ├── daemon.go ├── http.go ├── jsonmessage.go ├── jsonmessage_test.go ├── progressreader.go ├── random.go ├── stdcopy.go ├── streamformatter.go ├── streamformatter_test.go ├── timeoutconn.go ├── timeoutconn_test.go ├── tmpdir.go ├── tmpdir_unix.go ├── utils.go └── utils_test.go └── vendor ├── MAINTAINERS └── src ├── code.google.com └── p │ ├── go.net │ ├── .hgignore │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── README │ ├── codereview.cfg │ ├── dict │ │ └── dict.go │ ├── html │ │ ├── atom │ │ │ ├── atom.go │ │ │ ├── atom_test.go │ │ │ ├── gen.go │ │ │ ├── table.go │ │ │ └── table_test.go │ │ ├── const.go │ │ ├── doc.go │ │ ├── doctype.go │ │ ├── entity.go │ │ ├── entity_test.go │ │ ├── escape.go │ │ ├── example_test.go │ │ ├── foreign.go │ │ ├── node.go │ │ ├── node_test.go │ │ ├── parse.go │ │ ├── parse_test.go │ │ ├── render.go │ │ ├── render_test.go │ │ ├── testdata │ │ │ ├── go1.html │ │ │ └── webkit │ │ │ │ ├── README │ │ │ │ ├── adoption01.dat │ │ │ │ ├── adoption02.dat │ │ │ │ ├── comments01.dat │ │ │ │ ├── doctype01.dat │ │ │ │ ├── entities01.dat │ │ │ │ ├── entities02.dat │ │ │ │ ├── html5test-com.dat │ │ │ │ ├── inbody01.dat │ │ │ │ ├── isindex.dat │ │ │ │ ├── pending-spec-changes-plain-text-unsafe.dat │ │ │ │ ├── pending-spec-changes.dat │ │ │ │ ├── plain-text-unsafe.dat │ │ │ │ ├── scriptdata01.dat │ │ │ │ ├── scripted │ │ │ │ ├── adoption01.dat │ │ │ │ └── webkit01.dat │ │ │ │ ├── tables01.dat │ │ │ │ ├── tests1.dat │ │ │ │ ├── tests10.dat │ │ │ │ ├── tests11.dat │ │ │ │ ├── tests12.dat │ │ │ │ ├── tests14.dat │ │ │ │ ├── tests15.dat │ │ │ │ ├── tests16.dat │ │ │ │ ├── tests17.dat │ │ │ │ ├── tests18.dat │ │ │ │ ├── tests19.dat │ │ │ │ ├── tests2.dat │ │ │ │ ├── tests20.dat │ │ │ │ ├── tests21.dat │ │ │ │ ├── tests22.dat │ │ │ │ ├── tests23.dat │ │ │ │ ├── tests24.dat │ │ │ │ ├── tests25.dat │ │ │ │ ├── tests26.dat │ │ │ │ ├── tests3.dat │ │ │ │ ├── tests4.dat │ │ │ │ ├── tests5.dat │ │ │ │ ├── tests6.dat │ │ │ │ ├── tests7.dat │ │ │ │ ├── tests8.dat │ │ │ │ ├── tests9.dat │ │ │ │ ├── tests_innerHTML_1.dat │ │ │ │ ├── tricky01.dat │ │ │ │ ├── webkit01.dat │ │ │ │ └── webkit02.dat │ │ ├── token.go │ │ └── token_test.go │ ├── idna │ │ ├── idna.go │ │ ├── idna_test.go │ │ ├── punycode.go │ │ └── punycode_test.go │ ├── ipv4 │ │ ├── control.go │ │ ├── control_bsd.go │ │ ├── control_linux.go │ │ ├── control_plan9.go │ │ ├── control_windows.go │ │ ├── dgramopt_plan9.go │ │ ├── dgramopt_posix.go │ │ ├── doc.go │ │ ├── endpoint.go │ │ ├── example_test.go │ │ ├── gen.go │ │ ├── genericopt_plan9.go │ │ ├── genericopt_posix.go │ │ ├── gentest.go │ │ ├── header.go │ │ ├── header_test.go │ │ ├── helper.go │ │ ├── helper_plan9.go │ │ ├── helper_posix.go │ │ ├── helper_unix.go │ │ ├── helper_windows.go │ │ ├── iana.go │ │ ├── iana_test.go │ │ ├── icmp.go │ │ ├── mockicmp_test.go │ │ ├── mocktransponder_test.go │ │ ├── multicast_test.go │ │ ├── multicastlistener_test.go │ │ ├── multicastsockopt_test.go │ │ ├── packet.go │ │ ├── payload.go │ │ ├── sockopt_bsd.go │ │ ├── sockopt_freebsd.go │ │ ├── sockopt_linux.go │ │ ├── sockopt_plan9.go │ │ ├── sockopt_unix.go │ │ ├── sockopt_windows.go │ │ ├── unicast_test.go │ │ └── unicastsockopt_test.go │ ├── ipv6 │ │ ├── control.go │ │ ├── control_rfc2292_darwin.go │ │ ├── control_rfc3542_bsd.go │ │ ├── control_rfc3542_linux.go │ │ ├── control_rfc3542_plan9.go │ │ ├── control_rfc3542_windows.go │ │ ├── control_test.go │ │ ├── dgramopt_plan9.go │ │ ├── dgramopt_posix.go │ │ ├── doc.go │ │ ├── endpoint.go │ │ ├── gen.go │ │ ├── genericopt_plan9.go │ │ ├── genericopt_posix.go │ │ ├── gentest.go │ │ ├── helper.go │ │ ├── helper_plan9.go │ │ ├── helper_unix.go │ │ ├── helper_windows.go │ │ ├── iana.go │ │ ├── iana_test.go │ │ ├── icmp.go │ │ ├── icmp_bsd.go │ │ ├── icmp_linux.go │ │ ├── icmp_plan9.go │ │ ├── icmp_test.go │ │ ├── icmp_windows.go │ │ ├── mockicmp_test.go │ │ ├── mocktransponder_test.go │ │ ├── multicast_test.go │ │ ├── multicastlistener_test.go │ │ ├── multicastsockopt_test.go │ │ ├── payload.go │ │ ├── payload_cmsg.go │ │ ├── payload_noncmsg.go │ │ ├── sockopt_rfc2292_darwin.go │ │ ├── sockopt_rfc3493_bsd.go │ │ ├── sockopt_rfc3493_linux.go │ │ ├── sockopt_rfc3493_unix.go │ │ ├── sockopt_rfc3493_windows.go │ │ ├── sockopt_rfc3542_bsd.go │ │ ├── sockopt_rfc3542_linux.go │ │ ├── sockopt_rfc3542_plan9.go │ │ ├── sockopt_rfc3542_unix.go │ │ ├── sockopt_rfc3542_windows.go │ │ ├── sockopt_test.go │ │ ├── unicast_test.go │ │ └── unicastsockopt_test.go │ ├── proxy │ │ ├── direct.go │ │ ├── per_host.go │ │ ├── per_host_test.go │ │ ├── proxy.go │ │ ├── proxy_test.go │ │ └── socks5.go │ ├── publicsuffix │ │ ├── gen.go │ │ ├── list.go │ │ ├── list_test.go │ │ ├── table.go │ │ └── table_test.go │ ├── spdy │ │ ├── dictionary.go │ │ ├── read.go │ │ ├── spdy_test.go │ │ ├── types.go │ │ └── write.go │ └── websocket │ │ ├── client.go │ │ ├── exampledial_test.go │ │ ├── examplehandler_test.go │ │ ├── hixie.go │ │ ├── hixie_test.go │ │ ├── hybi.go │ │ ├── hybi_test.go │ │ ├── server.go │ │ ├── websocket.go │ │ └── websocket_test.go │ ├── go │ └── src │ │ └── pkg │ │ └── archive │ │ └── tar │ │ ├── common.go │ │ ├── example_test.go │ │ ├── reader.go │ │ ├── reader_test.go │ │ ├── stat_atim.go │ │ ├── stat_atimespec.go │ │ ├── stat_unix.go │ │ ├── tar_test.go │ │ ├── testdata │ │ ├── gnu.tar │ │ ├── nil-uid.tar │ │ ├── pax.tar │ │ ├── small.txt │ │ ├── small2.txt │ │ ├── sparse-formats.tar │ │ ├── star.tar │ │ ├── ustar.tar │ │ ├── v7.tar │ │ ├── writer-big-long.tar │ │ ├── writer-big.tar │ │ ├── writer.tar │ │ └── xattrs.tar │ │ ├── writer.go │ │ └── writer_test.go │ └── gosqlite │ ├── sqlite │ └── sqlite.go │ └── sqlite3 │ └── driver.go └── github.com ├── coreos └── go-systemd │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── activation │ ├── files.go │ ├── files_test.go │ ├── listeners.go │ └── listeners_test.go │ ├── dbus │ ├── dbus.go │ ├── dbus_test.go │ ├── methods.go │ ├── methods_test.go │ ├── properties.go │ ├── set.go │ ├── set_test.go │ ├── subscription.go │ ├── subscription_set.go │ ├── subscription_set_test.go │ └── subscription_test.go │ ├── examples │ └── activation │ │ ├── activation.go │ │ ├── httpserver │ │ ├── README.md │ │ ├── hello.service │ │ ├── hello.socket │ │ └── httpserver.go │ │ └── listen.go │ ├── fixtures │ ├── enable-disable.service │ ├── start-stop.service │ ├── subscribe-events-set.service │ └── subscribe-events.service │ ├── journal │ └── send.go │ ├── login1 │ ├── dbus.go │ └── dbus_test.go │ └── test ├── docker └── libcontainer │ ├── .travis.yml │ ├── CONTRIBUTORS_GUIDE.md │ ├── Dockerfile │ ├── LICENSE │ ├── MAINTAINERS │ ├── MAINTAINERS_GUIDE.md │ ├── Makefile │ ├── NOTICE │ ├── PRINCIPLES.md │ ├── README.md │ ├── ROADMAP.md │ ├── api_temp.go │ ├── apparmor │ ├── apparmor.go │ ├── apparmor_disabled.go │ ├── gen.go │ └── setup.go │ ├── cgroups │ ├── cgroups.go │ ├── cgroups_test.go │ ├── cgutil │ │ ├── cgutil.go │ │ └── sample_cgroup.json │ ├── fs │ │ ├── apply_raw.go │ │ ├── blkio.go │ │ ├── blkio_test.go │ │ ├── cpu.go │ │ ├── cpu_test.go │ │ ├── cpuacct.go │ │ ├── cpuset.go │ │ ├── devices.go │ │ ├── freezer.go │ │ ├── memory.go │ │ ├── memory_test.go │ │ ├── notify_linux.go │ │ ├── notify_linux_test.go │ │ ├── perf_event.go │ │ ├── stats_util_test.go │ │ ├── util_test.go │ │ ├── utils.go │ │ └── utils_test.go │ ├── stats.go │ ├── systemd │ │ ├── apply_nosystemd.go │ │ └── apply_systemd.go │ └── utils.go │ ├── config.go │ ├── config_test.go │ ├── console │ └── console.go │ ├── container.go │ ├── devices │ ├── defaults.go │ ├── devices.go │ └── number.go │ ├── factory.go │ ├── label │ ├── label.go │ ├── label_selinux.go │ └── label_selinux_test.go │ ├── mount │ ├── init.go │ ├── msmoveroot.go │ ├── nodes │ │ ├── nodes.go │ │ └── nodes_unsupported.go │ ├── pivotroot.go │ ├── ptmx.go │ ├── readonly.go │ ├── remount.go │ └── types.go │ ├── namespaces │ ├── create.go │ ├── exec.go │ ├── execin.go │ ├── init.go │ ├── nsenter │ │ ├── README.md │ │ ├── nsenter.c │ │ ├── nsenter.go │ │ └── nsenter_unsupported.go │ ├── types.go │ ├── types_linux.go │ └── types_test.go │ ├── netlink │ ├── MAINTAINERS │ ├── netlink.go │ ├── netlink_linux.go │ ├── netlink_linux_arm.go │ ├── netlink_linux_notarm.go │ ├── netlink_linux_test.go │ └── netlink_unsupported.go │ ├── network │ ├── loopback.go │ ├── netns.go │ ├── network.go │ ├── stats.go │ ├── strategy.go │ ├── types.go │ └── veth.go │ ├── nsinit │ ├── config.go │ ├── exec.go │ ├── init.go │ ├── main.go │ ├── nsenter.go │ ├── pause.go │ ├── stats.go │ └── utils.go │ ├── process.go │ ├── sample_configs │ ├── README.md │ ├── apparmor.json │ ├── attach_to_bridge.json │ ├── minimal.json │ └── selinux.json │ ├── security │ ├── capabilities │ │ ├── capabilities.go │ │ ├── types.go │ │ └── types_test.go │ └── restrict │ │ ├── restrict.go │ │ └── unsupported.go │ ├── selinux │ ├── selinux.go │ └── selinux_test.go │ ├── state.go │ ├── syncpipe │ ├── sync_pipe.go │ ├── sync_pipe_linux.go │ └── sync_pipe_test.go │ ├── system │ ├── linux.go │ ├── proc.go │ ├── setns_linux.go │ ├── sysconfig.go │ ├── sysconfig_notcgo.go │ └── xattrs_linux.go │ ├── types.go │ ├── update-vendor.sh │ ├── user │ ├── MAINTAINERS │ ├── user.go │ └── user_test.go │ └── utils │ └── utils.go ├── godbus └── dbus │ ├── LICENSE │ ├── README.markdown │ ├── _examples │ ├── eavesdrop.go │ ├── introspect.go │ ├── list-names.go │ ├── notification.go │ ├── prop.go │ ├── server.go │ └── signal.go │ ├── auth.go │ ├── auth_external.go │ ├── auth_sha1.go │ ├── call.go │ ├── conn.go │ ├── conn_darwin.go │ ├── conn_other.go │ ├── conn_test.go │ ├── dbus.go │ ├── decoder.go │ ├── doc.go │ ├── encoder.go │ ├── examples_test.go │ ├── export.go │ ├── homedir.go │ ├── homedir_dynamic.go │ ├── homedir_static.go │ ├── introspect │ ├── call.go │ ├── introspect.go │ └── introspectable.go │ ├── message.go │ ├── prop │ └── prop.go │ ├── proto_test.go │ ├── sig.go │ ├── sig_test.go │ ├── transport_darwin.go │ ├── transport_generic.go │ ├── transport_unix.go │ ├── transport_unix_test.go │ ├── transport_unixcred.go │ ├── variant.go │ ├── variant_lexer.go │ ├── variant_parser.go │ └── variant_test.go ├── gorilla ├── context │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── context.go │ ├── context_test.go │ └── doc.go └── mux │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── bench_test.go │ ├── doc.go │ ├── mux.go │ ├── mux_test.go │ ├── old_test.go │ ├── regexp.go │ └── route.go ├── kr └── pty │ ├── .gitignore │ ├── License │ ├── README.md │ ├── doc.go │ ├── ioctl.go │ ├── ioctl_bsd.go │ ├── ioctl_linux.go │ ├── mktypes.bash │ ├── pty_darwin.go │ ├── pty_freebsd.go │ ├── pty_linux.go │ ├── pty_unsupported.go │ ├── run.go │ ├── types.go │ ├── types_freebsd.go │ ├── util.go │ ├── ztypes_386.go │ ├── ztypes_amd64.go │ ├── ztypes_arm.go │ ├── ztypes_freebsd_386.go │ ├── ztypes_freebsd_amd64.go │ └── ztypes_freebsd_arm.go ├── syndtr └── gocapability │ ├── LICENSE │ └── capability │ ├── capability.go │ ├── capability_linux.go │ ├── capability_noop.go │ ├── capability_test.go │ ├── enum.go │ └── syscall_linux.go └── tchap └── go-patricia ├── .gitignore ├── AUTHORS ├── LICENSE ├── README.md └── patricia ├── children.go ├── patricia.go ├── patricia_dense_test.go ├── patricia_sparse_test.go └── patricia_test.go /.dockerignore: -------------------------------------------------------------------------------- 1 | bundles 2 | .gopath 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Docker project generated files to ignore 2 | # if you want to ignore files created by your editor/tools, 3 | # please consider a global .gitignore https://help.github.com/articles/ignoring-files 4 | .vagrant* 5 | bin 6 | docker/docker 7 | .*.swp 8 | a.out 9 | *.orig 10 | build_src 11 | .flymake* 12 | .idea 13 | .DS_Store 14 | docs/_build 15 | docs/_static 16 | docs/_templates 17 | .gopath/ 18 | .dotcloud 19 | *.test 20 | bundles/ 21 | .hg/ 22 | .git/ 23 | vendor/pkg/ 24 | pyenv 25 | Vagrantfile 26 | docs/AWS_S3_BUCKET 27 | docs/GIT_BRANCH 28 | docs/VERSION 29 | docs/GITCOMMIT 30 | -------------------------------------------------------------------------------- /MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes (@shykes) 2 | Victor Vieux (@vieux) 3 | Michael Crosby (@crosbymichael) 4 | .mailmap: Tianon Gravi (@tianon) 5 | .travis.yml: Tianon Gravi (@tianon) 6 | AUTHORS: Tianon Gravi (@tianon) 7 | Dockerfile: Tianon Gravi (@tianon) 8 | Makefile: Tianon Gravi (@tianon) 9 | .dockerignore: Tianon Gravi (@tianon) 10 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Docker 2 | Copyright 2012-2014 Docker, Inc. 3 | 4 | This product includes software developed at Docker, Inc. (http://www.docker.com). 5 | 6 | This product contains software (https://github.com/kr/pty) developed 7 | by Keith Rarick, licensed under the MIT License. 8 | 9 | The following is courtesy of our legal counsel: 10 | 11 | 12 | Use and transfer of Docker may be subject to certain restrictions by the 13 | United States and other governments. 14 | It is your responsibility to ensure that your use and/or transfer does not 15 | violate applicable laws. 16 | 17 | For more information, please see http://www.bis.doc.gov 18 | 19 | See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. 20 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 1.2.0-dev 2 | -------------------------------------------------------------------------------- /api/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Victor Vieux (@vieux) 2 | -------------------------------------------------------------------------------- /api/README.md: -------------------------------------------------------------------------------- 1 | This directory contains code pertaining to the Docker API: 2 | 3 | - Used by the docker client when communicating with the docker daemon 4 | 5 | - Used by third party tools wishing to interface with the docker daemon 6 | -------------------------------------------------------------------------------- /api/api_unit_test.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestJsonContentType(t *testing.T) { 8 | if !MatchesContentType("application/json", "application/json") { 9 | t.Fail() 10 | } 11 | 12 | if !MatchesContentType("application/json; charset=utf-8", "application/json") { 13 | t.Fail() 14 | } 15 | 16 | if MatchesContentType("dockerapplication/json", "application/json") { 17 | t.Fail() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /api/server/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Victor Vieux (@vieux) 2 | # off the grid until september 3 | # Johan Euphrosine (@proppy) 4 | -------------------------------------------------------------------------------- /archive/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Cristian Staretu (@unclejack) 2 | Tibor Vass (@tiborvass) 3 | -------------------------------------------------------------------------------- /archive/README.md: -------------------------------------------------------------------------------- 1 | This code provides helper functions for dealing with archive files. 2 | 3 | **TODO**: Move this to either `pkg` or (if not possible) to `utils`. 4 | -------------------------------------------------------------------------------- /archive/common.go: -------------------------------------------------------------------------------- 1 | package archive 2 | 3 | const twBufSize = 32 * 1024 4 | const trBufSize = 32 * 1024 5 | -------------------------------------------------------------------------------- /archive/testdata/broken.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/archive/testdata/broken.tar -------------------------------------------------------------------------------- /archive/time_linux.go: -------------------------------------------------------------------------------- 1 | package archive 2 | 3 | import ( 4 | "syscall" 5 | "time" 6 | ) 7 | 8 | func timeToTimespec(time time.Time) (ts syscall.Timespec) { 9 | if time.IsZero() { 10 | // Return UTIME_OMIT special value 11 | ts.Sec = 0 12 | ts.Nsec = ((1 << 30) - 2) 13 | return 14 | } 15 | return syscall.NsecToTimespec(time.UnixNano()) 16 | } 17 | -------------------------------------------------------------------------------- /archive/time_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package archive 4 | 5 | import ( 6 | "syscall" 7 | "time" 8 | ) 9 | 10 | func timeToTimespec(time time.Time) (ts syscall.Timespec) { 11 | nsec := int64(0) 12 | if !time.IsZero() { 13 | nsec = time.UnixNano() 14 | } 15 | return syscall.NsecToTimespec(nsec) 16 | } 17 | -------------------------------------------------------------------------------- /contrib/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | -------------------------------------------------------------------------------- /contrib/README: -------------------------------------------------------------------------------- 1 | The `contrib` directory contains scripts, images, and other helpful things 2 | which are not part of the core docker distribution. Please note that they 3 | could be out of date, since they do not receive the same attention as the 4 | rest of the repository. 5 | -------------------------------------------------------------------------------- /contrib/desktop-integration/README.md: -------------------------------------------------------------------------------- 1 | Desktop Integration 2 | =================== 3 | 4 | The ./contrib/desktop-integration contains examples of typical dockerized 5 | desktop applications. 6 | 7 | Examples 8 | ======== 9 | 10 | * Data container: ./data/Dockerfile creates a data image sharing /data volume 11 | * Iceweasel: ./iceweasel/Dockerfile shows a way to dockerize a common multimedia application 12 | -------------------------------------------------------------------------------- /contrib/host-integration/Dockerfile.min: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | MAINTAINER Guillaume J. Charmes 3 | ADD manager /usr/bin/ 4 | ENTRYPOINT ["/usr/bin/manager"] 5 | -------------------------------------------------------------------------------- /contrib/host-integration/manager/systemd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | cid="$1" 5 | auth="$2" 6 | desc="$3" 7 | 8 | cat <<-EOF 9 | [Unit] 10 | Description=$desc 11 | Author=$auth 12 | After=docker.service 13 | 14 | [Service] 15 | ExecStart=/usr/bin/docker start -a $cid 16 | ExecStop=/usr/bin/docker stop -t 2 $cid 17 | 18 | [Install] 19 | WantedBy=local.target 20 | EOF 21 | -------------------------------------------------------------------------------- /contrib/host-integration/manager/upstart: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | cid="$1" 5 | auth="$2" 6 | desc="$3" 7 | 8 | cat <<-EOF 9 | description "$(echo "$desc" | sed 's/"/\\"/g')" 10 | author "$(echo "$auth" | sed 's/"/\\"/g')" 11 | start on filesystem and started lxc-net and started docker 12 | stop on runlevel [!2345] 13 | respawn 14 | exec /usr/bin/docker start -a "$cid" 15 | EOF 16 | -------------------------------------------------------------------------------- /contrib/init/openrc/docker.confd: -------------------------------------------------------------------------------- 1 | # /etc/conf.d/docker: config file for /etc/init.d/docker 2 | 3 | # where the docker daemon output gets piped 4 | #DOCKER_LOGFILE="/var/log/docker.log" 5 | 6 | # where docker's pid get stored 7 | #DOCKER_PIDFILE="/run/docker.pid" 8 | 9 | # where the docker daemon itself is run from 10 | #DOCKER_BINARY="/usr/bin/docker" 11 | 12 | # any other random options you want to pass to docker 13 | DOCKER_OPTS="" 14 | -------------------------------------------------------------------------------- /contrib/init/systemd/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Lokesh Mandvekar (@lsm5) 2 | Brandon Philips (@philips) 3 | -------------------------------------------------------------------------------- /contrib/init/systemd/docker.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Docker Application Container Engine 3 | Documentation=http://docs.docker.com 4 | After=network.target docker.socket 5 | Requires=docker.socket 6 | 7 | [Service] 8 | ExecStart=/usr/bin/docker -d -H fd:// 9 | LimitNOFILE=1048576 10 | LimitNPROC=1048576 11 | 12 | [Install] 13 | Also=docker.socket 14 | -------------------------------------------------------------------------------- /contrib/init/systemd/docker.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Docker Socket for the API 3 | 4 | [Socket] 5 | ListenStream=/var/run/docker.sock 6 | SocketMode=0660 7 | SocketUser=root 8 | SocketGroup=docker 9 | 10 | [Install] 11 | WantedBy=sockets.target 12 | -------------------------------------------------------------------------------- /contrib/init/sysvinit-debian/docker.default: -------------------------------------------------------------------------------- 1 | # Docker Upstart and SysVinit configuration file 2 | 3 | # Customize location of Docker binary (especially for development testing). 4 | #DOCKER="/usr/local/bin/docker" 5 | 6 | # Use DOCKER_OPTS to modify the daemon startup options. 7 | #DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4" 8 | 9 | # If you need Docker to use an HTTP proxy, it can also be specified here. 10 | #export http_proxy="http://127.0.0.1:3128/" 11 | 12 | # This is also a handy place to tweak where Docker's temporary files go. 13 | #export TMPDIR="/mnt/bigdrive/docker-tmp" 14 | -------------------------------------------------------------------------------- /contrib/init/sysvinit-redhat/docker.sysconfig: -------------------------------------------------------------------------------- 1 | # /etc/sysconfig/docker 2 | # 3 | # Other arguments to pass to the docker daemon process 4 | # These will be parsed by the sysv initscript and appended 5 | # to the arguments list passed to docker -d 6 | 7 | other_args="" 8 | -------------------------------------------------------------------------------- /contrib/mkimage/.febootstrap-minimize: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | rootfsDir="$1" 5 | shift 6 | 7 | ( 8 | cd "$rootfsDir" 9 | 10 | # effectively: febootstrap-minimize --keep-zoneinfo --keep-rpmdb --keep-services "$target" 11 | # locales 12 | rm -rf usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive} 13 | # docs 14 | rm -rf usr/share/{man,doc,info,gnome/help} 15 | # cracklib 16 | rm -rf usr/share/cracklib 17 | # i18n 18 | rm -rf usr/share/i18n 19 | # yum cache 20 | rm -rf var/cache/yum 21 | mkdir -p --mode=0755 var/cache/yum 22 | # sln 23 | rm -rf sbin/sln 24 | # ldconfig 25 | #rm -rf sbin/ldconfig 26 | rm -rf etc/ld.so.cache var/cache/ldconfig 27 | mkdir -p --mode=0755 var/cache/ldconfig 28 | ) 29 | -------------------------------------------------------------------------------- /contrib/mkimage/rinse: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | rootfsDir="$1" 5 | shift 6 | 7 | # specifying --arch below is safe because "$@" can override it and the "latest" one wins :) 8 | 9 | ( 10 | set -x 11 | rinse --directory "$rootfsDir" --arch amd64 "$@" 12 | ) 13 | 14 | "$(dirname "$BASH_SOURCE")/.febootstrap-minimize" "$rootfsDir" 15 | 16 | if [ -d "$rootfsDir/etc/sysconfig" ]; then 17 | # allow networking init scripts inside the container to work without extra steps 18 | echo 'NETWORKING=yes' > "$rootfsDir/etc/sysconfig/network" 19 | fi 20 | 21 | # make sure we're fully up-to-date, too 22 | ( 23 | set -x 24 | chroot "$rootfsDir" yum update -y 25 | ) 26 | -------------------------------------------------------------------------------- /contrib/syntax/textmate/Docker.tmbundle/Preferences/Dockerfile.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Comments 7 | scope 8 | source.dockerfile 9 | settings 10 | 11 | shellVariables 12 | 13 | 14 | name 15 | TM_COMMENT_START 16 | value 17 | # 18 | 19 | 20 | 21 | uuid 22 | 2B215AC0-A7F3-4090-9FF6-F4842BD56CA7 23 | 24 | 25 | -------------------------------------------------------------------------------- /contrib/syntax/textmate/Docker.tmbundle/info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | contactEmailRot13 6 | germ@andz.com.ar 7 | contactName 8 | GermanDZ 9 | description 10 | Helpers for Docker. 11 | name 12 | Docker 13 | uuid 14 | 8B9DDBAF-E65C-4E12-FFA7-467D4AA535B1 15 | 16 | 17 | -------------------------------------------------------------------------------- /contrib/syntax/textmate/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Asbjorn Enge (@asbjornenge) 2 | -------------------------------------------------------------------------------- /contrib/syntax/textmate/README.md: -------------------------------------------------------------------------------- 1 | # Docker.tmbundle 2 | 3 | Dockerfile syntaxt highlighting for TextMate and Sublime Text. 4 | 5 | ## Install 6 | 7 | ### Sublime Text 8 | 9 | Available for Sublime Text under [package control](https://sublime.wbond.net/packages/Dockerfile%20Syntax%20Highlighting). 10 | Search for *Dockerfile Syntax Highlighting* 11 | 12 | ### TextMate 2 13 | 14 | Copy the directory `Docker.tmbundle` (showed as a Package in OSX) to `~/Library/Application Support/TextMate/Managed/Bundles` 15 | 16 | enjoy. 17 | -------------------------------------------------------------------------------- /contrib/syntax/vim/README.md: -------------------------------------------------------------------------------- 1 | dockerfile.vim 2 | ============== 3 | 4 | Syntax highlighting for Dockerfiles 5 | 6 | Installation 7 | ------------ 8 | 9 | Via pathogen, the usual way... 10 | 11 | Features 12 | -------- 13 | 14 | The syntax highlighting includes: 15 | 16 | * The directives (e.g. `FROM`) 17 | * Strings 18 | * Comments 19 | 20 | License 21 | ------- 22 | 23 | BSD, short and sweet 24 | -------------------------------------------------------------------------------- /contrib/syntax/vim/doc/dockerfile.txt: -------------------------------------------------------------------------------- 1 | *dockerfile.txt* Syntax highlighting for Dockerfiles 2 | 3 | Author: Honza Pokorny 4 | License: BSD 5 | 6 | INSTALLATION *installation* 7 | 8 | Drop it on your Pathogen path and you're all set. 9 | 10 | FEATURES *features* 11 | 12 | The syntax highlighting includes: 13 | 14 | * The directives (e.g. FROM) 15 | * Strings 16 | * Comments 17 | 18 | vim:tw=78:et:ft=help:norl: 19 | -------------------------------------------------------------------------------- /contrib/syntax/vim/ftdetect/dockerfile.vim: -------------------------------------------------------------------------------- 1 | au BufNewFile,BufRead Dockerfile set filetype=dockerfile 2 | -------------------------------------------------------------------------------- /contrib/syntax/vim/syntax/dockerfile.vim: -------------------------------------------------------------------------------- 1 | " dockerfile.vim - Syntax highlighting for Dockerfiles 2 | " Maintainer: Honza Pokorny 3 | " Version: 0.5 4 | 5 | 6 | if exists("b:current_syntax") 7 | finish 8 | endif 9 | 10 | let b:current_syntax = "dockerfile" 11 | 12 | syntax case ignore 13 | 14 | syntax match dockerfileKeyword /\v^\s*(ONBUILD\s+)?(ADD|CMD|ENTRYPOINT|ENV|EXPOSE|FROM|MAINTAINER|RUN|USER|VOLUME|WORKDIR|COPY)\s/ 15 | highlight link dockerfileKeyword Keyword 16 | 17 | syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/ 18 | highlight link dockerfileString String 19 | 20 | syntax match dockerfileComment "\v^\s*#.*$" 21 | highlight link dockerfileComment Comment 22 | 23 | set commentstring=#\ %s 24 | -------------------------------------------------------------------------------- /contrib/udev/80-docker.rules: -------------------------------------------------------------------------------- 1 | # hide docker's loopback devices from udisks, and thus from user desktops 2 | SUBSYSTEM=="block", ENV{DM_NAME}=="docker-*", ENV{UDISKS_PRESENTATION_HIDE}="1", ENV{UDISKS_IGNORE}="1" 3 | SUBSYSTEM=="block", DEVPATH=="/devices/virtual/block/loop*", ATTR{loop/backing_file}=="/var/lib/docker/*", ENV{UDISKS_PRESENTATION_HIDE}="1", ENV{UDISKS_IGNORE}="1" 4 | -------------------------------------------------------------------------------- /daemon/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes (@shykes) 2 | Victor Vieux (@vieux) 3 | Michael Crosby (@crosbymichael) 4 | Cristian Staretu (@unclejack) 5 | Tibor Vass (@tiborvass) 6 | volumes.go: Brian Goff (@cpuguy83) 7 | -------------------------------------------------------------------------------- /daemon/README.md: -------------------------------------------------------------------------------- 1 | This directory contains code pertaining to running containers and storing images 2 | 3 | Code pertaining to running containers: 4 | 5 | - execdriver 6 | - networkdriver 7 | 8 | Code pertaining to storing images: 9 | 10 | - graphdriver 11 | -------------------------------------------------------------------------------- /daemon/copy.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/docker/docker/engine" 7 | ) 8 | 9 | func (daemon *Daemon) ContainerCopy(job *engine.Job) engine.Status { 10 | if len(job.Args) != 2 { 11 | return job.Errorf("Usage: %s CONTAINER RESOURCE\n", job.Name) 12 | } 13 | 14 | var ( 15 | name = job.Args[0] 16 | resource = job.Args[1] 17 | ) 18 | 19 | if container := daemon.Get(name); container != nil { 20 | 21 | data, err := container.Copy(resource) 22 | if err != nil { 23 | return job.Error(err) 24 | } 25 | defer data.Close() 26 | 27 | if _, err := io.Copy(job.Stdout, data); err != nil { 28 | return job.Error(err) 29 | } 30 | return engine.StatusOK 31 | } 32 | return job.Errorf("No such container: %s", name) 33 | } 34 | -------------------------------------------------------------------------------- /daemon/daemon_aufs.go: -------------------------------------------------------------------------------- 1 | // +build !exclude_graphdriver_aufs 2 | 3 | package daemon 4 | 5 | import ( 6 | "github.com/docker/docker/daemon/graphdriver" 7 | "github.com/docker/docker/daemon/graphdriver/aufs" 8 | "github.com/docker/docker/graph" 9 | "github.com/docker/docker/pkg/log" 10 | ) 11 | 12 | // Given the graphdriver ad, if it is aufs, then migrate it. 13 | // If aufs driver is not built, this func is a noop. 14 | func migrateIfAufs(driver graphdriver.Driver, root string) error { 15 | if ad, ok := driver.(*aufs.Driver); ok { 16 | log.Debugf("Migrating existing containers") 17 | if err := ad.Migrate(root, graph.SetupInitLayer); err != nil { 18 | return err 19 | } 20 | } 21 | return nil 22 | } 23 | -------------------------------------------------------------------------------- /daemon/daemon_btrfs.go: -------------------------------------------------------------------------------- 1 | // +build !exclude_graphdriver_btrfs 2 | 3 | package daemon 4 | 5 | import ( 6 | _ "github.com/docker/docker/daemon/graphdriver/btrfs" 7 | ) 8 | -------------------------------------------------------------------------------- /daemon/daemon_devicemapper.go: -------------------------------------------------------------------------------- 1 | // +build !exclude_graphdriver_devicemapper 2 | 3 | package daemon 4 | 5 | import ( 6 | _ "github.com/docker/docker/daemon/graphdriver/devmapper" 7 | ) 8 | -------------------------------------------------------------------------------- /daemon/daemon_no_aufs.go: -------------------------------------------------------------------------------- 1 | // +build exclude_graphdriver_aufs 2 | 3 | package daemon 4 | 5 | import ( 6 | "github.com/docker/docker/daemon/graphdriver" 7 | ) 8 | 9 | func migrateIfAufs(driver graphdriver.Driver, root string) error { 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /daemon/execdriver/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Michael Crosby (@crosbymichael) 2 | Victor Vieux (@vieux) 3 | -------------------------------------------------------------------------------- /daemon/execdriver/lxc/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Dinesh Subhraveti (@dineshs-altiscale) 2 | -------------------------------------------------------------------------------- /daemon/execdriver/lxc/info_test.go: -------------------------------------------------------------------------------- 1 | package lxc 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestParseRunningInfo(t *testing.T) { 8 | raw := ` 9 | state: RUNNING 10 | pid: 50` 11 | 12 | info, err := parseLxcInfo(raw) 13 | if err != nil { 14 | t.Fatal(err) 15 | } 16 | if !info.Running { 17 | t.Fatal("info should return a running state") 18 | } 19 | if info.Pid != 50 { 20 | t.Fatalf("info should have pid 50 got %d", info.Pid) 21 | } 22 | } 23 | 24 | func TestEmptyInfo(t *testing.T) { 25 | _, err := parseLxcInfo("") 26 | if err == nil { 27 | t.Fatal("error should not be nil") 28 | } 29 | } 30 | 31 | func TestBadInfo(t *testing.T) { 32 | _, err := parseLxcInfo("state") 33 | if err != nil { 34 | t.Fatal(err) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /daemon/execdriver/lxc/lxc_init_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package lxc 4 | 5 | import "github.com/docker/docker/daemon/execdriver" 6 | 7 | func setHostname(hostname string) error { 8 | panic("Not supported on darwin") 9 | } 10 | 11 | func finalizeNamespace(args *execdriver.InitArgs) error { 12 | panic("Not supported on darwin") 13 | } 14 | -------------------------------------------------------------------------------- /daemon/execdriver/native/driver_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package native 4 | 5 | import ( 6 | "fmt" 7 | 8 | "github.com/docker/docker/daemon/execdriver" 9 | ) 10 | 11 | func NewDriver(root, initPath string) (execdriver.Driver, error) { 12 | return nil, fmt.Errorf("native driver not supported on non-linux") 13 | } 14 | -------------------------------------------------------------------------------- /daemon/execdriver/native/driver_unsupported_nocgo.go: -------------------------------------------------------------------------------- 1 | // +build linux,!cgo 2 | 3 | package native 4 | 5 | import ( 6 | "fmt" 7 | 8 | "github.com/docker/docker/daemon/execdriver" 9 | ) 10 | 11 | func NewDriver(root, initPath string) (execdriver.Driver, error) { 12 | return nil, fmt.Errorf("native driver not supported on non-linux") 13 | } 14 | -------------------------------------------------------------------------------- /daemon/execdriver/native/info.go: -------------------------------------------------------------------------------- 1 | // +build linux,cgo 2 | 3 | package native 4 | 5 | import ( 6 | "os" 7 | "path/filepath" 8 | 9 | "github.com/docker/libcontainer" 10 | ) 11 | 12 | type info struct { 13 | ID string 14 | driver *driver 15 | } 16 | 17 | // IsRunning is determined by looking for the 18 | // pid file for a container. If the file exists then the 19 | // container is currently running 20 | func (i *info) IsRunning() bool { 21 | if _, err := libcontainer.GetState(filepath.Join(i.driver.root, i.ID)); err == nil { 22 | return true 23 | } 24 | // TODO: Remove this part for version 1.2.0 25 | // This is added only to ensure smooth upgrades from pre 1.1.0 to 1.1.0 26 | if _, err := os.Stat(filepath.Join(i.driver.root, i.ID, "pid")); err == nil { 27 | return true 28 | } 29 | return false 30 | } 31 | -------------------------------------------------------------------------------- /daemon/execdriver/pipes.go: -------------------------------------------------------------------------------- 1 | package execdriver 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | // Pipes is a wrapper around a containers output for 8 | // stdin, stdout, stderr 9 | type Pipes struct { 10 | Stdin io.ReadCloser 11 | Stdout, Stderr io.Writer 12 | } 13 | 14 | func NewPipes(stdin io.ReadCloser, stdout, stderr io.Writer, useStdin bool) *Pipes { 15 | p := &Pipes{ 16 | Stdout: stdout, 17 | Stderr: stderr, 18 | } 19 | if useStdin { 20 | p.Stdin = stdin 21 | } 22 | return p 23 | } 24 | -------------------------------------------------------------------------------- /daemon/graphdriver/aufs/mount.go: -------------------------------------------------------------------------------- 1 | package aufs 2 | 3 | import ( 4 | "os/exec" 5 | "syscall" 6 | 7 | "github.com/docker/docker/pkg/log" 8 | ) 9 | 10 | func Unmount(target string) error { 11 | if err := exec.Command("auplink", target, "flush").Run(); err != nil { 12 | log.Errorf("[warning]: couldn't run auplink before unmount: %s", err) 13 | } 14 | if err := syscall.Unmount(target, 0); err != nil { 15 | return err 16 | } 17 | return nil 18 | } 19 | -------------------------------------------------------------------------------- /daemon/graphdriver/aufs/mount_linux.go: -------------------------------------------------------------------------------- 1 | package aufs 2 | 3 | import "syscall" 4 | 5 | const MsRemount = syscall.MS_REMOUNT 6 | 7 | func mount(source string, target string, fstype string, flags uintptr, data string) error { 8 | return syscall.Mount(source, target, fstype, flags, data) 9 | } 10 | -------------------------------------------------------------------------------- /daemon/graphdriver/aufs/mount_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package aufs 4 | 5 | import "errors" 6 | 7 | const MsRemount = 0 8 | 9 | func mount(source string, target string, fstype string, flags uintptr, data string) (err error) { 10 | return errors.New("mount is not implemented on darwin") 11 | } 12 | -------------------------------------------------------------------------------- /daemon/graphdriver/btrfs/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Alexander Larsson (@alexlarsson) 2 | -------------------------------------------------------------------------------- /daemon/graphdriver/btrfs/btrfs_test.go: -------------------------------------------------------------------------------- 1 | package btrfs 2 | 3 | import ( 4 | "github.com/docker/docker/daemon/graphdriver/graphtest" 5 | "testing" 6 | ) 7 | 8 | // This avoids creating a new driver for each test if all tests are run 9 | // Make sure to put new tests between TestBtrfsSetup and TestBtrfsTeardown 10 | func TestBtrfsSetup(t *testing.T) { 11 | graphtest.GetDriver(t, "btrfs") 12 | } 13 | 14 | func TestBtrfsCreateEmpty(t *testing.T) { 15 | graphtest.DriverTestCreateEmpty(t, "btrfs") 16 | } 17 | 18 | func TestBtrfsCreateBase(t *testing.T) { 19 | graphtest.DriverTestCreateBase(t, "btrfs") 20 | } 21 | 22 | func TestBtrfsCreateSnap(t *testing.T) { 23 | graphtest.DriverTestCreateSnap(t, "btrfs") 24 | } 25 | 26 | func TestBtrfsTeardown(t *testing.T) { 27 | graphtest.PutDriver(t) 28 | } 29 | -------------------------------------------------------------------------------- /daemon/graphdriver/btrfs/dummy_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux !cgo 2 | 3 | package btrfs 4 | -------------------------------------------------------------------------------- /daemon/graphdriver/devmapper/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Alexander Larsson (@alexlarsson) 2 | -------------------------------------------------------------------------------- /daemon/graphdriver/vfs/vfs_test.go: -------------------------------------------------------------------------------- 1 | package vfs 2 | 3 | import ( 4 | "github.com/docker/docker/daemon/graphdriver/graphtest" 5 | "testing" 6 | ) 7 | 8 | // This avoids creating a new driver for each test if all tests are run 9 | // Make sure to put new tests between TestVfsSetup and TestVfsTeardown 10 | func TestVfsSetup(t *testing.T) { 11 | graphtest.GetDriver(t, "vfs") 12 | } 13 | 14 | func TestVfsCreateEmpty(t *testing.T) { 15 | graphtest.DriverTestCreateEmpty(t, "vfs") 16 | } 17 | 18 | func TestVfsCreateBase(t *testing.T) { 19 | graphtest.DriverTestCreateBase(t, "vfs") 20 | } 21 | 22 | func TestVfsCreateSnap(t *testing.T) { 23 | graphtest.DriverTestCreateSnap(t, "vfs") 24 | } 25 | 26 | func TestVfsTeardown(t *testing.T) { 27 | graphtest.PutDriver(t) 28 | } 29 | -------------------------------------------------------------------------------- /daemon/history.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "sort" 5 | ) 6 | 7 | // History is a convenience type for storing a list of containers, 8 | // ordered by creation date. 9 | type History []*Container 10 | 11 | func (history *History) Len() int { 12 | return len(*history) 13 | } 14 | 15 | func (history *History) Less(i, j int) bool { 16 | containers := *history 17 | return containers[j].Created.Before(containers[i].Created) 18 | } 19 | 20 | func (history *History) Swap(i, j int) { 21 | containers := *history 22 | tmp := containers[i] 23 | containers[i] = containers[j] 24 | containers[j] = tmp 25 | } 26 | 27 | func (history *History) Add(container *Container) { 28 | *history = append(*history, container) 29 | } 30 | 31 | func (history *History) Sort() { 32 | sort.Sort(history) 33 | } 34 | -------------------------------------------------------------------------------- /daemon/networkdriver/network.go: -------------------------------------------------------------------------------- 1 | package networkdriver 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | ErrNetworkOverlapsWithNameservers = errors.New("requested network overlaps with nameserver") 9 | ErrNetworkOverlaps = errors.New("requested network overlaps with existing network") 10 | ) 11 | -------------------------------------------------------------------------------- /daemon/networkdriver/portmapper/mock_proxy.go: -------------------------------------------------------------------------------- 1 | package portmapper 2 | 3 | import "net" 4 | 5 | func NewMockProxyCommand(proto string, hostIP net.IP, hostPort int, containerIP net.IP, containerPort int) UserlandProxy { 6 | return &mockProxyCommand{} 7 | } 8 | 9 | type mockProxyCommand struct { 10 | } 11 | 12 | func (p *mockProxyCommand) Start() error { 13 | return nil 14 | } 15 | 16 | func (p *mockProxyCommand) Stop() error { 17 | return nil 18 | } 19 | -------------------------------------------------------------------------------- /daemon/resize.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "strconv" 5 | 6 | "github.com/docker/docker/engine" 7 | ) 8 | 9 | func (daemon *Daemon) ContainerResize(job *engine.Job) engine.Status { 10 | if len(job.Args) != 3 { 11 | return job.Errorf("Not enough arguments. Usage: %s CONTAINER HEIGHT WIDTH\n", job.Name) 12 | } 13 | name := job.Args[0] 14 | height, err := strconv.Atoi(job.Args[1]) 15 | if err != nil { 16 | return job.Error(err) 17 | } 18 | width, err := strconv.Atoi(job.Args[2]) 19 | if err != nil { 20 | return job.Error(err) 21 | } 22 | if container := daemon.Get(name); container != nil { 23 | if err := container.Resize(height, width); err != nil { 24 | return job.Error(err) 25 | } 26 | return engine.StatusOK 27 | } 28 | return job.Errorf("No such container: %s", name) 29 | } 30 | -------------------------------------------------------------------------------- /daemon/restart.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "github.com/docker/docker/engine" 5 | ) 6 | 7 | func (daemon *Daemon) ContainerRestart(job *engine.Job) engine.Status { 8 | if len(job.Args) != 1 { 9 | return job.Errorf("Usage: %s CONTAINER\n", job.Name) 10 | } 11 | var ( 12 | name = job.Args[0] 13 | t = 10 14 | ) 15 | if job.EnvExists("t") { 16 | t = job.GetenvInt("t") 17 | } 18 | if container := daemon.Get(name); container != nil { 19 | if err := container.Restart(int(t)); err != nil { 20 | return job.Errorf("Cannot restart container %s: %s\n", name, err) 21 | } 22 | container.LogEvent("restart") 23 | } else { 24 | return job.Errorf("No such container: %s\n", name) 25 | } 26 | return engine.StatusOK 27 | } 28 | -------------------------------------------------------------------------------- /daemon/utils_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package daemon 4 | 5 | import "github.com/docker/libcontainer/selinux" 6 | 7 | func selinuxSetDisabled() { 8 | selinux.SetDisabled() 9 | } 10 | 11 | func selinuxFreeLxcContexts(label string) { 12 | selinux.FreeLxcContexts(label) 13 | } 14 | -------------------------------------------------------------------------------- /daemon/utils_nolinux.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package daemon 4 | 5 | func selinuxSetDisabled() { 6 | } 7 | 8 | func selinuxFreeLxcContexts(label string) { 9 | } 10 | -------------------------------------------------------------------------------- /daemon/utils_test.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/docker/runconfig" 7 | "github.com/docker/docker/utils" 8 | ) 9 | 10 | func TestMergeLxcConfig(t *testing.T) { 11 | var ( 12 | hostConfig = &runconfig.HostConfig{ 13 | LxcConf: []utils.KeyValuePair{ 14 | {Key: "lxc.cgroups.cpuset", Value: "1,2"}, 15 | }, 16 | } 17 | driverConfig = make(map[string][]string) 18 | ) 19 | 20 | mergeLxcConfIntoOptions(hostConfig, driverConfig) 21 | if l := len(driverConfig["lxc"]); l > 1 { 22 | t.Fatalf("expected lxc options len of 1 got %d", l) 23 | } 24 | 25 | cpuset := driverConfig["lxc"][0] 26 | if expected := "cgroups.cpuset=1,2"; cpuset != expected { 27 | t.Fatalf("expected %s got %s", expected, cpuset) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /daemon/wait.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/docker/docker/engine" 7 | ) 8 | 9 | func (daemon *Daemon) ContainerWait(job *engine.Job) engine.Status { 10 | if len(job.Args) != 1 { 11 | return job.Errorf("Usage: %s", job.Name) 12 | } 13 | name := job.Args[0] 14 | if container := daemon.Get(name); container != nil { 15 | status, _ := container.State.WaitStop(-1 * time.Second) 16 | job.Printf("%d\n", status) 17 | return engine.StatusOK 18 | } 19 | return job.Errorf("%s: no such container: %s", job.Name, name) 20 | } 21 | -------------------------------------------------------------------------------- /docker/README.md: -------------------------------------------------------------------------------- 1 | docker.go contains Docker's main function. 2 | 3 | This file provides first line CLI argument parsing and environment variable setting. 4 | -------------------------------------------------------------------------------- /docker/client.go: -------------------------------------------------------------------------------- 1 | // +build !daemon 2 | 3 | package main 4 | 5 | import ( 6 | "log" 7 | ) 8 | 9 | const CanDaemon = false 10 | 11 | func mainDaemon() { 12 | log.Fatal("This is a client-only binary - running the Docker daemon is not supported.") 13 | } 14 | -------------------------------------------------------------------------------- /dockerinit/dockerinit.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | _ "github.com/docker/docker/daemon/execdriver/lxc" 5 | _ "github.com/docker/docker/daemon/execdriver/native" 6 | "github.com/docker/docker/reexec" 7 | ) 8 | 9 | func main() { 10 | // Running in init mode 11 | reexec.Init() 12 | } 13 | -------------------------------------------------------------------------------- /dockerversion/dockerversion.go: -------------------------------------------------------------------------------- 1 | package dockerversion 2 | 3 | // FIXME: this should be embedded in the docker/docker.go, 4 | // but we can't because distro policy requires us to 5 | // package a separate dockerinit binary, and that binary needs 6 | // to know its version too. 7 | 8 | var ( 9 | GITCOMMIT string 10 | VERSION string 11 | 12 | IAMSTATIC bool // whether or not Docker itself was compiled statically via ./hack/make.sh binary 13 | INITSHA1 string // sha1sum of separate static dockerinit, if Docker itself was compiled dynamically via ./hack/make.sh dynbinary 14 | INITPATH string // custom location to search for a valid dockerinit binary (available for packagers as a last resort escape hatch) 15 | ) 16 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | # generated by man/man/md2man-all.sh 2 | man1/ 3 | man5/ 4 | # avoid commiting the awsconfig file used for releases 5 | awsconfig 6 | -------------------------------------------------------------------------------- /docs/MAINTAINERS: -------------------------------------------------------------------------------- 1 | James Turnbull (@jamtur01) 2 | Sven Dowideit (@SvenDowideit) 3 | O.S. Tezer (@OSTezer) 4 | Fred Lifton (@fredlf) 5 | -------------------------------------------------------------------------------- /docs/man/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.3 2 | RUN mkdir -p /go/src/github.com/cpuguy83 3 | RUN mkdir -p /go/src/github.com/cpuguy83 \ 4 | && git clone -b v1 https://github.com/cpuguy83/go-md2man.git /go/src/github.com/cpuguy83/go-md2man \ 5 | && cd /go/src/github.com/cpuguy83/go-md2man \ 6 | && go get -v ./... 7 | CMD ["/go/bin/go-md2man", "--help"] 8 | -------------------------------------------------------------------------------- /docs/man/docker-kill.1.md: -------------------------------------------------------------------------------- 1 | % DOCKER(1) Docker User Manuals 2 | % Docker Community 3 | % JUNE 2014 4 | # NAME 5 | docker-kill - Kill a running container using SIGKILL or a specified signal 6 | 7 | # SYNOPSIS 8 | **docker kill** 9 | [**-s**|**--signal**[=*"KILL"*]] 10 | CONTAINER [CONTAINER...] 11 | 12 | # DESCRIPTION 13 | 14 | The main process inside each container specified will be sent SIGKILL, 15 | or any signal specified with option --signal. 16 | 17 | # OPTIONS 18 | **-s**, **--signal**="KILL" 19 | Signal to send to the container 20 | 21 | # HISTORY 22 | April 2014, Originally compiled by William Henry (whenry at redhat dot com) 23 | based on docker.com source material and internal work. 24 | June 2014, updated by Sven Dowideit 25 | -------------------------------------------------------------------------------- /docs/man/docker-port.1.md: -------------------------------------------------------------------------------- 1 | % DOCKER(1) Docker User Manuals 2 | % Docker Community 3 | % JUNE 2014 4 | # NAME 5 | docker-port - Lookup the public-facing port that is NAT-ed to PRIVATE_PORT 6 | 7 | # SYNOPSIS 8 | **docker port** 9 | CONTAINER PRIVATE_PORT 10 | 11 | # OPTIONS 12 | There are no available options. 13 | 14 | # HISTORY 15 | April 2014, Originally compiled by William Henry (whenry at redhat dot com) 16 | June 2014, updated by Sven Dowideit 17 | -------------------------------------------------------------------------------- /docs/man/docker-restart.1.md: -------------------------------------------------------------------------------- 1 | % DOCKER(1) Docker User Manuals 2 | % Docker Community 3 | % JUNE 2014 4 | # NAME 5 | docker-restart - Restart a running container 6 | 7 | # SYNOPSIS 8 | **docker restart** 9 | [**-t**|**--time**[=*10*]] 10 | CONTAINER [CONTAINER...] 11 | 12 | # DESCRIPTION 13 | Restart each container listed. 14 | 15 | # OPTIONS 16 | **-t**, **--time**=10 17 | Number of seconds to try to stop for before killing the container. Once killed it will then be restarted. Default is 10 seconds. 18 | 19 | # HISTORY 20 | April 2014, Originally compiled by William Henry (whenry at redhat dot com) 21 | based on docker.com source material and internal work. 22 | June 2014, updated by Sven Dowideit 23 | -------------------------------------------------------------------------------- /docs/man/docker-stop.1.md: -------------------------------------------------------------------------------- 1 | % DOCKER(1) Docker User Manuals 2 | % Docker Community 3 | % JUNE 2014 4 | # NAME 5 | docker-stop - Stop a running container by sending SIGTERM and then SIGKILL after a grace period 6 | 7 | # SYNOPSIS 8 | **docker stop** 9 | [**-t**|**--time**[=*10*]] 10 | CONTAINER [CONTAINER...] 11 | 12 | # DESCRIPTION 13 | Stop a running container (Send SIGTERM, and then SIGKILL after 14 | grace period) 15 | 16 | # OPTIONS 17 | **-t**, **--time**=10 18 | Number of seconds to wait for the container to stop before killing it. Default is 10 seconds. 19 | 20 | # HISTORY 21 | April 2014, Originally compiled by William Henry (whenry at redhat dot com) 22 | based on docker.com source material and internal work. 23 | June 2014, updated by Sven Dowideit 24 | -------------------------------------------------------------------------------- /docs/man/docker-unpause.1.md: -------------------------------------------------------------------------------- 1 | % DOCKER(1) Docker User Manuals 2 | % Docker Community 3 | % JUNE 2014 4 | # NAME 5 | docker-unpause - Unpause all processes within a container 6 | 7 | # SYNOPSIS 8 | **docker unpause** 9 | CONTAINER 10 | 11 | # DESCRIPTION 12 | 13 | The `docker unpause` command uses the cgroups freezer to un-suspend all 14 | processes in a container. 15 | 16 | See the [cgroups freezer documentation] 17 | (https://www.kernel.org/doc/Documentation/cgroups/freezer-subsystem.txt) for 18 | further details. 19 | 20 | # OPTIONS 21 | There are no available options. 22 | 23 | # HISTORY 24 | June 2014, updated by Sven Dowideit 25 | -------------------------------------------------------------------------------- /docs/man/docker-version.1.md: -------------------------------------------------------------------------------- 1 | % DOCKER(1) Docker User Manuals 2 | % Docker Community 3 | % JUNE 2014 4 | # NAME 5 | docker-version - Show the Docker version information. 6 | 7 | # SYNOPSIS 8 | **docker version** 9 | 10 | 11 | # OPTIONS 12 | There are no available options. 13 | 14 | # HISTORY 15 | June 2014, updated by Sven Dowideit 16 | -------------------------------------------------------------------------------- /docs/man/md2man-all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # get into this script's directory 5 | cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" 6 | 7 | [ "$1" = '-q' ] || { 8 | set -x 9 | pwd 10 | } 11 | 12 | for FILE in *.md; do 13 | base="$(basename "$FILE")" 14 | name="${base%.md}" 15 | num="${name##*.}" 16 | if [ -z "$num" -o "$name" = "$num" ]; then 17 | # skip files that aren't of the format xxxx.N.md (like README.md) 18 | continue 19 | fi 20 | mkdir -p "./man${num}" 21 | go-md2man -in "$FILE" -out "./man${num}/${name}" 22 | done 23 | -------------------------------------------------------------------------------- /docs/sources/articles.md: -------------------------------------------------------------------------------- 1 | # Articles 2 | 3 | - [Docker Basics](basics/) 4 | - [Docker Security](security/) 5 | - [Running the Docker daemon with HTTPS](https/) 6 | - [Configure Networking](networking/) 7 | - [Using Supervisor with Docker](using_supervisord/) 8 | - [Process Management with CFEngine](cfengine_process_management/) 9 | - [Using Puppet](puppet/) 10 | - [Create a Base Image](baseimages/) 11 | - [Runtime Metrics](runmetrics/) 12 | - [Automatically Start Containers](host_integration/) 13 | - [Link via an Ambassador Container](ambassador_pattern_linking/) 14 | -------------------------------------------------------------------------------- /docs/sources/contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## Contents: 4 | 5 | - [Contributing to Docker](contributing/) 6 | - [Setting Up a Dev Environment](devenvironment/) 7 | 8 | -------------------------------------------------------------------------------- /docs/sources/docker-hub/groups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/docker-hub/groups.png -------------------------------------------------------------------------------- /docs/sources/docker-hub/home.md: -------------------------------------------------------------------------------- 1 | page_title: The Docker Hub Registry Help 2 | page_description: The Docker Registry help documentation home 3 | page_keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation 4 | 5 | # The Docker Hub Registry Help 6 | 7 | ## Introduction 8 | 9 | For your questions about the [Docker Hub](https://hub.docker.com) registry you 10 | can use [this documentation](docs.md). 11 | 12 | If you can not find something you are looking for, please feel free to 13 | [contact us](https://docker.com/resources/support/). 14 | -------------------------------------------------------------------------------- /docs/sources/docker-hub/hub-images/bb_hooks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/docker-hub/hub-images/bb_hooks.png -------------------------------------------------------------------------------- /docs/sources/docker-hub/hub-images/bb_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/docker-hub/hub-images/bb_menu.png -------------------------------------------------------------------------------- /docs/sources/docker-hub/hub-images/bb_post-hook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/docker-hub/hub-images/bb_post-hook.png -------------------------------------------------------------------------------- /docs/sources/docker-hub/hub-images/deploy_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/docker-hub/hub-images/deploy_key.png -------------------------------------------------------------------------------- /docs/sources/docker-hub/hub-images/gh_docker-service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/docker-hub/hub-images/gh_docker-service.png -------------------------------------------------------------------------------- /docs/sources/docker-hub/hub-images/gh_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/docker-hub/hub-images/gh_menu.png -------------------------------------------------------------------------------- /docs/sources/docker-hub/hub-images/gh_service_hook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/docker-hub/hub-images/gh_service_hook.png -------------------------------------------------------------------------------- /docs/sources/docker-hub/hub-images/gh_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/docker-hub/hub-images/gh_settings.png -------------------------------------------------------------------------------- /docs/sources/docker-hub/hub-images/github_deploy_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/docker-hub/hub-images/github_deploy_key.png -------------------------------------------------------------------------------- /docs/sources/docker-hub/hub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/docker-hub/hub.png -------------------------------------------------------------------------------- /docs/sources/docker-hub/orgs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/docker-hub/orgs.png -------------------------------------------------------------------------------- /docs/sources/docker-hub/repos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/docker-hub/repos.png -------------------------------------------------------------------------------- /docs/sources/examples.md: -------------------------------------------------------------------------------- 1 | # Examples 2 | 3 | - [Dockerizing a Node.js Web App](nodejs_web_app/) 4 | - [Dockerizing a Redis Service](running_redis_service/) 5 | - [Dockerizing an SSH Daemon Service](running_ssh_service/) 6 | - [Dockerizing a CouchDB Service](couchdb_data_volumes/) 7 | - [Dockerizing a PostgreSQL Service](postgresql_service/) 8 | - [Dockerizing MongoDB](mongodb/) 9 | - [Dockerizing a Riak Service](running_riak_service/) 10 | -------------------------------------------------------------------------------- /docs/sources/examples/apt-cacher-ng.Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # Build: docker build -t apt-cacher . 3 | # Run: docker run -d -p 3142:3142 --name apt-cacher-run apt-cacher 4 | # 5 | # and then you can run containers with: 6 | # docker run -t -i --rm -e http_proxy http://dockerhost:3142/ debian bash 7 | # 8 | FROM ubuntu 9 | MAINTAINER SvenDowideit@docker.com 10 | 11 | VOLUME ["/var/cache/apt-cacher-ng"] 12 | RUN apt-get update && apt-get install -y apt-cacher-ng 13 | 14 | EXPOSE 3142 15 | CMD chmod 777 /var/cache/apt-cacher-ng && /etc/init.d/apt-cacher-ng start && tail -f /var/log/apt-cacher-ng/* 16 | -------------------------------------------------------------------------------- /docs/sources/examples/running_ssh_service.Dockerfile: -------------------------------------------------------------------------------- 1 | # sshd 2 | # 3 | # VERSION 0.0.1 4 | 5 | FROM ubuntu:12.04 6 | MAINTAINER Thatcher R. Peskens "thatcher@dotcloud.com" 7 | 8 | RUN apt-get update && apt-get install -y openssh-server 9 | RUN mkdir /var/run/sshd 10 | RUN echo 'root:screencast' |chpasswd 11 | 12 | EXPOSE 22 13 | CMD ["/usr/sbin/sshd", "-D"] 14 | -------------------------------------------------------------------------------- /docs/sources/genindex.md: -------------------------------------------------------------------------------- 1 | # Index 2 | -------------------------------------------------------------------------------- /docs/sources/installation/MAINTAINERS: -------------------------------------------------------------------------------- 1 | google.md: Johan Euphrosine (@proppy) 2 | softlayer.md: Phil Jackson (@underscorephil) 3 | -------------------------------------------------------------------------------- /docs/sources/installation/images/osx-installer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/osx-installer.png -------------------------------------------------------------------------------- /docs/sources/installation/images/win/_01.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/win/_01.gif -------------------------------------------------------------------------------- /docs/sources/installation/images/win/_02.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/win/_02.gif -------------------------------------------------------------------------------- /docs/sources/installation/images/win/_06.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/win/_06.gif -------------------------------------------------------------------------------- /docs/sources/installation/images/win/cygwin.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/win/cygwin.gif -------------------------------------------------------------------------------- /docs/sources/installation/images/win/hp_bios_vm.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/win/hp_bios_vm.JPG -------------------------------------------------------------------------------- /docs/sources/installation/images/win/putty.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/win/putty.gif -------------------------------------------------------------------------------- /docs/sources/installation/images/win/putty_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/win/putty_2.gif -------------------------------------------------------------------------------- /docs/sources/installation/images/win/run_02_.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/win/run_02_.gif -------------------------------------------------------------------------------- /docs/sources/installation/images/win/run_03.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/win/run_03.gif -------------------------------------------------------------------------------- /docs/sources/installation/images/win/run_04.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/win/run_04.gif -------------------------------------------------------------------------------- /docs/sources/installation/images/win/ssh-config.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/win/ssh-config.gif -------------------------------------------------------------------------------- /docs/sources/installation/images/win/ts_go_bios.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/win/ts_go_bios.JPG -------------------------------------------------------------------------------- /docs/sources/installation/images/win/ts_no_docker.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/win/ts_no_docker.JPG -------------------------------------------------------------------------------- /docs/sources/installation/images/windows-boot2docker-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/windows-boot2docker-start.png -------------------------------------------------------------------------------- /docs/sources/installation/images/windows-installer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/installation/images/windows-installer.png -------------------------------------------------------------------------------- /docs/sources/jsearch.md: -------------------------------------------------------------------------------- 1 | # Search 2 | 3 | 7 | 8 |
9 |
10 | -------------------------------------------------------------------------------- /docs/sources/reference.md: -------------------------------------------------------------------------------- 1 | # Reference Manual 2 | 3 | ## Contents: 4 | 5 | - [Commands](commandline/) 6 | - [Dockerfile Reference](builder/) 7 | - [Docker Run Reference](run/) 8 | - [APIs](api/) 9 | 10 | -------------------------------------------------------------------------------- /docs/sources/reference/api/README.md: -------------------------------------------------------------------------------- 1 | This directory holds the authoritative specifications of APIs defined and implemented by Docker. Currently this includes: 2 | 3 | * The remote API by which a docker node can be queried over HTTP 4 | * The registry API by which a docker node can download and upload 5 | images for storage and sharing 6 | * The index search API by which a docker node can search the public 7 | index for images to download 8 | * The docker.io OAuth and accounts API which 3rd party services can 9 | use to access account information 10 | -------------------------------------------------------------------------------- /docs/sources/reference/api/_static/io_oauth_authorization_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/reference/api/_static/io_oauth_authorization_page.png -------------------------------------------------------------------------------- /docs/sources/reference/commandline/docker_images.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/reference/commandline/docker_images.gif -------------------------------------------------------------------------------- /docs/sources/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / 3 | -------------------------------------------------------------------------------- /docs/sources/search.md: -------------------------------------------------------------------------------- 1 | # Search 2 | 3 | *Please activate JavaScript to enable the search functionality.* 4 | 5 | ## How To Search 6 | 7 | From here you can search these documents. Enter your search words into 8 | the box below and click "search". Note that the search function will 9 | automatically search for all of the words. Pages containing fewer words 10 | won't appear in the result list. 11 | -------------------------------------------------------------------------------- /docs/sources/static_files/README.md: -------------------------------------------------------------------------------- 1 | Static files dir 2 | ================ 3 | 4 | Files you put in /sources/static_files/ will be copied to the web visible /_static/ 5 | 6 | Be careful not to override pre-existing static files from the template. 7 | 8 | Generally, layout related files should go in the /theme directory. 9 | 10 | If you want to add images to your particular documentation page. Just put them next to 11 | your .rst source file and reference them relatively. -------------------------------------------------------------------------------- /docs/sources/static_files/docker_pull_chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/static_files/docker_pull_chart.png -------------------------------------------------------------------------------- /docs/sources/static_files/docker_push_chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/static_files/docker_push_chart.png -------------------------------------------------------------------------------- /docs/sources/static_files/dockerlogo-v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/static_files/dockerlogo-v.png -------------------------------------------------------------------------------- /docs/sources/terms.md: -------------------------------------------------------------------------------- 1 | # Glossary 2 | 3 | *Definitions of terms used in Docker documentation.* 4 | 5 | ## Contents: 6 | 7 | - [File System](filesystem/) 8 | - [Layers](layer/) 9 | - [Image](image/) 10 | - [Container](container/) 11 | - [Registry](registry/) 12 | - [Repository](repository/) 13 | 14 | -------------------------------------------------------------------------------- /docs/sources/terms/images/docker-filesystems-busyboxrw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/terms/images/docker-filesystems-busyboxrw.png -------------------------------------------------------------------------------- /docs/sources/terms/images/docker-filesystems-debian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/terms/images/docker-filesystems-debian.png -------------------------------------------------------------------------------- /docs/sources/terms/images/docker-filesystems-debianrw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/terms/images/docker-filesystems-debianrw.png -------------------------------------------------------------------------------- /docs/sources/terms/images/docker-filesystems-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/terms/images/docker-filesystems-generic.png -------------------------------------------------------------------------------- /docs/sources/terms/images/docker-filesystems-multilayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/terms/images/docker-filesystems-multilayer.png -------------------------------------------------------------------------------- /docs/sources/terms/images/docker-filesystems-multiroot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/terms/images/docker-filesystems-multiroot.png -------------------------------------------------------------------------------- /docs/sources/terms/registry.md: -------------------------------------------------------------------------------- 1 | page_title: Registry 2 | page_description: Definition of an Registry 3 | page_keywords: containers, concepts, explanation, image, repository, container 4 | 5 | # Registry 6 | 7 | ## Introduction 8 | 9 | A Registry is a hosted service containing 10 | [*repositories*](/terms/repository/#repository-def) of 11 | [*images*](/terms/image/#image-def) which responds to the Registry API. 12 | 13 | The default registry can be accessed using a browser at 14 | [Docker Hub](https://hub.docker.com) or using the 15 | `sudo docker search` command. 16 | 17 | ## Further Reading 18 | 19 | For more information see [*Working with 20 | Repositories*](/userguide/dockerrepos/#working-with-the-repository) 21 | -------------------------------------------------------------------------------- /docs/sources/toctree.md: -------------------------------------------------------------------------------- 1 | page_title: Documentation 2 | page_description: -- todo: change me 3 | page_keywords: todo, docker, documentation, installation, usage, examples, contributing, faq, command line, concepts 4 | 5 | # Documentation 6 | 7 | This documentation has the following resources: 8 | 9 | - [Installation](../installation/) 10 | - [Use](../use/) 11 | - [Examples](../examples/) 12 | - [Reference Manual](../reference/) 13 | - [Contributing](../contributing/) 14 | - [Glossary](../terms/) 15 | - [Articles](../articles/) 16 | - [FAQ](../faq/) 17 | 18 | -------------------------------------------------------------------------------- /docs/sources/userguide/login-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/userguide/login-web.png -------------------------------------------------------------------------------- /docs/sources/userguide/register-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/userguide/register-web.png -------------------------------------------------------------------------------- /docs/sources/userguide/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/userguide/search.png -------------------------------------------------------------------------------- /docs/sources/userguide/webapp1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/sources/userguide/webapp1.png -------------------------------------------------------------------------------- /docs/theme/MAINTAINERS: -------------------------------------------------------------------------------- 1 | O.S. Tezer (@OSTezer) 2 | Thatcher Peskens (@dhrp) 3 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/autoindex.html: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | {% for nav_item in nav %} 4 | {% if nav_item.children %} 5 | ## {{ nav_item.title }} {{ nav_item.url }} 6 | 7 | {% for nav_item in nav_item.children %} 8 | - [{{ nav_item.title }}]({{ nav_item.url }}) 9 | {% endfor %} 10 | 11 | {% endif %} 12 | {% endfor %} 13 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/beta_warning.html: -------------------------------------------------------------------------------- 1 | {% if aws_bucket != "docs.docker.com" %} 2 |
3 | This is the 4 | {% if docker_version != docker_version|replace("-dev", "bingo") %}{{ docker_branch }} development branch{% else %}beta{% endif %} 5 | documentation for Docker version {{ docker_version }}. 6 | Please go to http://docs.docker.com for the current Docker release documentation. 7 |
8 | {% endif %} 9 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/css/font/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/css/font/FontAwesome.otf -------------------------------------------------------------------------------- /docs/theme/mkdocs/css/font/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/css/font/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/theme/mkdocs/css/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/css/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/theme/mkdocs/css/font/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/css/font/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/theme/mkdocs/css/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/css/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/css/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/css/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/fonts/LigatureSymbols.textClipping: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/fonts/LigatureSymbols.textClipping -------------------------------------------------------------------------------- /docs/theme/mkdocs/fonts/LigatureSymbols/LigatureSymbols-2.11.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/fonts/LigatureSymbols/LigatureSymbols-2.11.eot -------------------------------------------------------------------------------- /docs/theme/mkdocs/fonts/LigatureSymbols/LigatureSymbols-2.11.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/fonts/LigatureSymbols/LigatureSymbols-2.11.otf -------------------------------------------------------------------------------- /docs/theme/mkdocs/fonts/LigatureSymbols/LigatureSymbols-2.11.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/fonts/LigatureSymbols/LigatureSymbols-2.11.ttf -------------------------------------------------------------------------------- /docs/theme/mkdocs/fonts/LigatureSymbols/LigatureSymbols-2.11.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/fonts/LigatureSymbols/LigatureSymbols-2.11.woff -------------------------------------------------------------------------------- /docs/theme/mkdocs/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/theme/mkdocs/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/theme/mkdocs/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/theme/mkdocs/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /docs/theme/mkdocs/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /docs/theme/mkdocs/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/arrow left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | arrow left 4 | Created with Sketch (http://www.bohemiancoding.com/sketch) 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/arrow right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | arror right 4 | Created with Sketch (http://www.bohemiancoding.com/sketch) 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/docker-logo-compressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/images/docker-logo-compressed.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/docker-top-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/images/docker-top-logo.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/docker-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/images/docker-white.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/external-link-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/images/external-link-icon.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/external-link-icon.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/images/external-link-icon.psd -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/footer-links.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/images/footer-links.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/fork-us-on-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/images/fork-us-on-github.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/images/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/images/glyphicons-halflings.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/homepage-docker-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/images/homepage-docker-logo.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/page-blocks_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/images/page-blocks_03.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/page-blocks_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/images/page-blocks_05.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/page-blocks_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/images/page-blocks_07.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/social/docker_social_logos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/images/social/docker_social_logos.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/images/source_artwork/banner-frontpage-usecases.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/images/source_artwork/banner-frontpage-usecases.ai -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/favicon.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/footer/docker-blog-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/footer/docker-blog-24.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/footer/docker-blog-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/footer/docker-blog-48.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/footer/facebook-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/footer/facebook-24.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/footer/facebook-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/footer/facebook-48.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/footer/googleplus-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/footer/googleplus-24.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/footer/googleplus-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/footer/googleplus-48.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/footer/slideshare-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/footer/slideshare-24.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/footer/slideshare-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/footer/slideshare-48.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/footer/twitter-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/footer/twitter-24.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/footer/twitter-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/footer/twitter-48.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/footer/youtube-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/footer/youtube-24.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/footer/youtube-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/footer/youtube-48.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/form/check-mark-green.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/README.md: -------------------------------------------------------------------------------- 1 | ### About the images 2 | 3 | Generally the icons are created in .svg, because it is a nicer format. Then we can easily convert them to .png as required. 4 | 5 | Using imagemagick; mogrify: 6 | 7 | mogrify -background none -format png *.svg 8 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/caret-down-create-new-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/comment-simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/comment-simple.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/framed-icon-checked-repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/framed-icon-checked-repository.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/framed-icon-empty-repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/framed-icon-empty-repository.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/framed-icon-linked-repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/framed-icon-linked-repository.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/framed-icon-normal-repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/framed-icon-normal-repository.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/framed-icon-official-repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/framed-icon-official-repository.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/framed-icon-private-repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/framed-icon-private-repository.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/icon-device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/icon-device.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/icon-edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/icon-edit.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/icon-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/icon-file.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/icon-folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/icon-folder.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/icon-link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/icon-link.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/icon-minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/icon-minus.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/icon-normal-repository-frameless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/icon-normal-repository-frameless.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/icon-normal-repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/icon-normal-repository.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/icon-plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/icon-plus.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/icon-private-repository-frameless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/icon-private-repository-frameless.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/icon-private-repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/icon-private-repository.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/icon-trusted-repository-frameless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/icon-trusted-repository-frameless.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/icon-trusted-repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/icon-trusted-repository.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/official-repository-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/official-repository-icon.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/repository-icons.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/repository-icons.ai -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/star-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/icons/star-simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/icons/star-simple.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/lightbox/add-button-icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/nav/caret-down-subnav-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/nav/caret-down-user-icon-over.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/nav/caret-down-user-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/nav/docker-logo-loggedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/nav/docker-logo-loggedin.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/nav/docker-logo-loggedout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/nav/docker-logo-loggedout.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/tutorial/DockerHub-Tutorial-05.psd.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/tutorial/exit-icon-over.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/tutorial/exit-icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/universal/docker-logo-pin+@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/universal/docker-logo-pin+@2x.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/universal/docker-logo-pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/universal/docker-logo-pin.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/universal/official-repository-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/img/universal/official-repository-icon.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/img/universal/star-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/tipuesearch/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/tipuesearch/img/loader.gif -------------------------------------------------------------------------------- /docs/theme/mkdocs/tipuesearch/img/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/docs/theme/mkdocs/tipuesearch/img/search.png -------------------------------------------------------------------------------- /docs/theme/mkdocs/tipuesearch/tipuesearch_set.js: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | Tipue Search 3.1 4 | Copyright (c) 2013 Tipue 5 | Tipue Search is released under the MIT License 6 | http://www.tipue.com/search 7 | */ 8 | 9 | 10 | var tipuesearch_stop_words = ["and", "be", "by", "do", "for", "he", "how", "if", "is", "it", "my", "not", "of", "or", "the", "to", "up", "what", "when"]; 11 | 12 | var tipuesearch_replace = {"words": [ 13 | {"word": "tipua", replace_with: "tipue"}, 14 | {"word": "javscript", replace_with: "javascript"} 15 | ]}; 16 | 17 | var tipuesearch_stem = {"words": [ 18 | {"word": "e-mail", stem: "email"}, 19 | {"word": "javascript", stem: "script"}, 20 | {"word": "javascript", stem: "js"} 21 | ]}; 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/theme/mkdocs/toc.html: -------------------------------------------------------------------------------- 1 | {% for toc_item in toc %} 2 | {% for toc_h2_item in toc_item.children %} 3 |
  • {{ toc_h2_item.title }}
  • 4 | {% for toc_h3_item in toc_h2_item.children %} 5 |

    {{ toc_h3_item.title }}

    6 | {% endfor %} 7 | {% endfor %} 8 | {% endfor %} 9 | -------------------------------------------------------------------------------- /engine/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes (@shykes) 2 | -------------------------------------------------------------------------------- /engine/hack.go: -------------------------------------------------------------------------------- 1 | package engine 2 | 3 | type Hack map[string]interface{} 4 | 5 | func (eng *Engine) Hack_GetGlobalVar(key string) interface{} { 6 | if eng.hack == nil { 7 | return nil 8 | } 9 | val, exists := eng.hack[key] 10 | if !exists { 11 | return nil 12 | } 13 | return val 14 | } 15 | 16 | func (eng *Engine) Hack_SetGlobalVar(key string, val interface{}) { 17 | if eng.hack == nil { 18 | eng.hack = make(Hack) 19 | } 20 | eng.hack[key] = val 21 | } 22 | -------------------------------------------------------------------------------- /engine/helpers_test.go: -------------------------------------------------------------------------------- 1 | package engine 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | var globalTestID string 8 | 9 | func mkJob(t *testing.T, name string, args ...string) *Job { 10 | return New().Job(name, args...) 11 | } 12 | -------------------------------------------------------------------------------- /graph/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes (@shykes) 2 | Victor Vieux (@vieux) 3 | Michael Crosby (@crosbymichael) 4 | Cristian Staretu (@unclejack) 5 | Tibor Vass (@tiborvass) 6 | -------------------------------------------------------------------------------- /hack/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | ../CONTRIBUTING.md -------------------------------------------------------------------------------- /hack/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | Cristian Staretu (@unclejack) 3 | Tibor Vass (@tiborvass) 4 | dind: Jerome Petazzoni (@jpetazzo) 5 | -------------------------------------------------------------------------------- /hack/allmaintainers.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | find $1 -name MAINTAINERS -exec cat {} ';' | sed -E -e 's/^[^:]*: *(.*)$/\1/' | grep -E -v -e '^ *$' -e '^ *#.*$' | sort -u 4 | -------------------------------------------------------------------------------- /hack/generate-authors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd "$(dirname "$(readlink -f "$BASH_SOURCE")")/.." 5 | 6 | # see also ".mailmap" for how email addresses and names are deduplicated 7 | 8 | { 9 | cat <<-'EOH' 10 | # This file lists all individuals having contributed content to the repository. 11 | # For how it is generated, see `hack/generate-authors.sh`. 12 | EOH 13 | echo 14 | git log --format='%aN <%aE>' | sort -uf 15 | } > AUTHORS 16 | -------------------------------------------------------------------------------- /hack/make/.ensure-busybox: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if ! docker inspect busybox &> /dev/null; then 4 | if [ -d /docker-busybox ]; then 5 | source "$(dirname "$BASH_SOURCE")/.ensure-scratch" 6 | ( set -x; docker build -t busybox /docker-busybox ) 7 | else 8 | ( set -x; docker pull busybox ) 9 | fi 10 | fi 11 | -------------------------------------------------------------------------------- /hack/make/README.md: -------------------------------------------------------------------------------- 1 | This directory holds scripts called by `make.sh` in the parent directory. 2 | 3 | Each script is named after the bundle it creates. 4 | They should not be called directly - instead, pass it as argument to make.sh, for example: 5 | 6 | ``` 7 | ./hack/make.sh test 8 | ./hack/make.sh binary ubuntu 9 | 10 | # Or to run all bundles: 11 | ./hack/make.sh 12 | ``` 13 | 14 | To add a bundle: 15 | 16 | * Create a shell-compatible file here 17 | * Add it to $DEFAULT_BUNDLES in make.sh 18 | -------------------------------------------------------------------------------- /hack/make/binary: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | DEST=$1 5 | 6 | go build \ 7 | -o "$DEST/docker-$VERSION" \ 8 | "${BUILDFLAGS[@]}" \ 9 | -ldflags " 10 | $LDFLAGS 11 | $LDFLAGS_STATIC_DOCKER 12 | " \ 13 | ./docker 14 | echo "Created binary: $DEST/docker-$VERSION" 15 | ln -sf "docker-$VERSION" "$DEST/docker" 16 | 17 | hash_files "$DEST/docker-$VERSION" 18 | -------------------------------------------------------------------------------- /hack/make/cover: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | DEST="$1" 5 | 6 | bundle_cover() { 7 | coverprofiles=( "$DEST/../"*"/coverprofiles/"* ) 8 | for p in "${coverprofiles[@]}"; do 9 | echo 10 | ( 11 | set -x 12 | go tool cover -func="$p" 13 | ) 14 | done 15 | } 16 | 17 | if [ "$HAVE_GO_TEST_COVER" ]; then 18 | bundle_cover 2>&1 | tee "$DEST/report.log" 19 | else 20 | echo >&2 'warning: the current version of go does not support -cover' 21 | echo >&2 ' skipping test coverage report' 22 | fi 23 | -------------------------------------------------------------------------------- /hack/make/dyntest-integration: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | DEST=$1 5 | INIT=$DEST/../dynbinary/dockerinit-$VERSION 6 | 7 | if [ ! -x "$INIT" ]; then 8 | echo >&2 'error: dynbinary must be run before dyntest-integration' 9 | false 10 | fi 11 | 12 | ( 13 | export TEST_DOCKERINIT_PATH="$INIT" 14 | export LDFLAGS_STATIC_DOCKER=" 15 | -X $DOCKER_PKG/dockerversion.INITSHA1 \"$DOCKER_INITSHA1\" 16 | " 17 | source "$(dirname "$BASH_SOURCE")/test-integration" 18 | ) 19 | -------------------------------------------------------------------------------- /hack/make/dyntest-unit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | DEST=$1 5 | INIT=$DEST/../dynbinary/dockerinit-$VERSION 6 | 7 | if [ ! -x "$INIT" ]; then 8 | echo >&2 'error: dynbinary must be run before dyntest-unit' 9 | false 10 | fi 11 | 12 | ( 13 | export TEST_DOCKERINIT_PATH="$INIT" 14 | export LDFLAGS_STATIC_DOCKER=" 15 | -X $DOCKER_PKG/dockerversion.INITSHA1 \"$DOCKER_INITSHA1\" 16 | " 17 | source "$(dirname "$BASH_SOURCE")/test-unit" 18 | ) 19 | -------------------------------------------------------------------------------- /hack/make/test-integration: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | DEST=$1 5 | 6 | bundle_test_integration() { 7 | LDFLAGS="$LDFLAGS $LDFLAGS_STATIC_DOCKER" go_test_dir ./integration \ 8 | "-coverpkg $(find_dirs '*.go' | sed 's,^\.,'$DOCKER_PKG',g' | paste -d, -s)" 9 | } 10 | 11 | # this "grep" hides some really irritating warnings that "go test -coverpkg" 12 | # spews when it is given packages that aren't used 13 | exec > >(tee -a $DEST/test.log) 2>&1 14 | bundle_test_integration 2>&1 \ 15 | | grep --line-buffered -v '^warning: no packages being tested depend on ' 16 | -------------------------------------------------------------------------------- /hack/make/tgz: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DEST="$1" 4 | CROSS="$DEST/../cross" 5 | 6 | set -e 7 | 8 | if [ ! -d "$CROSS/linux/amd64" ]; then 9 | echo >&2 'error: binary and cross must be run before tgz' 10 | false 11 | fi 12 | 13 | for d in "$CROSS/"*/*; do 14 | GOARCH="$(basename "$d")" 15 | GOOS="$(basename "$(dirname "$d")")" 16 | mkdir -p "$DEST/$GOOS/$GOARCH" 17 | TGZ="$DEST/$GOOS/$GOARCH/docker-$VERSION.tgz" 18 | 19 | mkdir -p "$DEST/build" 20 | 21 | mkdir -p "$DEST/build/usr/local/bin" 22 | cp -L "$d/docker-$VERSION" "$DEST/build/usr/local/bin/docker" 23 | 24 | tar --numeric-owner --owner 0 -C "$DEST/build" -czf "$TGZ" usr 25 | 26 | hash_files "$TGZ" 27 | 28 | rm -rf "$DEST/build" 29 | 30 | echo "Created tgz: $TGZ" 31 | done 32 | -------------------------------------------------------------------------------- /hack/stats.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Run this script from the root of the docker repository 4 | ## to query project stats useful to the maintainers. 5 | ## You will need to install `pulls` and `issues` from 6 | ## http://github.com/crosbymichael/pulls 7 | 8 | set -e 9 | 10 | echo -n "Open pulls: " 11 | PULLS=$(pulls | wc -l); let PULLS=$PULLS-1 12 | echo $PULLS 13 | 14 | echo -n "Pulls alru: " 15 | pulls alru 16 | 17 | echo -n "Open issues: " 18 | ISSUES=$(issues list | wc -l); let ISSUES=$ISSUES-1 19 | echo $ISSUES 20 | 21 | echo -n "Issues alru: " 22 | issues alru 23 | -------------------------------------------------------------------------------- /image/graph.go: -------------------------------------------------------------------------------- 1 | package image 2 | 3 | import ( 4 | "github.com/docker/docker/daemon/graphdriver" 5 | ) 6 | 7 | type Graph interface { 8 | Get(id string) (*Image, error) 9 | ImageRoot(id string) string 10 | Driver() graphdriver.Driver 11 | } 12 | -------------------------------------------------------------------------------- /integration-cli/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Cristian Staretu (@unclejack) 2 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestAdd/DirContentToExistDir/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | RUN echo 'dockerio:x:1001:1001::/bin:/bin/false' >> /etc/passwd 3 | RUN echo 'dockerio:x:1001:' >> /etc/group 4 | RUN mkdir /exists 5 | RUN touch /exists/exists_file 6 | RUN chown -R dockerio.dockerio /exists 7 | ADD test_dir/ /exists/ 8 | RUN [ $(ls -l / | grep exists | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 9 | RUN [ $(ls -l /exists/exists_file | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 10 | RUN [ $(ls -l /exists/test_file | awk '{print $3":"$4}') = 'root:root' ] 11 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestAdd/DirContentToExistDir/test_dir/test_file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/integration-cli/build_tests/TestAdd/DirContentToExistDir/test_dir/test_file -------------------------------------------------------------------------------- /integration-cli/build_tests/TestAdd/DirContentToRoot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | RUN echo 'dockerio:x:1001:1001::/bin:/bin/false' >> /etc/passwd 3 | RUN echo 'dockerio:x:1001:' >> /etc/group 4 | RUN touch /exists 5 | RUN chown dockerio.dockerio exists 6 | ADD test_dir / 7 | RUN [ $(ls -l /test_file | awk '{print $3":"$4}') = 'root:root' ] 8 | RUN [ $(ls -l /exists | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 9 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestAdd/DirContentToRoot/test_dir/test_file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/integration-cli/build_tests/TestAdd/DirContentToRoot/test_dir/test_file -------------------------------------------------------------------------------- /integration-cli/build_tests/TestAdd/EtcToRoot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM scratch 2 | ADD . / 3 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestAdd/SingleFileToExistDir/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | RUN echo 'dockerio:x:1001:1001::/bin:/bin/false' >> /etc/passwd 3 | RUN echo 'dockerio:x:1001:' >> /etc/group 4 | RUN mkdir /exists 5 | RUN touch /exists/exists_file 6 | RUN chown -R dockerio.dockerio /exists 7 | ADD test_file /exists/ 8 | RUN [ $(ls -l / | grep exists | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 9 | RUN [ $(ls -l /exists/test_file | awk '{print $3":"$4}') = 'root:root' ] 10 | RUN [ $(ls -l /exists/exists_file | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 11 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestAdd/SingleFileToExistDir/test_file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/integration-cli/build_tests/TestAdd/SingleFileToExistDir/test_file -------------------------------------------------------------------------------- /integration-cli/build_tests/TestAdd/SingleFileToNonExistDir/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | RUN echo 'dockerio:x:1001:1001::/bin:/bin/false' >> /etc/passwd 3 | RUN echo 'dockerio:x:1001:' >> /etc/group 4 | RUN touch /exists 5 | RUN chown dockerio.dockerio /exists 6 | ADD test_file /test_dir/ 7 | RUN [ $(ls -l / | grep test_dir | awk '{print $3":"$4}') = 'root:root' ] 8 | RUN [ $(ls -l /test_dir/test_file | awk '{print $3":"$4}') = 'root:root' ] 9 | RUN [ $(ls -l /exists | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 10 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestAdd/SingleFileToNonExistDir/test_file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/integration-cli/build_tests/TestAdd/SingleFileToNonExistDir/test_file -------------------------------------------------------------------------------- /integration-cli/build_tests/TestAdd/SingleFileToRoot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | RUN echo 'dockerio:x:1001:1001::/bin:/bin/false' >> /etc/passwd 3 | RUN echo 'dockerio:x:1001:' >> /etc/group 4 | RUN touch /exists 5 | RUN chown dockerio.dockerio /exists 6 | ADD test_file / 7 | RUN [ $(ls -l /test_file | awk '{print $3":"$4}') = 'root:root' ] 8 | RUN [ $(ls -l /test_file | awk '{print $1}') = '-rw-r--r--' ] 9 | RUN [ $(ls -l /exists | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 10 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestAdd/SingleFileToWorkdir/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | ADD test_file . 3 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestAdd/WholeDirToRoot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | RUN echo 'dockerio:x:1001:1001::/bin:/bin/false' >> /etc/passwd 3 | RUN echo 'dockerio:x:1001:' >> /etc/group 4 | RUN touch /exists 5 | RUN chown dockerio.dockerio exists 6 | ADD test_dir /test_dir 7 | RUN [ $(ls -l / | grep test_dir | awk '{print $3":"$4}') = 'root:root' ] 8 | RUN [ $(ls -l / | grep test_dir | awk '{print $1}') = 'drwxr-xr-x' ] 9 | RUN [ $(ls -l /test_dir/test_file | awk '{print $3":"$4}') = 'root:root' ] 10 | RUN [ $(ls -l /test_dir/test_file | awk '{print $1}') = '-rw-r--r--' ] 11 | RUN [ $(ls -l /exists | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 12 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestBuildForceRm/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | RUN true 3 | RUN thiswillfail 4 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestBuildHistory/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | 3 | RUN echo "A" 4 | RUN echo "B" 5 | RUN echo "C" 6 | RUN echo "D" 7 | RUN echo "E" 8 | RUN echo "F" 9 | RUN echo "G" 10 | RUN echo "H" 11 | RUN echo "I" 12 | RUN echo "J" 13 | RUN echo "K" 14 | RUN echo "L" 15 | RUN echo "M" 16 | RUN echo "N" 17 | RUN echo "O" 18 | RUN echo "P" 19 | RUN echo "Q" 20 | RUN echo "R" 21 | RUN echo "S" 22 | RUN echo "T" 23 | RUN echo "U" 24 | RUN echo "V" 25 | RUN echo "W" 26 | RUN echo "X" 27 | RUN echo "Y" 28 | RUN echo "Z" 29 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestBuildRm/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | ADD foo / 3 | ADD foo / 4 | 5 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestBuildRm/foo: -------------------------------------------------------------------------------- 1 | bar 2 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestBuildSixtySteps/foo: -------------------------------------------------------------------------------- 1 | a 2 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestBuildWithInaccessibleFilesInContext/ignoredinaccessible/.dockerignore: -------------------------------------------------------------------------------- 1 | directoryWeCantStat 2 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestBuildWithInaccessibleFilesInContext/ignoredinaccessible/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | ADD . /foo/ 3 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestBuildWithInaccessibleFilesInContext/ignoredinaccessible/directoryWeCantStat/bar: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestBuildWithInaccessibleFilesInContext/inaccessibledirectory/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | ADD . /foo/ 3 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestBuildWithInaccessibleFilesInContext/inaccessibledirectory/directoryWeCantStat/bar: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestBuildWithInaccessibleFilesInContext/inaccessiblefile/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | ADD . /foo/ 3 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestBuildWithInaccessibleFilesInContext/inaccessiblefile/fileWithoutReadAccess: -------------------------------------------------------------------------------- 1 | should make `docker build` throw an error 2 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestBuildWithInaccessibleFilesInContext/linksdirectory/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | ADD . /foo/ 3 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestBuildWithInaccessibleFilesInContext/linksdirectory/g: -------------------------------------------------------------------------------- 1 | ../../../../../../../../../../../../../../../../../../../azA -------------------------------------------------------------------------------- /integration-cli/build_tests/TestContextTar/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | ADD foo /foo 3 | CMD ["cat", "/foo"] 4 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestContextTar/foo: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestCopy/DirContentToExistDir/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | RUN echo 'dockerio:x:1001:1001::/bin:/bin/false' >> /etc/passwd 3 | RUN echo 'dockerio:x:1001:' >> /etc/group 4 | RUN mkdir /exists 5 | RUN touch /exists/exists_file 6 | RUN chown -R dockerio.dockerio /exists 7 | COPY test_dir/ /exists/ 8 | RUN [ $(ls -l / | grep exists | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 9 | RUN [ $(ls -l /exists/exists_file | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 10 | RUN [ $(ls -l /exists/test_file | awk '{print $3":"$4}') = 'root:root' ] 11 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestCopy/DirContentToExistDir/test_dir/test_file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/integration-cli/build_tests/TestCopy/DirContentToExistDir/test_dir/test_file -------------------------------------------------------------------------------- /integration-cli/build_tests/TestCopy/DirContentToRoot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | RUN echo 'dockerio:x:1001:1001::/bin:/bin/false' >> /etc/passwd 3 | RUN echo 'dockerio:x:1001:' >> /etc/group 4 | RUN touch /exists 5 | RUN chown dockerio.dockerio exists 6 | COPY test_dir / 7 | RUN [ $(ls -l /test_file | awk '{print $3":"$4}') = 'root:root' ] 8 | RUN [ $(ls -l /exists | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 9 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestCopy/DirContentToRoot/test_dir/test_file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/integration-cli/build_tests/TestCopy/DirContentToRoot/test_dir/test_file -------------------------------------------------------------------------------- /integration-cli/build_tests/TestCopy/DisallowRemote/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | COPY https://index.docker.io/robots.txt / 3 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestCopy/EtcToRoot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM scratch 2 | COPY . / 3 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestCopy/SingleFileToExistDir/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | RUN echo 'dockerio:x:1001:1001::/bin:/bin/false' >> /etc/passwd 3 | RUN echo 'dockerio:x:1001:' >> /etc/group 4 | RUN mkdir /exists 5 | RUN touch /exists/exists_file 6 | RUN chown -R dockerio.dockerio /exists 7 | COPY test_file /exists/ 8 | RUN [ $(ls -l / | grep exists | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 9 | RUN [ $(ls -l /exists/test_file | awk '{print $3":"$4}') = 'root:root' ] 10 | RUN [ $(ls -l /exists/exists_file | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 11 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestCopy/SingleFileToExistDir/test_file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/integration-cli/build_tests/TestCopy/SingleFileToExistDir/test_file -------------------------------------------------------------------------------- /integration-cli/build_tests/TestCopy/SingleFileToNonExistDir/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | RUN echo 'dockerio:x:1001:1001::/bin:/bin/false' >> /etc/passwd 3 | RUN echo 'dockerio:x:1001:' >> /etc/group 4 | RUN touch /exists 5 | RUN chown dockerio.dockerio /exists 6 | COPY test_file /test_dir/ 7 | RUN [ $(ls -l / | grep test_dir | awk '{print $3":"$4}') = 'root:root' ] 8 | RUN [ $(ls -l /test_dir/test_file | awk '{print $3":"$4}') = 'root:root' ] 9 | RUN [ $(ls -l /exists | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 10 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestCopy/SingleFileToNonExistDir/test_file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dianping/docker/6bc773b2c1cbce828dde3a5bee7d7d4dd893ec3b/integration-cli/build_tests/TestCopy/SingleFileToNonExistDir/test_file -------------------------------------------------------------------------------- /integration-cli/build_tests/TestCopy/SingleFileToRoot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | RUN echo 'dockerio:x:1001:1001::/bin:/bin/false' >> /etc/passwd 3 | RUN echo 'dockerio:x:1001:' >> /etc/group 4 | RUN touch /exists 5 | RUN chown dockerio.dockerio /exists 6 | COPY test_file / 7 | RUN [ $(ls -l /test_file | awk '{print $3":"$4}') = 'root:root' ] 8 | RUN [ $(ls -l /test_file | awk '{print $1}') = '-rw-r--r--' ] 9 | RUN [ $(ls -l /exists | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 10 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestCopy/SingleFileToWorkdir/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | COPY test_file . 3 | -------------------------------------------------------------------------------- /integration-cli/build_tests/TestCopy/WholeDirToRoot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | RUN echo 'dockerio:x:1001:1001::/bin:/bin/false' >> /etc/passwd 3 | RUN echo 'dockerio:x:1001:' >> /etc/group 4 | RUN touch /exists 5 | RUN chown dockerio.dockerio exists 6 | COPY test_dir /test_dir 7 | RUN [ $(ls -l / | grep test_dir | awk '{print $3":"$4}') = 'root:root' ] 8 | RUN [ $(ls -l / | grep test_dir | awk '{print $1}') = 'drwxr-xr-x' ] 9 | RUN [ $(ls -l /test_dir/test_file | awk '{print $3":"$4}') = 'root:root' ] 10 | RUN [ $(ls -l /test_dir/test_file | awk '{print $1}') = '-rw-r--r--' ] 11 | RUN [ $(ls -l /exists | awk '{print $3":"$4}') = 'dockerio:dockerio' ] 12 | -------------------------------------------------------------------------------- /integration-cli/docker_cli_import_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os/exec" 6 | "strings" 7 | "testing" 8 | ) 9 | 10 | func TestImportDisplay(t *testing.T) { 11 | importCmd := exec.Command(dockerBinary, "import", "https://github.com/ewindisch/docker-cirros/raw/master/cirros-0.3.0-x86_64-lxc.tar.gz") 12 | out, _, err := runCommandWithOutput(importCmd) 13 | errorOut(err, t, fmt.Sprintf("import failed with errors: %v", err)) 14 | 15 | if n := strings.Count(out, "\n"); n != 2 { 16 | t.Fatalf("display is messed up: %d '\\n' instead of 2", n) 17 | } 18 | 19 | logDone("import - cirros was imported and display is fine") 20 | } 21 | -------------------------------------------------------------------------------- /integration-cli/docker_cli_inspect_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os/exec" 5 | "strings" 6 | "testing" 7 | ) 8 | 9 | func TestInspectImage(t *testing.T) { 10 | imageTest := "scratch" 11 | imageTestId := "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158" 12 | imagesCmd := exec.Command(dockerBinary, "inspect", "--format='{{.Id}}'", imageTest) 13 | 14 | out, exitCode, err := runCommandWithOutput(imagesCmd) 15 | if exitCode != 0 || err != nil { 16 | t.Fatalf("failed to inspect image") 17 | } 18 | if id := strings.TrimSuffix(out, "\n"); id != imageTestId { 19 | t.Fatalf("Expected id: %s for image: %s but received id: %s", imageTestId, imageTest, id) 20 | } 21 | logDone("inspect - inspect an image") 22 | } 23 | -------------------------------------------------------------------------------- /integration/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Tibor Vass (@tiborvass) 2 | Cristian Staretu (@unclejack) 3 | -------------------------------------------------------------------------------- /integration/z_final_test.go: -------------------------------------------------------------------------------- 1 | package docker 2 | 3 | import ( 4 | "github.com/docker/docker/utils" 5 | "runtime" 6 | "testing" 7 | ) 8 | 9 | func displayFdGoroutines(t *testing.T) { 10 | t.Logf("Fds: %d, Goroutines: %d", utils.GetTotalUsedFds(), runtime.NumGoroutine()) 11 | } 12 | 13 | func TestFinal(t *testing.T) { 14 | nuke(globalDaemon) 15 | t.Logf("Start Fds: %d, Start Goroutines: %d", startFds, startGoroutines) 16 | displayFdGoroutines(t) 17 | } 18 | -------------------------------------------------------------------------------- /nat/sort.go: -------------------------------------------------------------------------------- 1 | package nat 2 | 3 | import "sort" 4 | 5 | type portSorter struct { 6 | ports []Port 7 | by func(i, j Port) bool 8 | } 9 | 10 | func (s *portSorter) Len() int { 11 | return len(s.ports) 12 | } 13 | 14 | func (s *portSorter) Swap(i, j int) { 15 | s.ports[i], s.ports[j] = s.ports[j], s.ports[i] 16 | } 17 | 18 | func (s *portSorter) Less(i, j int) bool { 19 | ip := s.ports[i] 20 | jp := s.ports[j] 21 | 22 | return s.by(ip, jp) 23 | } 24 | 25 | func Sort(ports []Port, predicate func(i, j Port) bool) { 26 | s := &portSorter{ports, predicate} 27 | sort.Sort(s) 28 | } 29 | -------------------------------------------------------------------------------- /opts/ip.go: -------------------------------------------------------------------------------- 1 | package opts 2 | 3 | import ( 4 | "fmt" 5 | "net" 6 | ) 7 | 8 | type IpOpt struct { 9 | *net.IP 10 | } 11 | 12 | func NewIpOpt(ref *net.IP, defaultVal string) *IpOpt { 13 | o := &IpOpt{ 14 | IP: ref, 15 | } 16 | o.Set(defaultVal) 17 | return o 18 | } 19 | 20 | func (o *IpOpt) Set(val string) error { 21 | ip := net.ParseIP(val) 22 | if ip == nil { 23 | return fmt.Errorf("%s is not an ip address", val) 24 | } 25 | (*o.IP) = net.ParseIP(val) 26 | return nil 27 | } 28 | 29 | func (o *IpOpt) String() string { 30 | return (*o.IP).String() 31 | } 32 | -------------------------------------------------------------------------------- /pkg/graphdb/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Michael Crosby (@crosbymichael) 2 | -------------------------------------------------------------------------------- /pkg/graphdb/conn_sqlite3.go: -------------------------------------------------------------------------------- 1 | // +build cgo 2 | 3 | package graphdb 4 | 5 | import ( 6 | "database/sql" 7 | "os" 8 | 9 | _ "code.google.com/p/gosqlite/sqlite3" // registers sqlite 10 | ) 11 | 12 | func NewSqliteConn(root string) (*Database, error) { 13 | initDatabase := false 14 | 15 | stat, err := os.Stat(root) 16 | if err != nil { 17 | if os.IsNotExist(err) { 18 | initDatabase = true 19 | } else { 20 | return nil, err 21 | } 22 | } 23 | 24 | if stat != nil && stat.Size() == 0 { 25 | initDatabase = true 26 | } 27 | 28 | conn, err := sql.Open("sqlite3", root) 29 | if err != nil { 30 | return nil, err 31 | } 32 | 33 | return NewDatabase(conn, initDatabase) 34 | } 35 | -------------------------------------------------------------------------------- /pkg/graphdb/conn_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !cgo 2 | 3 | package graphdb 4 | 5 | func NewSqliteConn(root string) (*Database, error) { 6 | panic("Not implemented") 7 | } 8 | -------------------------------------------------------------------------------- /pkg/graphdb/sort.go: -------------------------------------------------------------------------------- 1 | package graphdb 2 | 3 | import "sort" 4 | 5 | type pathSorter struct { 6 | paths []string 7 | by func(i, j string) bool 8 | } 9 | 10 | func sortByDepth(paths []string) { 11 | s := &pathSorter{paths, func(i, j string) bool { 12 | return PathDepth(i) > PathDepth(j) 13 | }} 14 | sort.Sort(s) 15 | } 16 | 17 | func (s *pathSorter) Len() int { 18 | return len(s.paths) 19 | } 20 | 21 | func (s *pathSorter) Swap(i, j int) { 22 | s.paths[i], s.paths[j] = s.paths[j], s.paths[i] 23 | } 24 | 25 | func (s *pathSorter) Less(i, j int) bool { 26 | return s.by(s.paths[i], s.paths[j]) 27 | } 28 | -------------------------------------------------------------------------------- /pkg/graphdb/sort_test.go: -------------------------------------------------------------------------------- 1 | package graphdb 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestSort(t *testing.T) { 8 | paths := []string{ 9 | "/", 10 | "/myreallylongname", 11 | "/app/db", 12 | } 13 | 14 | sortByDepth(paths) 15 | 16 | if len(paths) != 3 { 17 | t.Fatalf("Expected 3 parts got %d", len(paths)) 18 | } 19 | 20 | if paths[0] != "/app/db" { 21 | t.Fatalf("Expected /app/db got %s", paths[0]) 22 | } 23 | if paths[1] != "/myreallylongname" { 24 | t.Fatalf("Expected /myreallylongname got %s", paths[1]) 25 | } 26 | if paths[2] != "/" { 27 | t.Fatalf("Expected / got %s", paths[2]) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /pkg/graphdb/utils.go: -------------------------------------------------------------------------------- 1 | package graphdb 2 | 3 | import ( 4 | "path" 5 | "strings" 6 | ) 7 | 8 | // Split p on / 9 | func split(p string) []string { 10 | return strings.Split(p, "/") 11 | } 12 | 13 | // Returns the depth or number of / in a given path 14 | func PathDepth(p string) int { 15 | parts := split(p) 16 | if len(parts) == 2 && parts[1] == "" { 17 | return 1 18 | } 19 | return len(parts) 20 | } 21 | 22 | func splitPath(p string) (parent, name string) { 23 | if p[0] != '/' { 24 | p = "/" + p 25 | } 26 | parent, name = path.Split(p) 27 | l := len(parent) 28 | if parent[l-1] == '/' { 29 | parent = parent[:l-1] 30 | } 31 | return 32 | } 33 | -------------------------------------------------------------------------------- /pkg/httputils/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Cristian Staretu (@unclejack) 2 | -------------------------------------------------------------------------------- /pkg/iptables/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Michael Crosby (@crosbymichael) 2 | -------------------------------------------------------------------------------- /pkg/mflag/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Victor Vieux (@vieux) 2 | -------------------------------------------------------------------------------- /pkg/mount/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Michael Crosby (@crosbymichael) 2 | -------------------------------------------------------------------------------- /pkg/mount/flags_freebsd.go: -------------------------------------------------------------------------------- 1 | // +build freebsd,cgo 2 | 3 | package mount 4 | 5 | /* 6 | #include 7 | */ 8 | import "C" 9 | 10 | const ( 11 | RDONLY = C.MNT_RDONLY 12 | NOSUID = C.MNT_NOSUID 13 | NOEXEC = C.MNT_NOEXEC 14 | SYNCHRONOUS = C.MNT_SYNCHRONOUS 15 | NOATIME = C.MNT_NOATIME 16 | 17 | BIND = 0 18 | DIRSYNC = 0 19 | MANDLOCK = 0 20 | NODEV = 0 21 | NODIRATIME = 0 22 | PRIVATE = 0 23 | RBIND = 0 24 | RELATIVE = 0 25 | RELATIME = 0 26 | REMOUNT = 0 27 | STRICTATIME = 0 28 | ) 29 | -------------------------------------------------------------------------------- /pkg/mount/flags_linux.go: -------------------------------------------------------------------------------- 1 | package mount 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | const ( 8 | RDONLY = syscall.MS_RDONLY 9 | NOSUID = syscall.MS_NOSUID 10 | NODEV = syscall.MS_NODEV 11 | NOEXEC = syscall.MS_NOEXEC 12 | SYNCHRONOUS = syscall.MS_SYNCHRONOUS 13 | DIRSYNC = syscall.MS_DIRSYNC 14 | REMOUNT = syscall.MS_REMOUNT 15 | MANDLOCK = syscall.MS_MANDLOCK 16 | NOATIME = syscall.MS_NOATIME 17 | NODIRATIME = syscall.MS_NODIRATIME 18 | BIND = syscall.MS_BIND 19 | RBIND = syscall.MS_BIND | syscall.MS_REC 20 | PRIVATE = syscall.MS_PRIVATE 21 | RELATIME = syscall.MS_RELATIME 22 | STRICTATIME = syscall.MS_STRICTATIME 23 | ) 24 | -------------------------------------------------------------------------------- /pkg/mount/flags_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount 4 | 5 | const ( 6 | BIND = 0 7 | DIRSYNC = 0 8 | MANDLOCK = 0 9 | NOATIME = 0 10 | NODEV = 0 11 | NODIRATIME = 0 12 | NOEXEC = 0 13 | NOSUID = 0 14 | PRIVATE = 0 15 | RBIND = 0 16 | RELATIME = 0 17 | RELATIVE = 0 18 | REMOUNT = 0 19 | STRICTATIME = 0 20 | SYNCHRONOUS = 0 21 | RDONLY = 0 22 | ) 23 | -------------------------------------------------------------------------------- /pkg/mount/mounter_linux.go: -------------------------------------------------------------------------------- 1 | package mount 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | func mount(device, target, mType string, flag uintptr, data string) error { 8 | if err := syscall.Mount(device, target, mType, flag, data); err != nil { 9 | return err 10 | } 11 | 12 | // If we have a bind mount or remount, remount... 13 | if flag&syscall.MS_BIND == syscall.MS_BIND && flag&syscall.MS_RDONLY == syscall.MS_RDONLY { 14 | return syscall.Mount(device, target, mType, flag|syscall.MS_REMOUNT, data) 15 | } 16 | return nil 17 | } 18 | 19 | func unmount(target string, flag int) error { 20 | return syscall.Unmount(target, flag) 21 | } 22 | -------------------------------------------------------------------------------- /pkg/mount/mounter_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount 4 | 5 | func mount(device, target, mType string, flag uintptr, data string) error { 6 | panic("Not implemented") 7 | } 8 | 9 | func unmount(target string, flag int) error { 10 | panic("Not implemented") 11 | } 12 | -------------------------------------------------------------------------------- /pkg/mount/mountinfo.go: -------------------------------------------------------------------------------- 1 | package mount 2 | 3 | type MountInfo struct { 4 | Id, Parent, Major, Minor int 5 | Root, Mountpoint, Opts string 6 | Fstype, Source, VfsOpts string 7 | } 8 | -------------------------------------------------------------------------------- /pkg/mount/mountinfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount 4 | 5 | import ( 6 | "fmt" 7 | "runtime" 8 | ) 9 | 10 | func parseMountTable() ([]*MountInfo, error) { 11 | return nil, fmt.Errorf("mount.parseMountTable is not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 12 | } 13 | -------------------------------------------------------------------------------- /pkg/namesgenerator/names-generator_test.go: -------------------------------------------------------------------------------- 1 | package namesgenerator 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | // Make sure the generated names are awesome 8 | func TestGenerateAwesomeNames(t *testing.T) { 9 | name := GetRandomName(0) 10 | if !isAwesome(name) { 11 | t.Fatalf("Generated name '%s' is not awesome.", name) 12 | } 13 | } 14 | 15 | // To be awesome, a container name must involve cool inventors, be easy to remember, 16 | // be at least mildly funny, and always be politically correct for enterprise adoption. 17 | func isAwesome(name string) bool { 18 | coolInventorNames := true 19 | easyToRemember := true 20 | mildlyFunnyOnOccasion := true 21 | politicallyCorrect := true 22 | return coolInventorNames && easyToRemember && mildlyFunnyOnOccasion && politicallyCorrect 23 | } 24 | -------------------------------------------------------------------------------- /pkg/networkfs/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Victor Vieux (@vieux) 2 | -------------------------------------------------------------------------------- /pkg/parsers/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Erik Hollensbe (@erikh) 2 | -------------------------------------------------------------------------------- /pkg/parsers/kernel/uname_linux.go: -------------------------------------------------------------------------------- 1 | package kernel 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | type Utsname syscall.Utsname 8 | 9 | func uname() (*syscall.Utsname, error) { 10 | uts := &syscall.Utsname{} 11 | 12 | if err := syscall.Uname(uts); err != nil { 13 | return nil, err 14 | } 15 | return uts, nil 16 | } 17 | -------------------------------------------------------------------------------- /pkg/parsers/kernel/uname_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package kernel 4 | 5 | import ( 6 | "errors" 7 | ) 8 | 9 | type Utsname struct { 10 | Release [65]byte 11 | } 12 | 13 | func uname() (*Utsname, error) { 14 | return nil, errors.New("Kernel version detection is available only on linux") 15 | } 16 | -------------------------------------------------------------------------------- /pkg/proxy/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Michael Crosby (@crosbymichael) 2 | -------------------------------------------------------------------------------- /pkg/proxy/stub_proxy.go: -------------------------------------------------------------------------------- 1 | package proxy 2 | 3 | import ( 4 | "net" 5 | ) 6 | 7 | type StubProxy struct { 8 | frontendAddr net.Addr 9 | backendAddr net.Addr 10 | } 11 | 12 | func (p *StubProxy) Run() {} 13 | func (p *StubProxy) Close() {} 14 | func (p *StubProxy) FrontendAddr() net.Addr { return p.frontendAddr } 15 | func (p *StubProxy) BackendAddr() net.Addr { return p.backendAddr } 16 | 17 | func NewStubProxy(frontendAddr, backendAddr net.Addr) (Proxy, error) { 18 | return &StubProxy{ 19 | frontendAddr: frontendAddr, 20 | backendAddr: backendAddr, 21 | }, nil 22 | } 23 | -------------------------------------------------------------------------------- /pkg/signal/signal.go: -------------------------------------------------------------------------------- 1 | package signal 2 | 3 | import ( 4 | "os" 5 | "os/signal" 6 | ) 7 | 8 | func CatchAll(sigc chan os.Signal) { 9 | handledSigs := []os.Signal{} 10 | for _, s := range SignalMap { 11 | handledSigs = append(handledSigs, s) 12 | } 13 | signal.Notify(sigc, handledSigs...) 14 | } 15 | 16 | func StopCatch(sigc chan os.Signal) { 17 | signal.Stop(sigc) 18 | close(sigc) 19 | } 20 | -------------------------------------------------------------------------------- /pkg/signal/signal_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!darwin,!freebsd 2 | 3 | package signal 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | var SignalMap = map[string]syscall.Signal{} 10 | -------------------------------------------------------------------------------- /pkg/symlink/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Michael Crosby (@crosbymichael) 2 | Victor Vieux (@vieux) 3 | -------------------------------------------------------------------------------- /pkg/symlink/testdata/fs/a/d: -------------------------------------------------------------------------------- 1 | /b -------------------------------------------------------------------------------- /pkg/symlink/testdata/fs/a/e: -------------------------------------------------------------------------------- 1 | ../b -------------------------------------------------------------------------------- /pkg/symlink/testdata/fs/a/f: -------------------------------------------------------------------------------- 1 | ../../../../test -------------------------------------------------------------------------------- /pkg/symlink/testdata/fs/b/h: -------------------------------------------------------------------------------- 1 | ../g -------------------------------------------------------------------------------- /pkg/symlink/testdata/fs/g: -------------------------------------------------------------------------------- 1 | ../../../../../../../../../../../../root -------------------------------------------------------------------------------- /pkg/symlink/testdata/fs/i: -------------------------------------------------------------------------------- 1 | a -------------------------------------------------------------------------------- /pkg/sysinfo/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Michael Crosby (@crosbymichael) 2 | Victor Vieux (@vieux) 3 | -------------------------------------------------------------------------------- /pkg/system/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Michael Crosby (@crosbymichael) 2 | Victor Vieux (@vieux) 3 | -------------------------------------------------------------------------------- /pkg/system/errors.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | ErrNotSupportedPlatform = errors.New("platform and architecture is not supported") 9 | ) 10 | -------------------------------------------------------------------------------- /pkg/system/stat_linux.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | func GetLastAccess(stat *syscall.Stat_t) syscall.Timespec { 8 | return stat.Atim 9 | } 10 | 11 | func GetLastModification(stat *syscall.Stat_t) syscall.Timespec { 12 | return stat.Mtim 13 | } 14 | -------------------------------------------------------------------------------- /pkg/system/stat_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package system 4 | 5 | import "syscall" 6 | 7 | func GetLastAccess(stat *syscall.Stat_t) syscall.Timespec { 8 | return stat.Atimespec 9 | } 10 | 11 | func GetLastModification(stat *syscall.Stat_t) syscall.Timespec { 12 | return stat.Mtimespec 13 | } 14 | -------------------------------------------------------------------------------- /pkg/system/utimes_darwin.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "syscall" 4 | 5 | func LUtimesNano(path string, ts []syscall.Timespec) error { 6 | return ErrNotSupportedPlatform 7 | } 8 | 9 | func UtimesNano(path string, ts []syscall.Timespec) error { 10 | return syscall.UtimesNano(path, ts) 11 | } 12 | -------------------------------------------------------------------------------- /pkg/system/utimes_freebsd.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | ) 7 | 8 | func LUtimesNano(path string, ts []syscall.Timespec) error { 9 | var _path *byte 10 | _path, err := syscall.BytePtrFromString(path) 11 | if err != nil { 12 | return err 13 | } 14 | 15 | if _, _, err := syscall.Syscall(syscall.SYS_LUTIMES, uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), 0); err != 0 && err != syscall.ENOSYS { 16 | return err 17 | } 18 | 19 | return nil 20 | } 21 | 22 | func UtimesNano(path string, ts []syscall.Timespec) error { 23 | return syscall.UtimesNano(path, ts) 24 | } 25 | -------------------------------------------------------------------------------- /pkg/system/utimes_linux.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | ) 7 | 8 | func LUtimesNano(path string, ts []syscall.Timespec) error { 9 | // These are not currently available in syscall 10 | AT_FDCWD := -100 11 | AT_SYMLINK_NOFOLLOW := 0x100 12 | 13 | var _path *byte 14 | _path, err := syscall.BytePtrFromString(path) 15 | if err != nil { 16 | return err 17 | } 18 | 19 | if _, _, err := syscall.Syscall6(syscall.SYS_UTIMENSAT, uintptr(AT_FDCWD), uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), uintptr(AT_SYMLINK_NOFOLLOW), 0, 0); err != 0 && err != syscall.ENOSYS { 20 | return err 21 | } 22 | 23 | return nil 24 | } 25 | 26 | func UtimesNano(path string, ts []syscall.Timespec) error { 27 | return syscall.UtimesNano(path, ts) 28 | } 29 | -------------------------------------------------------------------------------- /pkg/system/utimes_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd,!darwin 2 | 3 | package system 4 | 5 | import "syscall" 6 | 7 | func LUtimesNano(path string, ts []syscall.Timespec) error { 8 | return ErrNotSupportedPlatform 9 | } 10 | 11 | func UtimesNano(path string, ts []syscall.Timespec) error { 12 | return ErrNotSupportedPlatform 13 | } 14 | -------------------------------------------------------------------------------- /pkg/system/xattrs_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package system 4 | 5 | func Lgetxattr(path string, attr string) ([]byte, error) { 6 | return nil, ErrNotSupportedPlatform 7 | } 8 | 9 | func Lsetxattr(path string, attr string, data []byte, flags int) error { 10 | return ErrNotSupportedPlatform 11 | } 12 | -------------------------------------------------------------------------------- /pkg/systemd/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Brandon Philips (@philips) 2 | -------------------------------------------------------------------------------- /pkg/systemd/booted.go: -------------------------------------------------------------------------------- 1 | package systemd 2 | 3 | import ( 4 | "os" 5 | ) 6 | 7 | // Conversion to Go of systemd's sd_booted() 8 | func SdBooted() bool { 9 | s, err := os.Stat("/run/systemd/system") 10 | if err != nil { 11 | return false 12 | } 13 | 14 | return s.IsDir() 15 | } 16 | -------------------------------------------------------------------------------- /pkg/systemd/sd_notify.go: -------------------------------------------------------------------------------- 1 | package systemd 2 | 3 | import ( 4 | "errors" 5 | "net" 6 | "os" 7 | ) 8 | 9 | var SdNotifyNoSocket = errors.New("No socket") 10 | 11 | // Send a message to the init daemon. It is common to ignore the error. 12 | func SdNotify(state string) error { 13 | socketAddr := &net.UnixAddr{ 14 | Name: os.Getenv("NOTIFY_SOCKET"), 15 | Net: "unixgram", 16 | } 17 | 18 | if socketAddr.Name == "" { 19 | return SdNotifyNoSocket 20 | } 21 | 22 | conn, err := net.DialUnix(socketAddr.Net, nil, socketAddr) 23 | if err != nil { 24 | return err 25 | } 26 | 27 | _, err = conn.Write([]byte(state)) 28 | if err != nil { 29 | return err 30 | } 31 | 32 | return nil 33 | } 34 | -------------------------------------------------------------------------------- /pkg/tarsum/testdata/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/json: -------------------------------------------------------------------------------- 1 | {"id":"511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158","comment":"Imported from -","created":"2013-06-13T14:03:50.821769-07:00","container_config":{"Hostname":"","Domainname":"","User":"","Memory":0,"MemorySwap":0,"CpuShares":0,"AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"PortSpecs":null,"ExposedPorts":null,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":null,"Cmd":null,"Image":"","Volumes":null,"WorkingDir":"","Entrypoint":null,"NetworkDisabled":false,"OnBuild":null},"docker_version":"0.4.0","architecture":"x86_64","Size":0} -------------------------------------------------------------------------------- /pkg/term/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes (@shykes) 2 | -------------------------------------------------------------------------------- /pkg/testutils/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes (@shykes) 2 | Cristian Staretu (@unclejack) 3 | -------------------------------------------------------------------------------- /pkg/testutils/README.md: -------------------------------------------------------------------------------- 1 | `testutils` is a collection of utility functions to facilitate the writing 2 | of tests. It is used in various places by the Docker test suite. 3 | -------------------------------------------------------------------------------- /pkg/truncindex/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Cristian Staretu (@unclejack) 2 | -------------------------------------------------------------------------------- /pkg/units/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Michael Crosby (@crosbymichael) 2 | Victor Vieux (@vieux) 3 | -------------------------------------------------------------------------------- /reexec/README.md: -------------------------------------------------------------------------------- 1 | ## reexec 2 | 3 | The `reexec` package facilitates the busybox style reexec of the docker binary that we require because 4 | of the forking limitations of using Go. Handlers can be registered with a name and the argv 0 of 5 | the exec of the binary will be used to find and execute custom init paths. 6 | -------------------------------------------------------------------------------- /registry/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Sam Alba (@samalba) 2 | Joffrey Fuhrer (@shin-) 3 | Ken Cochrane (@kencochrane) 4 | Vincent Batts (@vbatts) 5 | Olivier Gambier (@dmp42) 6 | -------------------------------------------------------------------------------- /utils/random.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "crypto/rand" 5 | "encoding/hex" 6 | "io" 7 | ) 8 | 9 | func RandomString() string { 10 | id := make([]byte, 32) 11 | 12 | if _, err := io.ReadFull(rand.Reader, id); err != nil { 13 | panic(err) // This shouldn't happen 14 | } 15 | return hex.EncodeToString(id) 16 | } 17 | -------------------------------------------------------------------------------- /utils/timeoutconn.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "net" 5 | "time" 6 | ) 7 | 8 | func NewTimeoutConn(conn net.Conn, timeout time.Duration) net.Conn { 9 | return &TimeoutConn{conn, timeout} 10 | } 11 | 12 | // A net.Conn that sets a deadline for every Read or Write operation 13 | type TimeoutConn struct { 14 | net.Conn 15 | timeout time.Duration 16 | } 17 | 18 | func (c *TimeoutConn) Read(b []byte) (int, error) { 19 | if c.timeout > 0 { 20 | err := c.Conn.SetReadDeadline(time.Now().Add(c.timeout)) 21 | if err != nil { 22 | return 0, err 23 | } 24 | } 25 | return c.Conn.Read(b) 26 | } 27 | -------------------------------------------------------------------------------- /utils/tmpdir.go: -------------------------------------------------------------------------------- 1 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd 2 | 3 | package utils 4 | 5 | import ( 6 | "os" 7 | ) 8 | 9 | // TempDir returns the default directory to use for temporary files. 10 | func TempDir(rootdir string) (string error) { 11 | return os.TempDir(), nil 12 | } 13 | -------------------------------------------------------------------------------- /utils/tmpdir_unix.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd linux netbsd openbsd 2 | 3 | package utils 4 | 5 | import ( 6 | "os" 7 | "path/filepath" 8 | ) 9 | 10 | // TempDir returns the default directory to use for temporary files. 11 | func TempDir(rootDir string) (string, error) { 12 | var tmpDir string 13 | if tmpDir = os.Getenv("DOCKER_TMPDIR"); tmpDir == "" { 14 | tmpDir = filepath.Join(rootDir, "tmp") 15 | } 16 | err := os.MkdirAll(tmpDir, 0700) 17 | return tmpDir, err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/MAINTAINERS: -------------------------------------------------------------------------------- 1 | ../hack/MAINTAINERS -------------------------------------------------------------------------------- /vendor/src/code.google.com/p/go.net/.hgignore: -------------------------------------------------------------------------------- 1 | syntax:glob 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/src/code.google.com/p/go.net/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/src/code.google.com/p/go.net/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/src/code.google.com/p/go.net/README: -------------------------------------------------------------------------------- 1 | This repository holds supplementary Go networking libraries. 2 | 3 | To submit changes to this repository, see http://golang.org/doc/contribute.html. 4 | -------------------------------------------------------------------------------- /vendor/src/code.google.com/p/go.net/codereview.cfg: -------------------------------------------------------------------------------- 1 | defaultcc: golang-dev@googlegroups.com 2 | contributors: http://go.googlecode.com/hg/CONTRIBUTORS 3 | -------------------------------------------------------------------------------- /vendor/src/code.google.com/p/go.net/html/testdata/webkit/adoption02.dat: -------------------------------------------------------------------------------- 1 | #data 2 | 12

    34 3 | #errors 4 | #document 5 | | 6 | | 7 | | 8 | | 9 | | "1" 10 | | 11 | | "2" 12 | | 13 | |

    14 | | 15 | | "3" 16 | | "4" 17 | 18 | #data 19 |

    20 | #errors 21 | #document 22 | | 23 | | 24 | | 25 | | 26 | |
    27 | | 28 | |