├── pkg ├── sockets │ └── README.md ├── chrootarchive │ ├── init_windows.go │ ├── init_unix.go │ └── archive_windows.go ├── archive │ ├── README.md │ ├── testdata │ │ └── broken.tar │ ├── time_unsupported.go │ ├── time_linux.go │ └── changes_windows.go ├── stringutils │ └── README.md ├── sysinfo │ ├── README.md │ └── sysinfo_windows.go ├── stringid │ └── README.md ├── signal │ ├── README.md │ ├── signal_unsupported.go │ ├── signal_unix.go │ ├── signal_windows.go │ └── signal.go ├── ioutils │ ├── scheduler.go │ ├── scheduler_gccgo.go │ ├── fmt.go │ └── fmt_test.go ├── useragent │ └── README.md ├── tarsum │ ├── testdata │ │ ├── xattr │ │ │ └── layer.tar │ │ └── 511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158 │ │ │ └── json │ └── writercloser.go ├── graphdb │ ├── conn_sqlite3_windows.go │ ├── conn_sqlite3_unix.go │ ├── conn_unsupported.go │ ├── conn_sqlite3.go │ ├── sort.go │ ├── sort_test.go │ └── utils.go ├── system │ ├── meminfo_unsupported.go │ ├── errors.go │ ├── filesys.go │ ├── umask.go │ ├── umask_windows.go │ ├── mknod_windows.go │ ├── utimes_darwin.go │ ├── xattrs_unsupported.go │ ├── utimes_unsupported.go │ ├── stat_unsupported.go │ ├── lstat.go │ ├── meminfo.go │ ├── stat_windows.go │ └── utimes_freebsd.go ├── reexec │ ├── command_unsupported.go │ ├── README.md │ └── command_windows.go ├── systemd │ └── booted.go ├── mount │ ├── mounter_unsupported.go │ ├── mountinfo_unsupported.go │ ├── mounter_linux.go │ └── flags_unsupported.go ├── parsers │ └── kernel │ │ ├── uname_unsupported.go │ │ └── uname_linux.go ├── symlink │ └── README.md ├── promise │ └── promise.go ├── devicemapper │ ├── log.go │ └── devmapper_wrapper_no_deferred_remove.go ├── random │ └── random_test.go ├── term │ └── tc_other.go ├── homedir │ └── homedir_test.go ├── timeoutconn │ └── timeoutconn.go ├── directory │ └── directory_windows.go ├── proxy │ └── stub_proxy.go └── plugins │ └── pluginrpc-gen │ └── fixtures │ └── foo.go ├── hack ├── make │ ├── .build-deb │ │ ├── compat │ │ ├── docs │ │ ├── docker-engine.manpages │ │ ├── docker-engine.udev │ │ ├── docker-engine.bash-completion │ │ ├── docker-engine.docker.init │ │ ├── docker-engine.docker.upstart │ │ ├── docker-engine.docker.default │ │ └── docker-engine.postinst │ ├── .resources-windows │ │ ├── docker.ico │ │ └── docker.png │ ├── .integration-daemon-setup │ ├── .ensure-httpserver │ ├── test-integration-cli │ ├── cover │ ├── README.md │ ├── binary │ ├── test-docker-py │ └── .integration-daemon-stop └── generate-authors.sh ├── .dockerignore ├── VERSION ├── project └── CONTRIBUTORS.md ├── runconfig ├── fixtures │ ├── valid.env │ ├── valid.label │ └── container_hostconfig_1_14.json ├── hostconfig_windows.go ├── parse_stub.go └── parse_windows.go ├── vendor └── src │ ├── gopkg.in │ └── fsnotify.v1 │ │ ├── NotUsed.xcworkspace │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── open_mode_bsd.go │ │ └── open_mode_darwin.go │ └── github.com │ ├── Sirupsen │ └── logrus │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── terminal_openbsd.go │ │ ├── terminal_linux.go │ │ ├── terminal_darwin.go │ │ ├── terminal_freebsd.go │ │ └── CHANGELOG.md │ ├── mistifyio │ └── go-zfs │ │ ├── .gitignore │ │ └── error.go │ ├── endophage │ └── gotuf │ │ ├── .gitignore │ │ ├── MAINTAINERS │ │ ├── store │ │ └── errors.go │ │ ├── CONTRIBUTORS │ │ └── .travis.yml │ ├── mattn │ └── go-sqlite3 │ │ ├── .gitignore │ │ ├── sqlite3-binding.c │ │ ├── sqlite3-binding.h │ │ ├── .travis.yml │ │ ├── sqlite3_other.go │ │ ├── sqlite3_libsqlite3.go │ │ └── sqlite3_windows.go │ ├── kr │ └── pty │ │ ├── .gitignore │ │ ├── types.go │ │ ├── ztypes_386.go │ │ ├── ztypes_amd64.go │ │ ├── ztypes_arm.go │ │ ├── ztypes_arm64.go │ │ ├── ztypes_ppc64.go │ │ ├── ztypes_s390x.go │ │ ├── ztypes_ppc64le.go │ │ ├── pty_unsupported.go │ │ ├── ioctl.go │ │ ├── ztypes_freebsd_386.go │ │ ├── ztypes_freebsd_arm.go │ │ ├── ztypes_freebsd_amd64.go │ │ ├── types_freebsd.go │ │ ├── mktypes.bash │ │ ├── doc.go │ │ └── README.md │ ├── go-check │ └── check │ │ ├── .gitignore │ │ ├── TODO │ │ └── README.md │ ├── BurntSushi │ └── toml │ │ ├── session.vim │ │ ├── .gitignore │ │ ├── COMPATIBLE │ │ ├── .travis.yml │ │ ├── Makefile │ │ ├── COPYING │ │ ├── cmd │ │ ├── tomlv │ │ │ └── COPYING │ │ ├── toml-test-decoder │ │ │ └── COPYING │ │ └── toml-test-encoder │ │ │ └── COPYING │ │ ├── encoding_types_1.1.go │ │ └── encoding_types.go │ ├── tent │ └── canonical-json-go │ │ └── .travis.yml │ ├── fluent │ └── fluent-logger-golang │ │ ├── fluent │ │ ├── version.go │ │ └── proto.go │ │ └── LICENSE │ ├── gorilla │ ├── mux │ │ ├── .travis.yml │ │ └── README.md │ └── context │ │ ├── .travis.yml │ │ └── README.md │ ├── opencontainers │ └── runc │ │ └── libcontainer │ │ ├── cgroups │ │ ├── fs │ │ │ └── fs_unsupported.go │ │ └── cgroups_unsupported.go │ │ ├── criurpc │ │ └── Makefile │ │ ├── seccomp │ │ └── seccomp_unsupported.go │ │ ├── nsenter │ │ ├── nsenter_unsupported.go │ │ └── nsenter.go │ │ ├── stacktrace │ │ ├── stacktrace.go │ │ └── capture.go │ │ ├── configs │ │ ├── namespaces.go │ │ ├── namespaces_windows.go │ │ ├── hugepage_limit.go │ │ ├── interface_priority_map.go │ │ └── namespaces_syscall_unsupported.go │ │ ├── stats_freebsd.go │ │ ├── stats_windows.go │ │ ├── user │ │ ├── MAINTAINERS │ │ └── lookup_unsupported.go │ │ ├── netlink │ │ ├── MAINTAINERS │ │ ├── netlink_linux_armppc64.go │ │ └── netlink_linux_notarm.go │ │ ├── stats_linux.go │ │ ├── apparmor │ │ └── apparmor_disabled.go │ │ ├── system │ │ ├── sysconfig.go │ │ └── sysconfig_notcgo.go │ │ ├── container_nouserns_linux.go │ │ ├── stats.go │ │ ├── console.go │ │ ├── devices │ │ └── devices_windows.go │ │ └── console_freebsd.go │ ├── vishvananda │ ├── netlink │ │ ├── .travis.yml │ │ └── neigh.go │ └── netns │ │ ├── netns_linux_386.go │ │ ├── netns_linux_amd64.go │ │ ├── netns_linux_arm.go │ │ ├── netns_linux_arm64.go │ │ └── netns_linux_ppc64le.go │ ├── godbus │ └── dbus │ │ ├── MAINTAINERS │ │ ├── transport_darwin.go │ │ ├── homedir_dynamic.go │ │ ├── homedir.go │ │ ├── conn_darwin.go │ │ └── conn_other.go │ ├── coreos │ └── go-etcd │ │ └── etcd │ │ └── version.go │ ├── docker │ ├── libnetwork │ │ ├── resolvconf │ │ │ ├── README.md │ │ │ └── dns │ │ │ │ └── resolvconf.go │ │ ├── sandbox │ │ │ ├── neigh_freebsd.go │ │ │ ├── neigh_windows.go │ │ │ ├── interface_freebsd.go │ │ │ ├── interface_windows.go │ │ │ └── namespace_unsupported.go │ │ ├── drivers │ │ │ └── bridge │ │ │ │ ├── netlink_deprecated_linux_armppc64.go │ │ │ │ ├── netlink_deprecated_linux_notarm.go │ │ │ │ ├── setup_firewalld.go │ │ │ │ ├── netlink_deprecated_unsupported.go │ │ │ │ ├── setup_fixedcidrv4.go │ │ │ │ └── setup_ip_forwarding.go │ │ ├── hostdiscovery │ │ │ └── libnetwork.toml │ │ ├── circle.yml │ │ ├── MAINTAINERS │ │ ├── config │ │ │ └── libnetwork.toml │ │ ├── drivers_windows.go │ │ ├── portmapper │ │ │ └── mock_proxy.go │ │ ├── drivers_freebsd.go │ │ └── .gitignore │ ├── libtrust │ │ ├── MAINTAINERS │ │ ├── doc.go │ │ └── CONTRIBUTING.md │ └── distribution │ │ ├── MAINTAINERS │ │ ├── doc.go │ │ ├── .mailmap │ │ ├── registry │ │ └── api │ │ │ └── v2 │ │ │ └── doc.go │ │ ├── .gitignore │ │ └── Dockerfile │ ├── philhofer │ └── fwd │ │ ├── writer_appengine.go │ │ └── writer_unsafe.go │ ├── armon │ └── go-metrics │ │ ├── const_unix.go │ │ ├── const_windows.go │ │ └── .gitignore │ ├── hashicorp │ ├── memberlist │ │ ├── todo.md │ │ ├── Makefile │ │ ├── .gitignore │ │ ├── conflict_delegate.go │ │ └── merge_delegate.go │ ├── serf │ │ ├── serf │ │ │ ├── conflict_delegate.go │ │ │ └── event_delegate.go │ │ └── website │ │ │ └── LICENSE.md │ └── consul │ │ └── website │ │ └── LICENSE.md │ ├── vbatts │ └── tar-split │ │ ├── tar │ │ ├── asm │ │ │ └── doc.go │ │ └── storage │ │ │ └── doc.go │ │ └── archive │ │ └── tar │ │ ├── stat_atim.go │ │ └── stat_atimespec.go │ ├── natefinch │ └── npipe │ │ └── .gitignore │ ├── microsoft │ └── hcsshim │ │ └── guid.go │ └── syndtr │ └── gocapability │ └── capability │ └── capability_noop.go ├── contrib ├── REVIEWERS ├── syntax │ ├── textmate │ │ ├── REVIEWERS │ │ ├── README.md │ │ └── Docker.tmbundle │ │ │ └── info.plist │ └── vim │ │ ├── ftdetect │ │ └── dockerfile.vim │ │ ├── doc │ │ └── dockerfile.txt │ │ └── README.md ├── httpserver │ ├── Dockerfile │ └── server.go ├── completion │ ├── REVIEWERS │ └── zsh │ │ └── REVIEWERS ├── init │ ├── upstart │ │ └── REVIEWERS │ ├── systemd │ │ ├── REVIEWERS │ │ ├── docker.socket │ │ └── docker.service │ ├── sysvinit-redhat │ │ └── docker.sysconfig │ ├── openrc │ │ └── docker.confd │ └── sysvinit-debian │ │ └── docker.default ├── host-integration │ ├── Dockerfile.min │ └── manager │ │ ├── systemd │ │ └── upstart ├── builder │ ├── deb │ │ ├── build.sh │ │ ├── README.md │ │ ├── debian-jessie │ │ │ └── Dockerfile │ │ ├── debian-stretch │ │ │ └── Dockerfile │ │ ├── ubuntu-debootstrap-vivid │ │ │ └── Dockerfile │ │ ├── ubuntu-debootstrap-wily │ │ │ └── Dockerfile │ │ └── ubuntu-debootstrap-trusty │ │ │ └── Dockerfile │ └── rpm │ │ ├── build.sh │ │ ├── README.md │ │ ├── fedora-20 │ │ └── Dockerfile │ │ ├── fedora-21 │ │ └── Dockerfile │ │ ├── fedora-22 │ │ └── Dockerfile │ │ ├── oraclelinux-6 │ │ └── Dockerfile │ │ ├── oraclelinux-7 │ │ └── Dockerfile │ │ └── centos-7 │ │ └── Dockerfile ├── README ├── udev │ └── 80-docker.rules ├── desktop-integration │ └── README.md ├── reprepro │ └── suites.sh ├── project-stats.sh └── mkimage │ └── rinse ├── daemon ├── logger │ ├── gelf │ │ └── gelf_unsupported.go │ ├── syslog │ │ └── syslog_unsupported.go │ └── journald │ │ └── journald_unsupported.go ├── graphdriver │ ├── btrfs │ │ ├── dummy_unsupported.go │ │ ├── version_test.go │ │ ├── version_none.go │ │ └── version.go │ ├── overlay │ │ └── overlay_unsupported.go │ ├── vfs │ │ └── driver_unsupported.go │ ├── zfs │ │ ├── MAINTAINERS │ │ └── zfs_unsupported.go │ ├── aufs │ │ ├── mount_linux.go │ │ ├── mount_unsupported.go │ │ └── mount.go │ └── driver_unsupported.go ├── debugtrap_unsupported.go ├── execdriver │ ├── windows │ │ ├── clean.go │ │ ├── getpids.go │ │ ├── stats.go │ │ ├── unsupported.go │ │ ├── pauseunpause.go │ │ ├── info.go │ │ └── stdconsole.go │ ├── lxc │ │ ├── lxc_init_unsupported.go │ │ └── lxc_init_linux.go │ ├── native │ │ ├── driver_unsupported.go │ │ ├── driver_unsupported_nocgo.go │ │ └── info.go │ ├── pipes.go │ └── execdrivers │ │ └── execdrivers_windows.go ├── daemon_zfs.go ├── daemon_btrfs.go ├── daemon_overlay.go ├── daemon_devicemapper.go ├── config_stub.go ├── utils_nounix.go ├── README.md ├── daemon_no_aufs.go ├── exec_windows.go ├── logdrivers_windows.go ├── wait.go ├── changes.go ├── restart.go ├── debugtrap_unix.go ├── pause.go ├── unpause.go ├── exec_linux.go ├── config_experimental.go ├── stop.go ├── logdrivers_linux.go ├── stats_windows.go ├── resize.go ├── volumes_windows.go ├── export.go └── daemon_aufs.go ├── docs ├── .gitignore ├── userguide │ ├── search.png │ ├── webapp1.png │ ├── login-web.png │ └── register-web.png ├── project │ └── images │ │ ├── box.png │ │ ├── checked.png │ │ ├── gordon.jpeg │ │ ├── in_room.png │ │ ├── branch-sig.png │ │ ├── copy_url.png │ │ ├── easy_issue.png │ │ ├── fixes_num.png │ │ ├── git_bash.png │ │ ├── give_try.png │ │ ├── irc_chat.png │ │ ├── irc_login.png │ │ ├── issue_list.png │ │ ├── proposal.png │ │ ├── red_notice.png │ │ ├── to_from_pr.png │ │ ├── fork_docker.png │ │ ├── include_gcc.png │ │ ├── irc_connect.png │ │ ├── list_example.png │ │ ├── register_nic.png │ │ ├── three_terms.png │ │ ├── existing_issue.png │ │ ├── fresh_container.png │ │ ├── irc_after_login.png │ │ ├── latest_commits.png │ │ ├── locate_branch.png │ │ ├── path_variable.png │ │ ├── proposal.snagproj │ │ ├── register_email.png │ │ ├── three_running.png │ │ ├── windows-mingw.png │ │ ├── commits_expected.png │ │ ├── contributor-edit.png │ │ ├── pull_request_made.png │ │ ├── windows-env-vars.png │ │ └── existing_issue.snagproj ├── docker-hub │ └── hub-images │ │ ├── hub.png │ │ ├── orgs.png │ │ ├── repos.png │ │ ├── bb_hooks.png │ │ ├── bb_menu.png │ │ ├── gh_menu.png │ │ ├── groups.png │ │ ├── invite.png │ │ ├── dashboard.png │ │ ├── deploy_key.png │ │ ├── bb_post-hook.png │ │ ├── build-trigger.png │ │ ├── gh_settings.png │ │ ├── gh_org_members.png │ │ ├── gh_service_hook.png │ │ ├── gh_team_members.png │ │ ├── gh_docker-service.png │ │ ├── gh_repo_deploy_key.png │ │ ├── gh_add_ssh_user_key.png │ │ ├── org-repo-collaborators.png │ │ ├── gh-check-admin-org-dh-app-access.png │ │ └── gh-check-user-org-dh-app-access.png ├── static_files │ ├── contributors.png │ ├── dockerlogo-v.png │ ├── docker_pull_chart.png │ ├── docker_push_chart.png │ ├── docker-logo-compressed.png │ └── README.md ├── installation │ └── images │ │ ├── bad_host.png │ │ ├── cool_view.png │ │ ├── good_host.png │ │ ├── kitematic.png │ │ ├── newsite_view.png │ │ ├── osx-installer.png │ │ ├── windows-installer.png │ │ ├── windows-boot2docker-cmd.png │ │ ├── windows-boot2docker-start.png │ │ └── windows-boot2docker-powershell.png ├── reference │ ├── api │ │ ├── images │ │ │ └── event_state.png │ │ ├── _static │ │ │ └── io_oauth_authorization_page.png │ │ ├── docker-io_api.md │ │ └── README.md │ └── commandline │ │ ├── docker_images.gif │ │ ├── top.md │ │ ├── wait.md │ │ ├── rename.md │ │ ├── restart.md │ │ ├── logout.md │ │ ├── start.md │ │ ├── push.md │ │ ├── kill.md │ │ ├── tag.md │ │ └── stop.md ├── security │ └── trust │ │ ├── images │ │ ├── trust_view.png │ │ ├── tag_signing.png │ │ ├── trust_signing.png │ │ └── trust_components.png │ │ └── index.md ├── articles │ ├── b2d_volume_images │ │ ├── add_cd.png │ │ ├── gparted.png │ │ ├── gparted2.png │ │ ├── verify.png │ │ ├── add_volume.png │ │ ├── boot_order.png │ │ └── add_new_controller.png │ └── https │ │ ├── Dockerfile │ │ └── parsedocs.sh ├── terms │ └── images │ │ ├── docker-filesystems-debian.png │ │ ├── docker-filesystems-debianrw.png │ │ ├── docker-filesystems-generic.png │ │ ├── docker-filesystems-busyboxrw.png │ │ ├── docker-filesystems-multilayer.png │ │ └── docker-filesystems-multiroot.png ├── Dockerfile ├── examples │ ├── supervisord.conf │ └── apt-cacher-ng.Dockerfile ├── misc │ └── search.md ├── touch-up.sh └── extend │ └── index.md ├── docker ├── docker_windows.go ├── README.md ├── daemon_none.go └── daemon_windows.go ├── api ├── server │ └── server_stub.go ├── README.md ├── client │ ├── client.go │ ├── network.go │ └── service.go └── api_unit_test.go ├── opts ├── hosts_unix.go ├── hosts_windows.go └── ip.go ├── integration-cli ├── test_vars_exec.go ├── docker_test_vars_daemon.go ├── test_vars_noexec.go ├── docker_test_vars_cli.go ├── test_vars_unix.go ├── test_vars_windows.go ├── docker_cli_login_test.go ├── docker_api_exec_resize_test.go └── docker_api_version_test.go ├── utils ├── experimental.go └── stubs.go ├── man ├── docker-rename.1.md ├── Dockerfile └── md2man-all.sh ├── graph ├── load_unsupported.go └── tags │ └── tags_unit_test.go ├── cli ├── client.go └── common.go └── dockerinit └── dockerinit.go /pkg/sockets/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hack/make/.build-deb/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | bundles 2 | .gopath 3 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 1.8.1-clear-containers 2 | -------------------------------------------------------------------------------- /hack/make/.build-deb/docs: -------------------------------------------------------------------------------- 1 | README.md 2 | -------------------------------------------------------------------------------- /project/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | ../CONTRIBUTING.md -------------------------------------------------------------------------------- /runconfig/fixtures/valid.env: -------------------------------------------------------------------------------- 1 | ENV1=value1 2 | -------------------------------------------------------------------------------- /runconfig/fixtures/valid.label: -------------------------------------------------------------------------------- 1 | LABEL1=value1 2 | -------------------------------------------------------------------------------- /vendor/src/gopkg.in/fsnotify.v1/NotUsed.xcworkspace: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hack/make/.build-deb/docker-engine.manpages: -------------------------------------------------------------------------------- 1 | man/man*/* 2 | -------------------------------------------------------------------------------- /vendor/src/github.com/Sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /vendor/src/github.com/mistifyio/go-zfs/.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant 2 | -------------------------------------------------------------------------------- /contrib/REVIEWERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | -------------------------------------------------------------------------------- /hack/make/.build-deb/docker-engine.udev: -------------------------------------------------------------------------------- 1 | ../../../contrib/udev/80-docker.rules -------------------------------------------------------------------------------- /vendor/src/github.com/endophage/gotuf/.gitignore: -------------------------------------------------------------------------------- 1 | /db/ 2 | *.bkp 3 | *.swp 4 | -------------------------------------------------------------------------------- /vendor/src/github.com/mattn/go-sqlite3/.gitignore: -------------------------------------------------------------------------------- 1 | *.db 2 | *.exe 3 | *.dll 4 | -------------------------------------------------------------------------------- /daemon/logger/gelf/gelf_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package gelf 4 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/.gitignore: -------------------------------------------------------------------------------- 1 | [568].out 2 | _go* 3 | _test* 4 | _obj 5 | -------------------------------------------------------------------------------- /daemon/logger/syslog/syslog_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package syslog 4 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | # avoid commiting the awsconfig file used for releases 2 | awsconfig 3 | -------------------------------------------------------------------------------- /hack/make/.build-deb/docker-engine.bash-completion: -------------------------------------------------------------------------------- 1 | contrib/completion/bash/docker 2 | -------------------------------------------------------------------------------- /pkg/chrootarchive/init_windows.go: -------------------------------------------------------------------------------- 1 | package chrootarchive 2 | 3 | func init() { 4 | } 5 | -------------------------------------------------------------------------------- /contrib/syntax/textmate/REVIEWERS: -------------------------------------------------------------------------------- 1 | Asbjorn Enge (@asbjornenge) 2 | -------------------------------------------------------------------------------- /daemon/logger/journald/journald_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package journald 4 | -------------------------------------------------------------------------------- /hack/make/.build-deb/docker-engine.docker.init: -------------------------------------------------------------------------------- 1 | ../../../contrib/init/sysvinit-debian/docker -------------------------------------------------------------------------------- /hack/make/.build-deb/docker-engine.docker.upstart: -------------------------------------------------------------------------------- 1 | ../../../contrib/init/upstart/docker.conf -------------------------------------------------------------------------------- /pkg/archive/README.md: -------------------------------------------------------------------------------- 1 | This code provides helper functions for dealing with archive files. 2 | -------------------------------------------------------------------------------- /pkg/stringutils/README.md: -------------------------------------------------------------------------------- 1 | This package provides helper functions for dealing with strings 2 | -------------------------------------------------------------------------------- /pkg/sysinfo/README.md: -------------------------------------------------------------------------------- 1 | SysInfo stores information about which features a kernel supports. 2 | -------------------------------------------------------------------------------- /vendor/src/github.com/go-check/check/.gitignore: -------------------------------------------------------------------------------- 1 | _* 2 | *.swp 3 | *.[568] 4 | [568].out 5 | -------------------------------------------------------------------------------- /daemon/graphdriver/btrfs/dummy_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux !cgo 2 | 3 | package btrfs 4 | -------------------------------------------------------------------------------- /daemon/graphdriver/overlay/overlay_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package overlay 4 | -------------------------------------------------------------------------------- /daemon/graphdriver/vfs/driver_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package vfs 4 | -------------------------------------------------------------------------------- /hack/make/.build-deb/docker-engine.docker.default: -------------------------------------------------------------------------------- 1 | ../../../contrib/init/sysvinit-debian/docker.default -------------------------------------------------------------------------------- /pkg/stringid/README.md: -------------------------------------------------------------------------------- 1 | This package provides helper functions for dealing with string identifiers 2 | -------------------------------------------------------------------------------- /vendor/src/github.com/BurntSushi/toml/session.vim: -------------------------------------------------------------------------------- 1 | au BufWritePost *.go silent!make tags > /dev/null 2>&1 2 | -------------------------------------------------------------------------------- /vendor/src/github.com/go-check/check/TODO: -------------------------------------------------------------------------------- 1 | - Assert(slice, Contains, item) 2 | - Parallel test support 3 | -------------------------------------------------------------------------------- /vendor/src/github.com/tent/canonical-json-go/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.1 4 | - tip 5 | -------------------------------------------------------------------------------- /contrib/httpserver/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | EXPOSE 80/tcp 3 | COPY httpserver . 4 | CMD ["./httpserver"] 5 | -------------------------------------------------------------------------------- /docs/userguide/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/userguide/search.png -------------------------------------------------------------------------------- /docs/userguide/webapp1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/userguide/webapp1.png -------------------------------------------------------------------------------- /pkg/signal/README.md: -------------------------------------------------------------------------------- 1 | This package provides helper functions for dealing with signals across various operating systems -------------------------------------------------------------------------------- /vendor/src/github.com/BurntSushi/toml/.gitignore: -------------------------------------------------------------------------------- 1 | TAGS 2 | tags 3 | .*.swp 4 | tomlcheck/tomlcheck 5 | toml.test 6 | -------------------------------------------------------------------------------- /vendor/src/github.com/endophage/gotuf/MAINTAINERS: -------------------------------------------------------------------------------- 1 | David Lawrence (github: endophage) 2 | -------------------------------------------------------------------------------- /contrib/syntax/vim/ftdetect/dockerfile.vim: -------------------------------------------------------------------------------- 1 | au BufNewFile,BufRead [Dd]ockerfile,Dockerfile.* set filetype=dockerfile 2 | -------------------------------------------------------------------------------- /docker/docker_windows.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | _ "github.com/docker/docker/autogen/winresources" 5 | ) 6 | -------------------------------------------------------------------------------- /docs/project/images/box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/box.png -------------------------------------------------------------------------------- /docs/userguide/login-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/userguide/login-web.png -------------------------------------------------------------------------------- /pkg/ioutils/scheduler.go: -------------------------------------------------------------------------------- 1 | // +build !gccgo 2 | 3 | package ioutils 4 | 5 | func callSchedulerIfNecessary() { 6 | } 7 | -------------------------------------------------------------------------------- /vendor/src/github.com/fluent/fluent-logger-golang/fluent/version.go: -------------------------------------------------------------------------------- 1 | package fluent 2 | 3 | const Version = "0.5.1" 4 | -------------------------------------------------------------------------------- /vendor/src/github.com/gorilla/mux/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.0 5 | - 1.1 6 | - 1.2 7 | - tip 8 | -------------------------------------------------------------------------------- /contrib/completion/REVIEWERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | Jessie Frazelle (@jfrazelle) 3 | -------------------------------------------------------------------------------- /docs/project/images/checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/checked.png -------------------------------------------------------------------------------- /docs/project/images/gordon.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/gordon.jpeg -------------------------------------------------------------------------------- /docs/project/images/in_room.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/in_room.png -------------------------------------------------------------------------------- /docs/userguide/register-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/userguide/register-web.png -------------------------------------------------------------------------------- /pkg/archive/testdata/broken.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/pkg/archive/testdata/broken.tar -------------------------------------------------------------------------------- /pkg/useragent/README.md: -------------------------------------------------------------------------------- 1 | This package provides helper functions to pack version information into a single User-Agent header. 2 | -------------------------------------------------------------------------------- /vendor/src/github.com/gorilla/context/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.0 5 | - 1.1 6 | - 1.2 7 | - tip 8 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/cgroups/fs/fs_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package fs 4 | -------------------------------------------------------------------------------- /api/server/server_stub.go: -------------------------------------------------------------------------------- 1 | // +build !experimental 2 | 3 | package server 4 | 5 | func (s *Server) registerSubRouter() { 6 | } 7 | -------------------------------------------------------------------------------- /contrib/completion/zsh/REVIEWERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | Jessie Frazelle (@jfrazelle) 3 | -------------------------------------------------------------------------------- /contrib/init/upstart/REVIEWERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | Jessie Frazelle (@jfrazelle) 3 | -------------------------------------------------------------------------------- /daemon/graphdriver/zfs/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Jörg Thalheim (@Mic92) 2 | Arthur Gautier (@baloose) 3 | -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/hub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/hub.png -------------------------------------------------------------------------------- /docs/project/images/branch-sig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/branch-sig.png -------------------------------------------------------------------------------- /docs/project/images/copy_url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/copy_url.png -------------------------------------------------------------------------------- /docs/project/images/easy_issue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/easy_issue.png -------------------------------------------------------------------------------- /docs/project/images/fixes_num.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/fixes_num.png -------------------------------------------------------------------------------- /docs/project/images/git_bash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/git_bash.png -------------------------------------------------------------------------------- /docs/project/images/give_try.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/give_try.png -------------------------------------------------------------------------------- /docs/project/images/irc_chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/irc_chat.png -------------------------------------------------------------------------------- /docs/project/images/irc_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/irc_login.png -------------------------------------------------------------------------------- /docs/project/images/issue_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/issue_list.png -------------------------------------------------------------------------------- /docs/project/images/proposal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/proposal.png -------------------------------------------------------------------------------- /docs/project/images/red_notice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/red_notice.png -------------------------------------------------------------------------------- /docs/project/images/to_from_pr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/to_from_pr.png -------------------------------------------------------------------------------- /docs/static_files/contributors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/static_files/contributors.png -------------------------------------------------------------------------------- /docs/static_files/dockerlogo-v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/static_files/dockerlogo-v.png -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/cgroups/cgroups_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package cgroups 4 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/criurpc/Makefile: -------------------------------------------------------------------------------- 1 | gen: criurpc.proto 2 | protoc --go_out=. criurpc.proto 3 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/seccomp/seccomp_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package seccomp 4 | -------------------------------------------------------------------------------- /vendor/src/github.com/vishvananda/netlink/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | install: 3 | - go get github.com/vishvananda/netns 4 | -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/orgs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/orgs.png -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/repos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/repos.png -------------------------------------------------------------------------------- /docs/project/images/fork_docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/fork_docker.png -------------------------------------------------------------------------------- /docs/project/images/include_gcc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/include_gcc.png -------------------------------------------------------------------------------- /docs/project/images/irc_connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/irc_connect.png -------------------------------------------------------------------------------- /docs/project/images/list_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/list_example.png -------------------------------------------------------------------------------- /docs/project/images/register_nic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/register_nic.png -------------------------------------------------------------------------------- /docs/project/images/three_terms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/three_terms.png -------------------------------------------------------------------------------- /pkg/tarsum/testdata/xattr/layer.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/pkg/tarsum/testdata/xattr/layer.tar -------------------------------------------------------------------------------- /vendor/src/github.com/mattn/go-sqlite3/sqlite3-binding.c: -------------------------------------------------------------------------------- 1 | #ifndef USE_LIBSQLITE3 2 | # include "code/sqlite3-binding.c" 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/bb_hooks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/bb_hooks.png -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/bb_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/bb_menu.png -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/gh_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/gh_menu.png -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/groups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/groups.png -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/invite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/invite.png -------------------------------------------------------------------------------- /docs/installation/images/bad_host.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/installation/images/bad_host.png -------------------------------------------------------------------------------- /docs/installation/images/cool_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/installation/images/cool_view.png -------------------------------------------------------------------------------- /docs/installation/images/good_host.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/installation/images/good_host.png -------------------------------------------------------------------------------- /docs/installation/images/kitematic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/installation/images/kitematic.png -------------------------------------------------------------------------------- /docs/project/images/existing_issue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/existing_issue.png -------------------------------------------------------------------------------- /docs/project/images/fresh_container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/fresh_container.png -------------------------------------------------------------------------------- /docs/project/images/irc_after_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/irc_after_login.png -------------------------------------------------------------------------------- /docs/project/images/latest_commits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/latest_commits.png -------------------------------------------------------------------------------- /docs/project/images/locate_branch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/locate_branch.png -------------------------------------------------------------------------------- /docs/project/images/path_variable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/path_variable.png -------------------------------------------------------------------------------- /docs/project/images/proposal.snagproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/proposal.snagproj -------------------------------------------------------------------------------- /docs/project/images/register_email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/register_email.png -------------------------------------------------------------------------------- /docs/project/images/three_running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/three_running.png -------------------------------------------------------------------------------- /docs/project/images/windows-mingw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/windows-mingw.png -------------------------------------------------------------------------------- /docs/static_files/docker_pull_chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/static_files/docker_pull_chart.png -------------------------------------------------------------------------------- /docs/static_files/docker_push_chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/static_files/docker_push_chart.png -------------------------------------------------------------------------------- /hack/make/.resources-windows/docker.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/hack/make/.resources-windows/docker.ico -------------------------------------------------------------------------------- /hack/make/.resources-windows/docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/hack/make/.resources-windows/docker.png -------------------------------------------------------------------------------- /vendor/src/github.com/godbus/dbus/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Brandon Philips (@philips) 2 | Brian Waldon (@bcwaldon) 3 | -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/dashboard.png -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/deploy_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/deploy_key.png -------------------------------------------------------------------------------- /docs/installation/images/newsite_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/installation/images/newsite_view.png -------------------------------------------------------------------------------- /docs/project/images/commits_expected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/commits_expected.png -------------------------------------------------------------------------------- /docs/project/images/contributor-edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/contributor-edit.png -------------------------------------------------------------------------------- /docs/project/images/pull_request_made.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/pull_request_made.png -------------------------------------------------------------------------------- /docs/project/images/windows-env-vars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/windows-env-vars.png -------------------------------------------------------------------------------- /docs/reference/api/images/event_state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/reference/api/images/event_state.png -------------------------------------------------------------------------------- /docs/security/trust/images/trust_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/security/trust/images/trust_view.png -------------------------------------------------------------------------------- /hack/make/.integration-daemon-setup: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | bundle .ensure-emptyfs 4 | bundle .ensure-frozen-images 5 | bundle .ensure-httpserver 6 | -------------------------------------------------------------------------------- /docs/articles/b2d_volume_images/add_cd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/articles/b2d_volume_images/add_cd.png -------------------------------------------------------------------------------- /docs/articles/b2d_volume_images/gparted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/articles/b2d_volume_images/gparted.png -------------------------------------------------------------------------------- /docs/articles/b2d_volume_images/gparted2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/articles/b2d_volume_images/gparted2.png -------------------------------------------------------------------------------- /docs/articles/b2d_volume_images/verify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/articles/b2d_volume_images/verify.png -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/bb_post-hook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/bb_post-hook.png -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/build-trigger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/build-trigger.png -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/gh_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/gh_settings.png -------------------------------------------------------------------------------- /docs/installation/images/osx-installer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/installation/images/osx-installer.png -------------------------------------------------------------------------------- /docs/project/images/existing_issue.snagproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/project/images/existing_issue.snagproj -------------------------------------------------------------------------------- /docs/reference/commandline/docker_images.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/reference/commandline/docker_images.gif -------------------------------------------------------------------------------- /docs/security/trust/images/tag_signing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/security/trust/images/tag_signing.png -------------------------------------------------------------------------------- /docs/security/trust/images/trust_signing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/security/trust/images/trust_signing.png -------------------------------------------------------------------------------- /docs/static_files/docker-logo-compressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/static_files/docker-logo-compressed.png -------------------------------------------------------------------------------- /vendor/src/github.com/coreos/go-etcd/etcd/version.go: -------------------------------------------------------------------------------- 1 | package etcd 2 | 3 | const ( 4 | version = "v2" 5 | packageVersion = "v2.0.0" 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/src/github.com/vishvananda/netns/netns_linux_386.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 2 | 3 | package netns 4 | 5 | const ( 6 | SYS_SETNS = 346 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/src/github.com/vishvananda/netns/netns_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // +build linux,amd64 2 | 3 | package netns 4 | 5 | const ( 6 | SYS_SETNS = 308 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/src/github.com/vishvananda/netns/netns_linux_arm.go: -------------------------------------------------------------------------------- 1 | // +build linux,arm 2 | 3 | package netns 4 | 5 | const ( 6 | SYS_SETNS = 375 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/src/github.com/vishvananda/netns/netns_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // +build linux,arm64 2 | 3 | package netns 4 | 5 | const ( 6 | SYS_SETNS = 268 7 | ) 8 | -------------------------------------------------------------------------------- /daemon/debugtrap_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!darwin,!freebsd,!windows 2 | 3 | package daemon 4 | 5 | func setupDumpStackTrap() { 6 | return 7 | } 8 | -------------------------------------------------------------------------------- /daemon/execdriver/windows/clean.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package windows 4 | 5 | func (d *driver) Clean(id string) error { 6 | return nil 7 | } 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /docs/articles/b2d_volume_images/add_volume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/articles/b2d_volume_images/add_volume.png -------------------------------------------------------------------------------- /docs/articles/b2d_volume_images/boot_order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/articles/b2d_volume_images/boot_order.png -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/gh_org_members.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/gh_org_members.png -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/gh_service_hook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/gh_service_hook.png -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/gh_team_members.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/gh_team_members.png -------------------------------------------------------------------------------- /docs/installation/images/windows-installer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/installation/images/windows-installer.png -------------------------------------------------------------------------------- /opts/hosts_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package opts 4 | 5 | import "fmt" 6 | 7 | var DefaultHost = fmt.Sprintf("unix://%s", DefaultUnixSocket) 8 | -------------------------------------------------------------------------------- /pkg/graphdb/conn_sqlite3_windows.go: -------------------------------------------------------------------------------- 1 | // +build cgo,windows 2 | 3 | package graphdb 4 | 5 | import _ "github.com/mattn/go-sqlite3" // registers sqlite 6 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/nsenter/nsenter_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux !cgo 2 | 3 | package nsenter 4 | 5 | import "C" 6 | -------------------------------------------------------------------------------- /vendor/src/github.com/vishvananda/netns/netns_linux_ppc64le.go: -------------------------------------------------------------------------------- 1 | // +build linux,ppc64le 2 | 3 | package netns 4 | 5 | const ( 6 | SYS_SETNS = 350 7 | ) 8 | -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/gh_docker-service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/gh_docker-service.png -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/gh_repo_deploy_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/gh_repo_deploy_key.png -------------------------------------------------------------------------------- /docs/security/trust/images/trust_components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/security/trust/images/trust_components.png -------------------------------------------------------------------------------- /docs/terms/images/docker-filesystems-debian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/terms/images/docker-filesystems-debian.png -------------------------------------------------------------------------------- /docs/terms/images/docker-filesystems-debianrw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/terms/images/docker-filesystems-debianrw.png -------------------------------------------------------------------------------- /docs/terms/images/docker-filesystems-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/terms/images/docker-filesystems-generic.png -------------------------------------------------------------------------------- /pkg/graphdb/conn_sqlite3_unix.go: -------------------------------------------------------------------------------- 1 | // +build cgo,!windows 2 | 3 | package graphdb 4 | 5 | import _ "code.google.com/p/gosqlite/sqlite3" // registers sqlite 6 | -------------------------------------------------------------------------------- /vendor/src/github.com/Sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.2 4 | - 1.3 5 | - 1.4 6 | - tip 7 | install: 8 | - go get -t ./... 9 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/resolvconf/README.md: -------------------------------------------------------------------------------- 1 | Package resolvconf provides utility code to query and update DNS configuration in /etc/resolv.conf 2 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/stacktrace/stacktrace.go: -------------------------------------------------------------------------------- 1 | package stacktrace 2 | 3 | type Stacktrace struct { 4 | Frames []Frame 5 | } 6 | -------------------------------------------------------------------------------- /vendor/src/github.com/philhofer/fwd/writer_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package fwd 4 | 5 | func unsafestr(s string) []byte { return []byte(s) } 6 | -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/gh_add_ssh_user_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/gh_add_ssh_user_key.png -------------------------------------------------------------------------------- /docs/terms/images/docker-filesystems-busyboxrw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/terms/images/docker-filesystems-busyboxrw.png -------------------------------------------------------------------------------- /docs/terms/images/docker-filesystems-multilayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/terms/images/docker-filesystems-multilayer.png -------------------------------------------------------------------------------- /docs/terms/images/docker-filesystems-multiroot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/terms/images/docker-filesystems-multiroot.png -------------------------------------------------------------------------------- /pkg/sysinfo/sysinfo_windows.go: -------------------------------------------------------------------------------- 1 | package sysinfo 2 | 3 | // TODO Windows 4 | func New(quiet bool) *SysInfo { 5 | sysInfo := &SysInfo{} 6 | return sysInfo 7 | } 8 | -------------------------------------------------------------------------------- /vendor/src/github.com/BurntSushi/toml/COMPATIBLE: -------------------------------------------------------------------------------- 1 | Compatible with TOML version 2 | [v0.2.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md) 3 | 4 | -------------------------------------------------------------------------------- /vendor/src/github.com/mattn/go-sqlite3/sqlite3-binding.h: -------------------------------------------------------------------------------- 1 | #ifndef USE_LIBSQLITE3 2 | #include "code/sqlite3-binding.h" 3 | #else 4 | #include 5 | #endif 6 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/configs/namespaces.go: -------------------------------------------------------------------------------- 1 | package configs 2 | 3 | type NamespaceType string 4 | 5 | type Namespaces []Namespace 6 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/stats_freebsd.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | type Stats struct { 4 | Interfaces []*NetworkInterface 5 | } 6 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/stats_windows.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | type Stats struct { 4 | Interfaces []*NetworkInterface 5 | } 6 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/user/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | Aleksa Sarai (@cyphar) 3 | -------------------------------------------------------------------------------- /daemon/daemon_zfs.go: -------------------------------------------------------------------------------- 1 | // +build !exclude_graphdriver_zfs,linux 2 | 3 | package daemon 4 | 5 | import ( 6 | _ "github.com/docker/docker/daemon/graphdriver/zfs" 7 | ) 8 | -------------------------------------------------------------------------------- /docs/articles/b2d_volume_images/add_new_controller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/articles/b2d_volume_images/add_new_controller.png -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/org-repo-collaborators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/org-repo-collaborators.png -------------------------------------------------------------------------------- /docs/installation/images/windows-boot2docker-cmd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/installation/images/windows-boot2docker-cmd.png -------------------------------------------------------------------------------- /docs/installation/images/windows-boot2docker-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/installation/images/windows-boot2docker-start.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/types.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | package pty 4 | 5 | import "C" 6 | 7 | type ( 8 | _C_int C.int 9 | _C_uint C.uint 10 | ) 11 | -------------------------------------------------------------------------------- /daemon/daemon_btrfs.go: -------------------------------------------------------------------------------- 1 | // +build !exclude_graphdriver_btrfs,linux 2 | 3 | package daemon 4 | 5 | import ( 6 | _ "github.com/docker/docker/daemon/graphdriver/btrfs" 7 | ) 8 | -------------------------------------------------------------------------------- /opts/hosts_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package opts 4 | 5 | import "fmt" 6 | 7 | var DefaultHost = fmt.Sprintf("tcp://%s:%d", DefaultHTTPHost, DefaultHTTPPort) 8 | -------------------------------------------------------------------------------- /contrib/host-integration/Dockerfile.min: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | MAINTAINER Guillaume J. Charmes 3 | ADD manager /usr/bin/ 4 | ENTRYPOINT ["/usr/bin/manager"] 5 | -------------------------------------------------------------------------------- /daemon/daemon_overlay.go: -------------------------------------------------------------------------------- 1 | // +build !exclude_graphdriver_overlay,linux 2 | 3 | package daemon 4 | 5 | import ( 6 | _ "github.com/docker/docker/daemon/graphdriver/overlay" 7 | ) 8 | -------------------------------------------------------------------------------- /docs/installation/images/windows-boot2docker-powershell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/installation/images/windows-boot2docker-powershell.png -------------------------------------------------------------------------------- /docs/reference/api/_static/io_oauth_authorization_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/reference/api/_static/io_oauth_authorization_page.png -------------------------------------------------------------------------------- /pkg/system/meminfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package system 4 | 5 | func ReadMemInfo() (*MemInfo, error) { 6 | return nil, ErrNotSupportedPlatform 7 | } 8 | -------------------------------------------------------------------------------- /vendor/src/github.com/godbus/dbus/transport_darwin.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | func (t *unixTransport) SendNullByte() error { 4 | _, err := t.Write([]byte{0}) 5 | return err 6 | } 7 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/sandbox/neigh_freebsd.go: -------------------------------------------------------------------------------- 1 | package sandbox 2 | 3 | // NeighOption is a function option type to set neighbor options 4 | type NeighOption func() 5 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/sandbox/neigh_windows.go: -------------------------------------------------------------------------------- 1 | package sandbox 2 | 3 | // NeighOption is a function option type to set neighbor options 4 | type NeighOption func() 5 | -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/gh-check-admin-org-dh-app-access.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/gh-check-admin-org-dh-app-access.png -------------------------------------------------------------------------------- /docs/docker-hub/hub-images/gh-check-user-org-dh-app-access.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clearlinux/docker/clr-1.8.1-submit/docs/docker-hub/hub-images/gh-check-user-org-dh-app-access.png -------------------------------------------------------------------------------- /integration-cli/test_vars_exec.go: -------------------------------------------------------------------------------- 1 | // +build !test_no_exec 2 | 3 | package main 4 | 5 | const ( 6 | // indicates docker daemon tested supports 'docker exec' 7 | supportsExec = true 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/src/github.com/Sirupsen/logrus/terminal_openbsd.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import "syscall" 4 | 5 | const ioctlReadTermios = syscall.TIOCGETA 6 | 7 | type Termios syscall.Termios 8 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/sandbox/interface_freebsd.go: -------------------------------------------------------------------------------- 1 | package sandbox 2 | 3 | // IfaceOption is a function option type to set interface options 4 | type IfaceOption func() 5 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/sandbox/interface_windows.go: -------------------------------------------------------------------------------- 1 | package sandbox 2 | 3 | // IfaceOption is a function option type to set interface options 4 | type IfaceOption func() 5 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libtrust/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes 2 | Josh Hawn (github: jlhawn) 3 | Derek McGowan (github: dmcgowan) 4 | -------------------------------------------------------------------------------- /contrib/init/systemd/REVIEWERS: -------------------------------------------------------------------------------- 1 | Lokesh Mandvekar (@lsm5) 2 | Brandon Philips (@philips) 3 | Jessie Frazelle (@jfrazelle) 4 | -------------------------------------------------------------------------------- /daemon/daemon_devicemapper.go: -------------------------------------------------------------------------------- 1 | // +build !exclude_graphdriver_devicemapper,linux 2 | 3 | package daemon 4 | 5 | import ( 6 | _ "github.com/docker/docker/daemon/graphdriver/devmapper" 7 | ) 8 | -------------------------------------------------------------------------------- /daemon/execdriver/lxc/lxc_init_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package lxc 4 | 5 | func finalizeNamespace(args *InitArgs) error { 6 | panic("Not supported on this platform") 7 | } 8 | -------------------------------------------------------------------------------- /integration-cli/docker_test_vars_daemon.go: -------------------------------------------------------------------------------- 1 | // +build daemon 2 | 3 | package main 4 | 5 | const ( 6 | // tests can assume daemon runs on the same machine as CLI 7 | isLocalDaemon = true 8 | ) 9 | -------------------------------------------------------------------------------- /integration-cli/test_vars_noexec.go: -------------------------------------------------------------------------------- 1 | // +build test_no_exec 2 | 3 | package main 4 | 5 | const ( 6 | // indicates docker daemon tested supports 'docker exec' 7 | supportsExec = false 8 | ) 9 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/netlink/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Michael Crosby (@crosbymichael) 2 | Guillaume J. Charmes (@creack) 3 | -------------------------------------------------------------------------------- /integration-cli/docker_test_vars_cli.go: -------------------------------------------------------------------------------- 1 | // +build !daemon 2 | 3 | package main 4 | 5 | const ( 6 | // tests should not assume daemon runs on the same machine as CLI 7 | isLocalDaemon = false 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/drivers/bridge/netlink_deprecated_linux_armppc64.go: -------------------------------------------------------------------------------- 1 | // +build arm ppc64 2 | 3 | package bridge 4 | 5 | func ifrDataByte(b byte) uint8 { 6 | return uint8(b) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/drivers/bridge/netlink_deprecated_linux_notarm.go: -------------------------------------------------------------------------------- 1 | // +build !arm,!ppc64 2 | 3 | package bridge 4 | 5 | func ifrDataByte(b byte) int8 { 6 | return int8(b) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/src/github.com/endophage/gotuf/store/errors.go: -------------------------------------------------------------------------------- 1 | package store 2 | 3 | type ErrMetaNotFound struct{} 4 | 5 | func (err ErrMetaNotFound) Error() string { 6 | return "no trust data available" 7 | } 8 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/ztypes_386.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types.go 3 | 4 | package pty 5 | 6 | type ( 7 | _C_int int32 8 | _C_uint uint32 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/ztypes_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types.go 3 | 4 | package pty 5 | 6 | type ( 7 | _C_int int32 8 | _C_uint uint32 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/ztypes_arm.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types.go 3 | 4 | package pty 5 | 6 | type ( 7 | _C_int int32 8 | _C_uint uint32 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/netlink/netlink_linux_armppc64.go: -------------------------------------------------------------------------------- 1 | // +build arm ppc64 2 | 3 | package netlink 4 | 5 | func ifrDataByte(b byte) uint8 { 6 | return uint8(b) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/netlink/netlink_linux_notarm.go: -------------------------------------------------------------------------------- 1 | // +build !arm,!ppc64 2 | 3 | package netlink 4 | 5 | func ifrDataByte(b byte) int8 { 6 | return int8(b) 7 | } 8 | -------------------------------------------------------------------------------- /docs/articles/https/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian 2 | 3 | RUN apt-get update && apt-get install -yq openssl 4 | 5 | ADD make_certs.sh / 6 | 7 | 8 | WORKDIR /data 9 | VOLUME ["/data"] 10 | CMD /make_certs.sh 11 | -------------------------------------------------------------------------------- /pkg/system/filesys.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "os" 7 | ) 8 | 9 | func MkdirAll(path string, perm os.FileMode) error { 10 | return os.MkdirAll(path, perm) 11 | } 12 | -------------------------------------------------------------------------------- /pkg/system/umask.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | func Umask(newmask int) (oldmask int, err error) { 10 | return syscall.Umask(newmask), nil 11 | } 12 | -------------------------------------------------------------------------------- /pkg/system/umask_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | func Umask(newmask int) (oldmask int, err error) { 6 | // should not be called on cli code path 7 | return 0, ErrNotSupportedPlatform 8 | } 9 | -------------------------------------------------------------------------------- /vendor/src/github.com/endophage/gotuf/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Aaron Lehmann (github: aaronlehmann) 2 | Lewis Marshall (github: lmars) 3 | Jonathan Rudenberg (github: titanous) 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/ztypes_arm64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types.go 3 | 4 | // +build arm64 5 | 6 | package pty 7 | 8 | type ( 9 | _C_int int32 10 | _C_uint uint32 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/ztypes_ppc64.go: -------------------------------------------------------------------------------- 1 | // +build ppc64 2 | 3 | // Created by cgo -godefs - DO NOT EDIT 4 | // cgo -godefs types.go 5 | 6 | package pty 7 | 8 | type ( 9 | _C_int int32 10 | _C_uint uint32 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/ztypes_s390x.go: -------------------------------------------------------------------------------- 1 | // +build s390x 2 | 3 | // Created by cgo -godefs - DO NOT EDIT 4 | // cgo -godefs types.go 5 | 6 | package pty 7 | 8 | type ( 9 | _C_int int32 10 | _C_uint uint32 11 | ) 12 | -------------------------------------------------------------------------------- /daemon/config_stub.go: -------------------------------------------------------------------------------- 1 | // +build !experimental 2 | 3 | package daemon 4 | 5 | import flag "github.com/docker/docker/pkg/mflag" 6 | 7 | func (config *Config) attachExperimentalFlags(cmd *flag.FlagSet, usageFn func(string) string) { 8 | } 9 | -------------------------------------------------------------------------------- /integration-cli/test_vars_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package main 4 | 5 | const ( 6 | // identifies if test suite is running on a unix platform 7 | isUnixCli = true 8 | 9 | expectedFileChmod = "-rw-r--r--" 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/hostdiscovery/libnetwork.toml: -------------------------------------------------------------------------------- 1 | title = "LibNetwork Configuration file" 2 | 3 | [cluster] 4 | discovery = "token://08469efb104bce980931ed24c8eb03a2" 5 | Address = "1.1.1.1" 6 | Heartbeat = 3 7 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/ztypes_ppc64le.go: -------------------------------------------------------------------------------- 1 | // +build ppc64le 2 | 3 | // Created by cgo -godefs - DO NOT EDIT 4 | // cgo -godefs types.go 5 | 6 | package pty 7 | 8 | type ( 9 | _C_int int32 10 | _C_uint uint32 11 | ) 12 | -------------------------------------------------------------------------------- /daemon/graphdriver/zfs/zfs_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd 2 | 3 | package zfs 4 | 5 | func checkRootdirFs(rootdir string) error { 6 | return nil 7 | } 8 | 9 | func getMountpoint(id string) string { 10 | return id 11 | } 12 | -------------------------------------------------------------------------------- /daemon/utils_nounix.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package daemon 4 | 5 | func selinuxSetDisabled() { 6 | } 7 | 8 | func selinuxFreeLxcContexts(label string) { 9 | } 10 | 11 | func selinuxEnabled() bool { 12 | return false 13 | } 14 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/distribution/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes (@shykes) 2 | Olivier Gambier (@dmp42) 3 | Sam Alba (@samalba) 4 | Stephen Day (@stevvooe) 5 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/pty_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!darwin,!freebsd 2 | 3 | package pty 4 | 5 | import ( 6 | "os" 7 | ) 8 | 9 | func open() (pty, tty *os.File, err error) { 10 | return nil, nil, ErrUnsupported 11 | } 12 | -------------------------------------------------------------------------------- /contrib/builder/deb/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" 5 | 6 | set -x 7 | ./generate.sh 8 | for d in */; do 9 | docker build -t "dockercore/builder-deb:$(basename "$d")" "$d" 10 | done 11 | -------------------------------------------------------------------------------- /contrib/builder/rpm/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" 5 | 6 | set -x 7 | ./generate.sh 8 | for d in */; do 9 | docker build -t "dockercore/builder-rpm:$(basename "$d")" "$d" 10 | done 11 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/sandbox/namespace_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows,!freebsd 2 | 3 | package sandbox 4 | 5 | // GC triggers garbage collection of namespace path right away 6 | // and waits for it. 7 | func GC() { 8 | } 9 | -------------------------------------------------------------------------------- /contrib/httpserver/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | ) 7 | 8 | func main() { 9 | fs := http.FileServer(http.Dir("/static")) 10 | http.Handle("/", fs) 11 | log.Panic(http.ListenAndServe(":80", nil)) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/circle.yml: -------------------------------------------------------------------------------- 1 | machine: 2 | services: 3 | - docker 4 | 5 | dependencies: 6 | override: 7 | - echo "Nothing to install" 8 | 9 | test: 10 | override: 11 | - make circle-ci 12 | 13 | -------------------------------------------------------------------------------- /utils/experimental.go: -------------------------------------------------------------------------------- 1 | // +build experimental 2 | 3 | package utils 4 | 5 | // ExperimentalBuild is a stub which always returns true for 6 | // builds that include the "experimental" build tag 7 | func ExperimentalBuild() bool { 8 | return true 9 | } 10 | -------------------------------------------------------------------------------- /vendor/src/github.com/armon/go-metrics/const_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package metrics 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | const ( 10 | // DefaultSignal is used with DefaultInmemSignal 11 | DefaultSignal = syscall.SIGUSR1 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/ioctl.go: -------------------------------------------------------------------------------- 1 | package pty 2 | 3 | import "syscall" 4 | 5 | func ioctl(fd, cmd, ptr uintptr) error { 6 | _, _, e := syscall.Syscall(syscall.SYS_IOCTL, fd, cmd, ptr) 7 | if e != 0 { 8 | return e 9 | } 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/stats_linux.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | import "github.com/opencontainers/runc/libcontainer/cgroups" 4 | 5 | type Stats struct { 6 | Interfaces []*NetworkInterface 7 | CgroupStats *cgroups.Stats 8 | } 9 | -------------------------------------------------------------------------------- /vendor/src/gopkg.in/fsnotify.v1/.gitignore: -------------------------------------------------------------------------------- 1 | # Setup a Global .gitignore for OS and editor generated files: 2 | # https://help.github.com/articles/ignoring-files 3 | # git config --global core.excludesfile ~/.gitignore_global 4 | 5 | .vagrant 6 | *.sublime-project 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 | -------------------------------------------------------------------------------- /utils/stubs.go: -------------------------------------------------------------------------------- 1 | // +build !experimental 2 | 3 | package utils 4 | 5 | // ExperimentalBuild is a stub which always returns false for 6 | // builds that do not include the "experimental" build tag 7 | func ExperimentalBuild() bool { 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /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/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 daemon 6 | 7 | other_args="" 8 | -------------------------------------------------------------------------------- /daemon/daemon_no_aufs.go: -------------------------------------------------------------------------------- 1 | // +build exclude_graphdriver_aufs,linux 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/exec_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package daemon 4 | 5 | // checkExecSupport returns an error if the exec driver does not support exec, 6 | // or nil if it is supported. 7 | func checkExecSupport(DriverName string) error { 8 | return nil 9 | } 10 | -------------------------------------------------------------------------------- /daemon/logdrivers_windows.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | // Importing packages here only to make sure their init gets called and 4 | // therefore they register themselves to the logdriver factory. 5 | import ( 6 | _ "github.com/docker/docker/daemon/logger/jsonfilelog" 7 | ) 8 | -------------------------------------------------------------------------------- /docker/daemon_none.go: -------------------------------------------------------------------------------- 1 | // +build !daemon 2 | 3 | package main 4 | 5 | import "github.com/docker/docker/cli" 6 | 7 | const daemonUsage = "" 8 | 9 | var daemonCli cli.Handler 10 | 11 | // TODO: remove once `-d` is retired 12 | func handleGlobalDaemonFlag() {} 13 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/configs/namespaces_windows.go: -------------------------------------------------------------------------------- 1 | package configs 2 | 3 | // Namespace defines configuration for each namespace. It specifies an 4 | // alternate path that is able to be joined via setns. 5 | type Namespace struct { 6 | } 7 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/apparmor/apparmor_disabled.go: -------------------------------------------------------------------------------- 1 | // +build !apparmor !linux 2 | 3 | package apparmor 4 | 5 | func IsEnabled() bool { 6 | return false 7 | } 8 | 9 | func ApplyProfile(name string) error { 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /man/docker-rename.1.md: -------------------------------------------------------------------------------- 1 | % DOCKER(1) Docker User Manuals 2 | % Docker Community 3 | % OCTOBER 2014 4 | # NAME 5 | docker-rename - Rename a container 6 | 7 | # SYNOPSIS 8 | **docker rename** 9 | OLD_NAME NEW_NAME 10 | 11 | # OPTIONS 12 | There are no available options. 13 | 14 | -------------------------------------------------------------------------------- /vendor/src/github.com/BurntSushi/toml/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.1 4 | - 1.2 5 | - tip 6 | install: 7 | - go install ./... 8 | - go get github.com/BurntSushi/toml-test 9 | script: 10 | - export PATH="$PATH:$HOME/gopath/bin" 11 | - make test 12 | 13 | -------------------------------------------------------------------------------- /vendor/src/github.com/hashicorp/memberlist/todo.md: -------------------------------------------------------------------------------- 1 | # TODO 2 | * Dynamic RTT discovery 3 | * Compute 99th percentile for ping/ack 4 | * Better lower bound for ping/ack, faster failure detection 5 | * Dynamic MTU discovery 6 | * Prevent lost updates, increases efficiency 7 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/ztypes_freebsd_386.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_freebsd.go 3 | 4 | package pty 5 | 6 | const ( 7 | _C_SPECNAMELEN = 0x3f 8 | ) 9 | 10 | type fiodgnameArg struct { 11 | Len int32 12 | Buf *byte 13 | } 14 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/ztypes_freebsd_arm.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_freebsd.go 3 | 4 | package pty 5 | 6 | const ( 7 | _C_SPECNAMELEN = 0x3f 8 | ) 9 | 10 | type fiodgnameArg struct { 11 | Len int32 12 | Buf *byte 13 | } 14 | -------------------------------------------------------------------------------- /contrib/init/systemd/docker.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Docker Socket for the API 3 | PartOf=docker.service 4 | 5 | [Socket] 6 | ListenStream=/var/run/docker.sock 7 | SocketMode=0660 8 | SocketUser=root 9 | SocketGroup=docker 10 | 11 | [Install] 12 | WantedBy=sockets.target 13 | -------------------------------------------------------------------------------- /graph/load_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package graph 4 | 5 | import ( 6 | "fmt" 7 | "io" 8 | ) 9 | 10 | func (s *TagStore) Load(inTar io.ReadCloser, outStream io.Writer) error { 11 | return fmt.Errorf("Load is not supported on this platform") 12 | } 13 | -------------------------------------------------------------------------------- /pkg/reexec/command_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package reexec 4 | 5 | import ( 6 | "os/exec" 7 | ) 8 | 9 | // Command is unsupported on operating systems apart from Linux and Windows. 10 | func Command(args ...string) *exec.Cmd { 11 | return nil 12 | } 13 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/nsenter/nsenter.go: -------------------------------------------------------------------------------- 1 | // +build linux,!gccgo 2 | 3 | package nsenter 4 | 5 | /* 6 | #cgo CFLAGS: -Wall 7 | extern void nsexec(); 8 | void __attribute__((constructor)) init(void) { 9 | nsexec(); 10 | } 11 | */ 12 | import "C" 13 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/system/sysconfig.go: -------------------------------------------------------------------------------- 1 | // +build cgo,linux cgo,freebsd 2 | 3 | package system 4 | 5 | /* 6 | #include 7 | */ 8 | import "C" 9 | 10 | func GetClockTicks() int { 11 | return int(C.sysconf(C._SC_CLK_TCK)) 12 | } 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /docs/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docs/base:latest 2 | MAINTAINER Mary Anthony (@moxiegirl) 3 | 4 | # To get the git info for this repo 5 | COPY . /src 6 | 7 | COPY . /docs/content/ 8 | 9 | WORKDIR /docs/content 10 | 11 | RUN /docs/content/touch-up.sh 12 | 13 | WORKDIR /docs 14 | -------------------------------------------------------------------------------- /pkg/system/mknod_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | func Mknod(path string, mode uint32, dev int) error { 6 | return ErrNotSupportedPlatform 7 | } 8 | 9 | func Mkdev(major int64, minor int64) uint32 { 10 | panic("Mkdev not implemented on Windows.") 11 | } 12 | -------------------------------------------------------------------------------- /vendor/src/github.com/godbus/dbus/homedir_dynamic.go: -------------------------------------------------------------------------------- 1 | // +build !static_build 2 | 3 | package dbus 4 | 5 | import ( 6 | "os/user" 7 | ) 8 | 9 | func lookupHomeDir() string { 10 | u, err := user.Current() 11 | if err != nil { 12 | return "/" 13 | } 14 | return u.HomeDir 15 | } 16 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/configs/hugepage_limit.go: -------------------------------------------------------------------------------- 1 | package configs 2 | 3 | type HugepageLimit struct { 4 | // which type of hugepage to limit. 5 | Pagesize string `json:"page_size"` 6 | 7 | // usage limit for hugepage. 8 | Limit int `json:"limit"` 9 | } 10 | -------------------------------------------------------------------------------- /cli/client.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import flag "github.com/docker/docker/pkg/mflag" 4 | 5 | // ClientFlags represents flags for the docker client. 6 | type ClientFlags struct { 7 | FlagSet *flag.FlagSet 8 | Common *CommonFlags 9 | PostParse func() 10 | 11 | ConfigDir string 12 | } 13 | -------------------------------------------------------------------------------- /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/btrfs/version_test.go: -------------------------------------------------------------------------------- 1 | // +build linux,!btrfs_noversion 2 | 3 | package btrfs 4 | 5 | import ( 6 | "testing" 7 | ) 8 | 9 | func TestLibVersion(t *testing.T) { 10 | if BtrfsLibVersion() <= 0 { 11 | t.Errorf("expected output from btrfs lib version > 0") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /daemon/wait.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import "time" 4 | 5 | func (daemon *Daemon) ContainerWait(name string, timeout time.Duration) (int, error) { 6 | container, err := daemon.Get(name) 7 | if err != nil { 8 | return -1, err 9 | } 10 | 11 | return container.WaitStop(timeout) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Alessandro Boch (@aboch) 2 | Alexandr Morozov (@LK4D4) 3 | Arnaud Porterie (@icecrime) 4 | Jana Radhakrishnan (@mrjana) 5 | Madhu Venugopal (@mavenugo) 6 | -------------------------------------------------------------------------------- /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/pkg/reexec" 7 | ) 8 | 9 | func main() { 10 | // Running in init mode 11 | reexec.Init() 12 | } 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/src/github.com/gorilla/mux/README.md: -------------------------------------------------------------------------------- 1 | mux 2 | === 3 | [![Build Status](https://travis-ci.org/gorilla/mux.png?branch=master)](https://travis-ci.org/gorilla/mux) 4 | 5 | gorilla/mux is a powerful URL router and dispatcher. 6 | 7 | Read the full documentation here: http://www.gorillatoolkit.org/pkg/mux 8 | -------------------------------------------------------------------------------- /integration-cli/test_vars_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package main 4 | 5 | const ( 6 | // identifies if test suite is running on a unix platform 7 | isUnixCli = false 8 | 9 | // this is the expected file permission set on windows: gh#11395 10 | expectedFileChmod = "-rwxr-xr-x" 11 | ) 12 | -------------------------------------------------------------------------------- /pkg/signal/signal_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package signal 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Signals used in api/client (no windows equivalent, use 10 | // invalid signals so they don't get handled) 11 | const SIGCHLD = syscall.SIGCHLD 12 | const SIGWINCH = syscall.SIGWINCH 13 | -------------------------------------------------------------------------------- /vendor/src/github.com/armon/go-metrics/const_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package metrics 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | const ( 10 | // DefaultSignal is used with DefaultInmemSignal 11 | // Windows has no SIGUSR1, use SIGBREAK 12 | DefaultSignal = syscall.Signal(21) 13 | ) 14 | -------------------------------------------------------------------------------- /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/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/signal/signal_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package signal 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Signals used in api/client (no windows equivalent, use 10 | // invalid signals so they don't get handled) 11 | const SIGCHLD = syscall.Signal(0xff) 12 | const SIGWINCH = syscall.Signal(0xff) 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/ztypes_freebsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_freebsd.go 3 | 4 | package pty 5 | 6 | const ( 7 | _C_SPECNAMELEN = 0x3f 8 | ) 9 | 10 | type fiodgnameArg struct { 11 | Len int32 12 | Pad_cgo_0 [4]byte 13 | Buf *byte 14 | } 15 | -------------------------------------------------------------------------------- /daemon/execdriver/windows/getpids.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package windows 4 | 5 | import "fmt" 6 | 7 | func (d *driver) GetPidsForContainer(id string) ([]int, error) { 8 | // TODO Windows: Implementation required. 9 | return nil, fmt.Errorf("GetPidsForContainer: GetPidsForContainer() not implemented") 10 | } 11 | -------------------------------------------------------------------------------- /daemon/execdriver/windows/stats.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package windows 4 | 5 | import ( 6 | "fmt" 7 | 8 | "github.com/docker/docker/daemon/execdriver" 9 | ) 10 | 11 | func (d *driver) Stats(id string) (*execdriver.ResourceStats, error) { 12 | return nil, fmt.Errorf("Windows: Stats not implemented") 13 | } 14 | -------------------------------------------------------------------------------- /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() ([]*Info, error) { 11 | return nil, fmt.Errorf("mount.parseMountTable is not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 12 | } 13 | -------------------------------------------------------------------------------- /pkg/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 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/types_freebsd.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | package pty 4 | 5 | /* 6 | #include 7 | #include 8 | */ 9 | import "C" 10 | 11 | const ( 12 | _C_SPECNAMELEN = C.SPECNAMELEN /* max length of devicename */ 13 | ) 14 | 15 | type fiodgnameArg C.struct_fiodgname_arg 16 | -------------------------------------------------------------------------------- /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 this platform") 11 | } 12 | -------------------------------------------------------------------------------- /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/ioutils/scheduler_gccgo.go: -------------------------------------------------------------------------------- 1 | // +build gccgo 2 | 3 | package ioutils 4 | 5 | import ( 6 | "runtime" 7 | ) 8 | 9 | func callSchedulerIfNecessary() { 10 | //allow or force Go scheduler to switch context, without explicitly 11 | //forcing this will make it hang when using gccgo implementation 12 | runtime.Gosched() 13 | } 14 | -------------------------------------------------------------------------------- /vendor/src/github.com/mattn/go-sqlite3/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - tip 4 | before_install: 5 | - go get github.com/axw/gocov/gocov 6 | - go get github.com/mattn/goveralls 7 | - go get golang.org/x/tools/cmd/cover 8 | script: 9 | - $HOME/gopath/bin/goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx 10 | -------------------------------------------------------------------------------- /pkg/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 | -------------------------------------------------------------------------------- /pkg/ioutils/fmt.go: -------------------------------------------------------------------------------- 1 | package ioutils 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | ) 7 | 8 | // FprintfIfNotEmpty prints the string value if it's not empty 9 | func FprintfIfNotEmpty(w io.Writer, format, value string) (int, error) { 10 | if value != "" { 11 | return fmt.Fprintf(w, format, value) 12 | } 13 | return 0, nil 14 | } 15 | -------------------------------------------------------------------------------- /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/windows/unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package windows 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("Windows driver not supported on non-Windows") 13 | } 14 | -------------------------------------------------------------------------------- /daemon/graphdriver/driver_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package graphdriver 4 | 5 | var ( 6 | // Slice of drivers that should be used in an order 7 | priority = []string{ 8 | "unsupported", 9 | } 10 | ) 11 | 12 | func GetFSMagic(rootpath string) (FsMagic, error) { 13 | return FsMagicUnsupported, nil 14 | } 15 | -------------------------------------------------------------------------------- /pkg/graphdb/conn_sqlite3.go: -------------------------------------------------------------------------------- 1 | package graphdb 2 | 3 | import "database/sql" 4 | 5 | // NewSqliteConn opens a connection to a sqlite 6 | // database. 7 | func NewSqliteConn(root string) (*Database, error) { 8 | conn, err := sql.Open("sqlite3", root) 9 | if err != nil { 10 | return nil, err 11 | } 12 | return NewDatabase(conn) 13 | } 14 | -------------------------------------------------------------------------------- /pkg/symlink/README.md: -------------------------------------------------------------------------------- 1 | Package symlink implements EvalSymlinksInScope which is an extension of filepath.EvalSymlinks 2 | from the [Go standard library](https://golang.org/pkg/path/filepath). 3 | 4 | The code from filepath.EvalSymlinks has been adapted in fs.go. 5 | Please read the LICENSE.BSD file that governs fs.go and LICENSE.APACHE for fs_test.go. 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/graphdriver/btrfs/version_none.go: -------------------------------------------------------------------------------- 1 | // +build linux,btrfs_noversion 2 | 3 | package btrfs 4 | 5 | // TODO(vbatts) remove this work-around once supported linux distros are on 6 | // btrfs utililties of >= 3.16.1 7 | 8 | func BtrfsBuildVersion() string { 9 | return "-" 10 | } 11 | 12 | func BtrfsLibVersion() int { 13 | return -1 14 | } 15 | -------------------------------------------------------------------------------- /man/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.4 2 | RUN mkdir -p /go/src/github.com/cpuguy83 3 | RUN mkdir -p /go/src/github.com/cpuguy83 \ 4 | && git clone -b v1.0.3 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 | -------------------------------------------------------------------------------- /pkg/promise/promise.go: -------------------------------------------------------------------------------- 1 | package promise 2 | 3 | // Go is a basic promise implementation: it wraps calls a function in a goroutine, 4 | // and returns a channel which will later return the function's return value. 5 | func Go(f func() error) chan error { 6 | ch := make(chan error, 1) 7 | go func() { 8 | ch <- f() 9 | }() 10 | return ch 11 | } 12 | -------------------------------------------------------------------------------- /vendor/src/github.com/gorilla/context/README.md: -------------------------------------------------------------------------------- 1 | context 2 | ======= 3 | [![Build Status](https://travis-ci.org/gorilla/context.png?branch=master)](https://travis-ci.org/gorilla/context) 4 | 5 | gorilla/context is a general purpose registry for global request variables. 6 | 7 | Read the full documentation here: http://www.gorillatoolkit.org/pkg/context 8 | -------------------------------------------------------------------------------- /vendor/src/github.com/hashicorp/memberlist/Makefile: -------------------------------------------------------------------------------- 1 | test: subnet 2 | go test ./... 3 | 4 | integ: subnet 5 | INTEG_TESTS=yes go test ./... 6 | 7 | subnet: 8 | ./test/setup_subnet.sh 9 | 10 | cov: 11 | gocov test github.com/hashicorp/memberlist | gocov-html > /tmp/coverage.html 12 | open /tmp/coverage.html 13 | 14 | .PNONY: test cov integ 15 | -------------------------------------------------------------------------------- /vendor/src/github.com/hashicorp/serf/serf/conflict_delegate.go: -------------------------------------------------------------------------------- 1 | package serf 2 | 3 | import ( 4 | "github.com/hashicorp/memberlist" 5 | ) 6 | 7 | type conflictDelegate struct { 8 | serf *Serf 9 | } 10 | 11 | func (c *conflictDelegate) NotifyConflict(existing, other *memberlist.Node) { 12 | c.serf.handleNodeConflict(existing, other) 13 | } 14 | -------------------------------------------------------------------------------- /docs/examples/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon=true 3 | 4 | [program:riak] 5 | command=bash -c "/usr/sbin/riak console" 6 | numprocs=1 7 | autostart=true 8 | autorestart=true 9 | user=riak 10 | environment=HOME="/var/lib/riak" 11 | stdout_logfile=/var/log/supervisor/%(program_name)s.log 12 | stderr_logfile=/var/log/supervisor/%(program_name)s.log 13 | -------------------------------------------------------------------------------- /hack/make/.build-deb/docker-engine.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | case "$1" in 5 | configure) 6 | if [ -z "$2" ]; then 7 | if ! getent group docker > /dev/null; then 8 | groupadd --system docker 9 | fi 10 | fi 11 | ;; 12 | abort-*) 13 | # How'd we get here?? 14 | exit 1 15 | ;; 16 | *) 17 | ;; 18 | esac 19 | 20 | #DEBHELPER# 21 | -------------------------------------------------------------------------------- /pkg/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 | -------------------------------------------------------------------------------- /runconfig/hostconfig_windows.go: -------------------------------------------------------------------------------- 1 | package runconfig 2 | 3 | func (n NetworkMode) IsDefault() bool { 4 | return n == "default" 5 | } 6 | 7 | func DefaultDaemonNetworkMode() NetworkMode { 8 | return NetworkMode("default") 9 | } 10 | 11 | func (n NetworkMode) NetworkName() string { 12 | if n.IsDefault() { 13 | return "default" 14 | } 15 | return "" 16 | } 17 | -------------------------------------------------------------------------------- /api/client/client.go: -------------------------------------------------------------------------------- 1 | // Package client provides a command-line interface for Docker. 2 | // 3 | // Run "docker help SUBCOMMAND" or "docker SUBCOMMAND --help" to see more information on any Docker subcommand, including the full list of options supported for the subcommand. 4 | // See https://docs.docker.com/installation/ for instructions on installing Docker. 5 | package client 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /docs/articles/https/parsedocs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "#!/bin/sh" 4 | cat ../https.md | awk '{if (sub(/\\$/,"")) printf "%s", $0; else print $0}' \ 5 | | grep ' $ ' \ 6 | | sed 's/ $ //g' \ 7 | | sed 's/2375/7777/g' \ 8 | | sed 's/2376/7778/g' \ 9 | | sed 's/^docker/# docker/g' \ 10 | | sed 's/^curl/# curl/g' 11 | -------------------------------------------------------------------------------- /vendor/src/github.com/vbatts/tar-split/tar/asm/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package asm provides the API for streaming assembly and disassembly of tar 3 | archives. 4 | 5 | Using the `github.com/vbatts/tar-split/tar/storage` for Packing/Unpacking the 6 | metadata for a stream, as well as an implementation of Getting/Putting the file 7 | entries' payload. 8 | */ 9 | package asm 10 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/distribution/doc.go: -------------------------------------------------------------------------------- 1 | // Package distribution will define the interfaces for the components of 2 | // docker distribution. The goal is to allow users to reliably package, ship 3 | // and store content related to docker images. 4 | // 5 | // This is currently a work in progress. More details are available in the 6 | // README.md. 7 | package distribution 8 | -------------------------------------------------------------------------------- /vendor/src/github.com/mattn/go-sqlite3/sqlite3_other.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | // +build !windows 6 | 7 | package sqlite3 8 | 9 | /* 10 | #cgo CFLAGS: -I. 11 | #cgo linux LDFLAGS: -ldl 12 | */ 13 | import "C" 14 | -------------------------------------------------------------------------------- /daemon/changes.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import "github.com/docker/docker/pkg/archive" 4 | 5 | // ContainerChanges returns a list of container fs changes 6 | func (daemon *Daemon) ContainerChanges(name string) ([]archive.Change, error) { 7 | container, err := daemon.Get(name) 8 | if err != nil { 9 | return nil, err 10 | } 11 | 12 | return container.Changes() 13 | } 14 | -------------------------------------------------------------------------------- /pkg/devicemapper/log.go: -------------------------------------------------------------------------------- 1 | package devicemapper 2 | 3 | // definitions from lvm2 lib/log/log.h 4 | const ( 5 | LogLevelFatal = 2 + iota // _LOG_FATAL 6 | LogLevelErr // _LOG_ERR 7 | LogLevelWarn // _LOG_WARN 8 | LogLevelNotice // _LOG_NOTICE 9 | LogLevelInfo // _LOG_INFO 10 | LogLevelDebug // _LOG_DEBUG 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/config/libnetwork.toml: -------------------------------------------------------------------------------- 1 | title = "LibNetwork Configuration file" 2 | 3 | [daemon] 4 | debug = false 5 | [cluster] 6 | discovery = "token://swarm-discovery-token" 7 | Address = "Cluster-wide reachable Host IP" 8 | [datastore] 9 | embedded = false 10 | [datastore.client] 11 | provider = "consul" 12 | Address = "localhost:8500" 13 | -------------------------------------------------------------------------------- /vendor/src/gopkg.in/fsnotify.v1/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.4.1 6 | 7 | before_script: 8 | - FIXED=$(go fmt ./... | wc -l); if [ $FIXED -gt 0 ]; then echo "gofmt - $FIXED file(s) not formatted correctly, please run gofmt to fix this." && exit 1; fi 9 | 10 | os: 11 | - linux 12 | - osx 13 | 14 | notifications: 15 | email: false 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /daemon/restart.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import "fmt" 4 | 5 | func (daemon *Daemon) ContainerRestart(name string, seconds int) error { 6 | container, err := daemon.Get(name) 7 | if err != nil { 8 | return err 9 | } 10 | if err := container.Restart(seconds); err != nil { 11 | return fmt.Errorf("Cannot restart container %s: %s\n", name, err) 12 | } 13 | return nil 14 | } 15 | -------------------------------------------------------------------------------- /pkg/tarsum/writercloser.go: -------------------------------------------------------------------------------- 1 | package tarsum 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | type writeCloseFlusher interface { 8 | io.WriteCloser 9 | Flush() error 10 | } 11 | 12 | type nopCloseFlusher struct { 13 | io.Writer 14 | } 15 | 16 | func (n *nopCloseFlusher) Close() error { 17 | return nil 18 | } 19 | 20 | func (n *nopCloseFlusher) Flush() error { 21 | return nil 22 | } 23 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/configs/interface_priority_map.go: -------------------------------------------------------------------------------- 1 | package configs 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type IfPrioMap struct { 8 | Interface string `json:"interface"` 9 | Priority int64 `json:"priority"` 10 | } 11 | 12 | func (i *IfPrioMap) CgroupString() string { 13 | return fmt.Sprintf("%s %d", i.Interface, i.Priority) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/container_nouserns_linux.go: -------------------------------------------------------------------------------- 1 | // +build !go1.4 2 | 3 | package libcontainer 4 | 5 | import ( 6 | "fmt" 7 | "syscall" 8 | ) 9 | 10 | // not available before go 1.4 11 | func (c *linuxContainer) addUidGidMappings(sys *syscall.SysProcAttr) error { 12 | return fmt.Errorf("User namespace is not supported in golang < 1.4") 13 | } 14 | -------------------------------------------------------------------------------- /runconfig/parse_stub.go: -------------------------------------------------------------------------------- 1 | // +build !experimental 2 | 3 | package runconfig 4 | 5 | import flag "github.com/docker/docker/pkg/mflag" 6 | 7 | type experimentalFlags struct{} 8 | 9 | func attachExperimentalFlags(cmd *flag.FlagSet) *experimentalFlags { 10 | return nil 11 | } 12 | 13 | func applyExperimentalFlags(flags *experimentalFlags, config *Config, hostConfig *HostConfig) { 14 | } 15 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/stats.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | type NetworkInterface struct { 4 | // Name is the name of the network interface. 5 | Name string 6 | 7 | RxBytes uint64 8 | RxPackets uint64 9 | RxErrors uint64 10 | RxDropped uint64 11 | TxBytes uint64 12 | TxPackets uint64 13 | TxErrors uint64 14 | TxDropped uint64 15 | } 16 | -------------------------------------------------------------------------------- /vendor/src/gopkg.in/fsnotify.v1/open_mode_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build freebsd openbsd netbsd dragonfly 6 | 7 | package fsnotify 8 | 9 | import "syscall" 10 | 11 | const openMode = syscall.O_NONBLOCK | syscall.O_RDONLY 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /docs/reference/commandline/top.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | # top 13 | 14 | Usage: docker top CONTAINER [ps OPTIONS] 15 | 16 | Display the running processes of a container -------------------------------------------------------------------------------- /vendor/src/github.com/Sirupsen/logrus/terminal_linux.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | package logrus 7 | 8 | import "syscall" 9 | 10 | const ioctlReadTermios = syscall.TCGETS 11 | 12 | type Termios syscall.Termios 13 | -------------------------------------------------------------------------------- /vendor/src/github.com/mattn/go-sqlite3/sqlite3_libsqlite3.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | // +build libsqlite3 6 | 7 | package sqlite3 8 | 9 | /* 10 | #cgo CFLAGS: -DUSE_LIBSQLITE3 11 | #cgo LDFLAGS: -lsqlite3 12 | */ 13 | import "C" 14 | -------------------------------------------------------------------------------- /vendor/src/gopkg.in/fsnotify.v1/open_mode_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin 6 | 7 | package fsnotify 8 | 9 | import "syscall" 10 | 11 | // note: this constant is not defined on BSD 12 | const openMode = syscall.O_EVTONLY 13 | -------------------------------------------------------------------------------- /daemon/debugtrap_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package daemon 4 | 5 | import ( 6 | "os" 7 | "os/signal" 8 | "syscall" 9 | 10 | psignal "github.com/docker/docker/pkg/signal" 11 | ) 12 | 13 | func setupDumpStackTrap() { 14 | c := make(chan os.Signal, 1) 15 | signal.Notify(c, syscall.SIGUSR1) 16 | go func() { 17 | for range c { 18 | psignal.DumpStacks() 19 | } 20 | }() 21 | } 22 | -------------------------------------------------------------------------------- /vendor/src/github.com/Sirupsen/logrus/terminal_darwin.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | package logrus 7 | 8 | import "syscall" 9 | 10 | const ioctlReadTermios = syscall.TIOCGETA 11 | 12 | type Termios syscall.Termios 13 | -------------------------------------------------------------------------------- /vendor/src/github.com/armon/go-metrics/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /vendor/src/github.com/natefinch/npipe/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/console.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | import "io" 4 | 5 | // Console represents a pseudo TTY. 6 | type Console interface { 7 | io.ReadWriter 8 | io.Closer 9 | 10 | // Path returns the filesystem path to the slave side of the pty. 11 | Path() string 12 | 13 | // Fd returns the fd for the master of the pty. 14 | Fd() uintptr 15 | } 16 | -------------------------------------------------------------------------------- /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 | * Chromium: ./chromium/Dockerfile shows a way to dockerize a common application 11 | * Gparted: ./gparted/Dockerfile shows a way to dockerize a common application w devices 12 | -------------------------------------------------------------------------------- /pkg/random/random_test.go: -------------------------------------------------------------------------------- 1 | package random 2 | 3 | import ( 4 | "math/rand" 5 | "sync" 6 | "testing" 7 | ) 8 | 9 | // for go test -v -race 10 | func TestConcurrency(t *testing.T) { 11 | rnd := rand.New(NewSource()) 12 | var wg sync.WaitGroup 13 | 14 | for i := 0; i < 10; i++ { 15 | wg.Add(1) 16 | go func() { 17 | rnd.Int63() 18 | wg.Done() 19 | }() 20 | } 21 | wg.Wait() 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 | -------------------------------------------------------------------------------- /daemon/pause.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import "fmt" 4 | 5 | // ContainerPause pauses a container 6 | func (daemon *Daemon) ContainerPause(name string) error { 7 | container, err := daemon.Get(name) 8 | if err != nil { 9 | return err 10 | } 11 | 12 | if err := container.Pause(); err != nil { 13 | return fmt.Errorf("Cannot pause container %s: %s", name, err) 14 | } 15 | 16 | return nil 17 | } 18 | -------------------------------------------------------------------------------- /docs/reference/commandline/wait.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | # wait 13 | 14 | Usage: docker wait CONTAINER [CONTAINER...] 15 | 16 | Block until a container stops, then print its exit code. -------------------------------------------------------------------------------- /pkg/devicemapper/devmapper_wrapper_no_deferred_remove.go: -------------------------------------------------------------------------------- 1 | // +build linux,libdm_no_deferred_remove 2 | 3 | package devicemapper 4 | 5 | const LibraryDeferredRemovalSupport = false 6 | 7 | func dmTaskDeferredRemoveFct(task *CDmTask) int { 8 | // Error. Nobody should be calling it. 9 | return -1 10 | } 11 | 12 | func dmTaskGetInfoWithDeferredFct(task *CDmTask, info *Info) int { 13 | return -1 14 | } 15 | -------------------------------------------------------------------------------- /api/client/network.go: -------------------------------------------------------------------------------- 1 | // +build experimental 2 | 3 | package client 4 | 5 | import ( 6 | "os" 7 | 8 | nwclient "github.com/docker/libnetwork/client" 9 | ) 10 | 11 | func (cli *DockerCli) CmdNetwork(args ...string) error { 12 | nCli := nwclient.NewNetworkCli(cli.out, cli.err, nwclient.CallFunc(cli.callWrapper)) 13 | args = append([]string{"network"}, args...) 14 | return nCli.Cmd(os.Args[0], args...) 15 | } 16 | -------------------------------------------------------------------------------- /api/client/service.go: -------------------------------------------------------------------------------- 1 | // +build experimental 2 | 3 | package client 4 | 5 | import ( 6 | "os" 7 | 8 | nwclient "github.com/docker/libnetwork/client" 9 | ) 10 | 11 | func (cli *DockerCli) CmdService(args ...string) error { 12 | nCli := nwclient.NewNetworkCli(cli.out, cli.err, nwclient.CallFunc(cli.callWrapper)) 13 | args = append([]string{"service"}, args...) 14 | return nCli.Cmd(os.Args[0], args...) 15 | } 16 | -------------------------------------------------------------------------------- /contrib/reprepro/suites.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd "$(dirname "$BASH_SOURCE")/../.." 5 | 6 | targets_from() { 7 | git fetch -q https://github.com/docker/docker.git "$1" 8 | git ls-tree -r --name-only origin/master contrib/builder/deb | grep '/Dockerfile$' | sed -r 's!^contrib/builder/deb/|-debootstrap|/Dockerfile$!!g' 9 | } 10 | 11 | { targets_from master; targets_from release; } | sort -u 12 | -------------------------------------------------------------------------------- /daemon/execdriver/native/info.go: -------------------------------------------------------------------------------- 1 | // +build linux,cgo 2 | 3 | package native 4 | 5 | type info struct { 6 | ID string 7 | driver *driver 8 | } 9 | 10 | // IsRunning is determined by looking for the 11 | // pid file for a container. If the file exists then the 12 | // container is currently running 13 | func (i *info) IsRunning() bool { 14 | _, ok := i.driver.activeContainers[i.ID] 15 | return ok 16 | } 17 | -------------------------------------------------------------------------------- /daemon/unpause.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import "fmt" 4 | 5 | // ContainerUnpause unpauses a container 6 | func (daemon *Daemon) ContainerUnpause(name string) error { 7 | container, err := daemon.Get(name) 8 | if err != nil { 9 | return err 10 | } 11 | 12 | if err := container.Unpause(); err != nil { 13 | return fmt.Errorf("Cannot unpause container %s: %s", name, err) 14 | } 15 | 16 | return nil 17 | } 18 | -------------------------------------------------------------------------------- /vendor/src/github.com/BurntSushi/toml/Makefile: -------------------------------------------------------------------------------- 1 | install: 2 | go install ./... 3 | 4 | test: install 5 | go test -v 6 | toml-test toml-test-decoder 7 | toml-test -encoder toml-test-encoder 8 | 9 | fmt: 10 | gofmt -w *.go */*.go 11 | colcheck *.go */*.go 12 | 13 | tags: 14 | find ./ -name '*.go' -print0 | xargs -0 gotags > TAGS 15 | 16 | push: 17 | git push origin master 18 | git push github master 19 | 20 | -------------------------------------------------------------------------------- /vendor/src/github.com/philhofer/fwd/writer_unsafe.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package fwd 4 | 5 | import ( 6 | "reflect" 7 | "unsafe" 8 | ) 9 | 10 | // unsafe cast string as []byte 11 | func unsafestr(b string) []byte { 12 | l := len(b) 13 | return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{ 14 | Len: l, 15 | Cap: l, 16 | Data: (*reflect.StringHeader)(unsafe.Pointer(&b)).Data, 17 | })) 18 | } 19 | -------------------------------------------------------------------------------- /pkg/system/stat_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // fromStatT creates a system.Stat_t type from a syscall.Stat_t type 10 | func fromStatT(s *syscall.Stat_t) (*Stat_t, error) { 11 | return &Stat_t{size: s.Size, 12 | mode: uint32(s.Mode), 13 | uid: s.Uid, 14 | gid: s.Gid, 15 | rdev: uint64(s.Rdev), 16 | mtim: s.Mtimespec}, nil 17 | } 18 | -------------------------------------------------------------------------------- /contrib/init/systemd/docker.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Docker Application Container Engine 3 | Documentation=https://docs.docker.com 4 | After=network.target docker.socket 5 | Requires=docker.socket 6 | 7 | [Service] 8 | Type=notify 9 | ExecStart=/usr/bin/docker daemon -H fd:// 10 | MountFlags=slave 11 | LimitNOFILE=1048576 12 | LimitNPROC=1048576 13 | LimitCORE=infinity 14 | 15 | [Install] 16 | WantedBy=multi-user.target 17 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/mktypes.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | GOOSARCH="${GOOS}_${GOARCH}" 4 | case "$GOOSARCH" in 5 | _* | *_ | _) 6 | echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 7 | exit 1 8 | ;; 9 | esac 10 | 11 | GODEFS="go tool cgo -godefs" 12 | 13 | $GODEFS types.go |gofmt > ztypes_$GOARCH.go 14 | 15 | case $GOOS in 16 | freebsd) 17 | $GODEFS types_$GOOS.go |gofmt > ztypes_$GOOSARCH.go 18 | ;; 19 | esac 20 | -------------------------------------------------------------------------------- /vendor/src/github.com/microsoft/hcsshim/guid.go: -------------------------------------------------------------------------------- 1 | package hcsshim 2 | 3 | import ( 4 | "crypto/sha1" 5 | "fmt" 6 | ) 7 | 8 | type GUID [16]byte 9 | 10 | func NewGUID(source string) *GUID { 11 | h := sha1.Sum([]byte(source)) 12 | var g GUID 13 | copy(g[0:], h[0:16]) 14 | return &g 15 | } 16 | 17 | func (g *GUID) ToString() string { 18 | return fmt.Sprintf("%x-%x-%x-%x-%x", g[0:4], g[4:6], g[6:8], g[8:10], g[10:]) 19 | } 20 | -------------------------------------------------------------------------------- /contrib/builder/deb/README.md: -------------------------------------------------------------------------------- 1 | # `dockercore/builder-deb` 2 | 3 | This image's tags contain the dependencies for building Docker `.deb`s for each of the Debian-based platforms Docker targets. 4 | 5 | To add new tags, see [`contrib/builder/deb` in https://github.com/docker/docker](https://github.com/docker/docker/tree/master/contrib/builder/deb), specifically the `generate.sh` script, whose usage is described in a comment at the top of the file. 6 | -------------------------------------------------------------------------------- /contrib/builder/rpm/README.md: -------------------------------------------------------------------------------- 1 | # `dockercore/builder-rpm` 2 | 3 | This image's tags contain the dependencies for building Docker `.rpm`s for each of the RPM-based platforms Docker targets. 4 | 5 | To add new tags, see [`contrib/builder/rpm` in https://github.com/docker/docker](https://github.com/docker/docker/tree/master/contrib/builder/rpm), specifically the `generate.sh` script, whose usage is described in a comment at the top of the file. 6 | -------------------------------------------------------------------------------- /vendor/src/github.com/hashicorp/memberlist/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | .vagrant/ 25 | 26 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /daemon/execdriver/windows/pauseunpause.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package windows 4 | 5 | import ( 6 | "fmt" 7 | 8 | "github.com/docker/docker/daemon/execdriver" 9 | ) 10 | 11 | func (d *driver) Pause(c *execdriver.Command) error { 12 | return fmt.Errorf("Windows: Containers cannot be paused") 13 | } 14 | 15 | func (d *driver) Unpause(c *execdriver.Command) error { 16 | return fmt.Errorf("Windows: Containers cannot be paused") 17 | } 18 | -------------------------------------------------------------------------------- /daemon/exec_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package daemon 4 | 5 | import ( 6 | "strings" 7 | 8 | "github.com/docker/docker/daemon/execdriver/lxc" 9 | ) 10 | 11 | // checkExecSupport returns an error if the exec driver does not support exec, 12 | // or nil if it is supported. 13 | func checkExecSupport(drivername string) error { 14 | if strings.HasPrefix(drivername, lxc.DriverName) { 15 | return lxc.ErrExec 16 | } 17 | return nil 18 | } 19 | -------------------------------------------------------------------------------- /hack/make/.ensure-httpserver: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # Build a Go static web server on top of busybox image 5 | # and compile it for target daemon 6 | 7 | dir="$DEST/httpserver" 8 | mkdir -p "$dir" 9 | ( 10 | cd "$dir" 11 | GOOS=linux GOARCH=amd64 go build -o httpserver github.com/docker/docker/contrib/httpserver 12 | cp ../../../../contrib/httpserver/Dockerfile . 13 | docker build -qt httpserver . > /dev/null 14 | ) 15 | rm -rf "$dir" 16 | -------------------------------------------------------------------------------- /vendor/src/github.com/go-check/check/README.md: -------------------------------------------------------------------------------- 1 | Instructions 2 | ============ 3 | 4 | Install the package with: 5 | 6 | go get gopkg.in/check.v1 7 | 8 | Import it with: 9 | 10 | import "gopkg.in/check.v1" 11 | 12 | and use _check_ as the package name inside the code. 13 | 14 | For more details, visit the project page: 15 | 16 | * http://labix.org/gocheck 17 | 18 | and the API documentation: 19 | 20 | * https://gopkg.in/check.v1 21 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/doc.go: -------------------------------------------------------------------------------- 1 | // Package pty provides functions for working with Unix terminals. 2 | package pty 3 | 4 | import ( 5 | "errors" 6 | "os" 7 | ) 8 | 9 | // ErrUnsupported is returned if a function is not 10 | // available on the current platform. 11 | var ErrUnsupported = errors.New("unsupported") 12 | 13 | // Opens a pty and its corresponding tty. 14 | func Open() (pty, tty *os.File, err error) { 15 | return open() 16 | } 17 | -------------------------------------------------------------------------------- /docs/static_files/README.md: -------------------------------------------------------------------------------- 1 | Static files dir 2 | ================ 3 | 4 | Files you put in /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. -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/drivers_windows.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import ( 4 | "github.com/docker/libnetwork/driverapi" 5 | "github.com/docker/libnetwork/drivers/windows" 6 | ) 7 | 8 | func initDrivers(dc driverapi.DriverCallback) error { 9 | for _, fn := range [](func(driverapi.DriverCallback) error){ 10 | windows.Init, 11 | } { 12 | if err := fn(dc); err != nil { 13 | return err 14 | } 15 | } 16 | return nil 17 | } 18 | -------------------------------------------------------------------------------- /daemon/config_experimental.go: -------------------------------------------------------------------------------- 1 | // +build experimental 2 | 3 | package daemon 4 | 5 | import flag "github.com/docker/docker/pkg/mflag" 6 | 7 | func (config *Config) attachExperimentalFlags(cmd *flag.FlagSet, usageFn func(string) string) { 8 | cmd.StringVar(&config.DefaultNetwork, []string{"-default-network"}, "", usageFn("Set default network")) 9 | cmd.StringVar(&config.NetworkKVStore, []string{"-kv-store"}, "", usageFn("Set KV Store configuration")) 10 | } 11 | -------------------------------------------------------------------------------- /hack/make/test-integration-cli: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | bundle_test_integration_cli() { 5 | TESTFLAGS="$TESTFLAGS -check.v" 6 | go_test_dir ./integration-cli 7 | } 8 | 9 | # subshell so that we can export PATH without breaking other things 10 | ( 11 | bundle .integration-daemon-start 12 | 13 | bundle .integration-daemon-setup 14 | 15 | bundle_test_integration_cli 16 | 17 | bundle .integration-daemon-stop 18 | ) 2>&1 | tee -a "$DEST/test.log" 19 | -------------------------------------------------------------------------------- /pkg/system/lstat.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Lstat takes a path to a file and returns 10 | // a system.Stat_t type pertaining to that file. 11 | // 12 | // Throws an error if the file does not exist 13 | func Lstat(path string) (*Stat_t, error) { 14 | s := &syscall.Stat_t{} 15 | if err := syscall.Lstat(path, s); err != nil { 16 | return nil, err 17 | } 18 | return fromStatT(s) 19 | } 20 | -------------------------------------------------------------------------------- /daemon/stop.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import "fmt" 4 | 5 | func (daemon *Daemon) ContainerStop(name string, seconds int) error { 6 | container, err := daemon.Get(name) 7 | if err != nil { 8 | return err 9 | } 10 | if !container.IsRunning() { 11 | return fmt.Errorf("Container already stopped") 12 | } 13 | if err := container.Stop(seconds); err != nil { 14 | return fmt.Errorf("Cannot stop container %s: %s\n", name, err) 15 | } 16 | return nil 17 | } 18 | -------------------------------------------------------------------------------- /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>' | LC_ALL=C.UTF-8 sort -uf 15 | } > AUTHORS 16 | -------------------------------------------------------------------------------- /daemon/graphdriver/aufs/mount.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package aufs 4 | 5 | import ( 6 | "os/exec" 7 | "syscall" 8 | 9 | "github.com/Sirupsen/logrus" 10 | ) 11 | 12 | func Unmount(target string) error { 13 | if err := exec.Command("auplink", target, "flush").Run(); err != nil { 14 | logrus.Errorf("Couldn't run auplink before unmount: %s", err) 15 | } 16 | if err := syscall.Unmount(target, 0); err != nil { 17 | return err 18 | } 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /pkg/system/meminfo.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | // MemInfo contains memory statistics of the host system. 4 | type MemInfo struct { 5 | // Total usable RAM (i.e. physical RAM minus a few reserved bits and the 6 | // kernel binary code). 7 | MemTotal int64 8 | 9 | // Amount of free memory. 10 | MemFree int64 11 | 12 | // Total amount of swap space available. 13 | SwapTotal int64 14 | 15 | // Amount of swap space that is currently unused. 16 | SwapFree int64 17 | } 18 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/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 | -------------------------------------------------------------------------------- /vendor/src/github.com/hashicorp/memberlist/conflict_delegate.go: -------------------------------------------------------------------------------- 1 | package memberlist 2 | 3 | // ConflictDelegate is a used to inform a client that 4 | // a node has attempted to join which would result in a 5 | // name conflict. This happens if two clients are configured 6 | // with the same name but different addresses. 7 | type ConflictDelegate interface { 8 | // NotifyConflict is invoked when a name conflict is detected 9 | NotifyConflict(existing, other *Node) 10 | } 11 | -------------------------------------------------------------------------------- /docs/misc/search.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Search 8 | 9 | *Please activate JavaScript to enable the search functionality.* 10 | 11 | ## How To Search 12 | 13 | From here you can search these documents. Enter your search words into 14 | the box below and click "search". Note that the search function will 15 | automatically search for all of the words. Pages containing fewer words 16 | won't appear in the result list. 17 | -------------------------------------------------------------------------------- /pkg/ioutils/fmt_test.go: -------------------------------------------------------------------------------- 1 | package ioutils 2 | 3 | import "testing" 4 | 5 | func TestFprintfIfNotEmpty(t *testing.T) { 6 | wc := NewWriteCounter(&NopWriter{}) 7 | n, _ := FprintfIfNotEmpty(wc, "foo%s", "") 8 | 9 | if wc.Count != 0 || n != 0 { 10 | t.Errorf("Wrong count: %v vs. %v vs. 0", wc.Count, n) 11 | } 12 | 13 | n, _ = FprintfIfNotEmpty(wc, "foo%s", "bar") 14 | if wc.Count != 6 || n != 6 { 15 | t.Errorf("Wrong count: %v vs. %v vs. 6", wc.Count, n) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /runconfig/parse_windows.go: -------------------------------------------------------------------------------- 1 | package runconfig 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | func parseNetMode(netMode string) (NetworkMode, error) { 9 | parts := strings.Split(netMode, ":") 10 | switch mode := parts[0]; mode { 11 | case "default", "none": 12 | default: 13 | return "", fmt.Errorf("invalid --net: %s", netMode) 14 | } 15 | return NetworkMode(netMode), nil 16 | } 17 | 18 | func validateNetMode(vals *validateNM) error { 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /daemon/execdriver/windows/info.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package windows 4 | 5 | import "github.com/docker/docker/daemon/execdriver" 6 | 7 | type info struct { 8 | ID string 9 | driver *driver 10 | } 11 | 12 | func (d *driver) Info(id string) execdriver.Info { 13 | return &info{ 14 | ID: id, 15 | driver: d, 16 | } 17 | } 18 | 19 | func (i *info) IsRunning() bool { 20 | var running bool 21 | running = true // TODO Need an HCS API 22 | return running 23 | } 24 | -------------------------------------------------------------------------------- /hack/make/cover: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | bundle_cover() { 5 | coverprofiles=( "$DEST/../"*"/coverprofiles/"* ) 6 | for p in "${coverprofiles[@]}"; do 7 | echo 8 | ( 9 | set -x 10 | go tool cover -func="$p" 11 | ) 12 | done 13 | } 14 | 15 | if [ "$HAVE_GO_TEST_COVER" ]; then 16 | bundle_cover 2>&1 | tee "$DEST/report.log" 17 | else 18 | echo >&2 'warning: the current version of go does not support -cover' 19 | echo >&2 ' skipping test coverage report' 20 | fi 21 | -------------------------------------------------------------------------------- /vendor/src/github.com/Sirupsen/logrus/terminal_freebsd.go: -------------------------------------------------------------------------------- 1 | /* 2 | Go 1.2 doesn't include Termios for FreeBSD. This should be added in 1.3 and this could be merged with terminal_darwin. 3 | */ 4 | package logrus 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | const ioctlReadTermios = syscall.TIOCGETA 11 | 12 | type Termios struct { 13 | Iflag uint32 14 | Oflag uint32 15 | Cflag uint32 16 | Lflag uint32 17 | Cc [20]uint8 18 | Ispeed uint32 19 | Ospeed uint32 20 | } 21 | -------------------------------------------------------------------------------- /vendor/src/github.com/hashicorp/serf/website/LICENSE.md: -------------------------------------------------------------------------------- 1 | # Proprietary License 2 | 3 | This license is temporary while a more official one is drafted. However, 4 | this should make it clear: 5 | 6 | * The text contents of this website are MPL 2.0 licensed. 7 | 8 | * The design contents of this website are proprietary and may not be reproduced 9 | or reused in any way other than to run the Serf website locally. The license 10 | for the design is owned solely by HashiCorp, Inc. 11 | -------------------------------------------------------------------------------- /daemon/execdriver/windows/stdconsole.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package windows 4 | 5 | // StdConsole is for when using a container non-interactively 6 | type StdConsole struct { 7 | } 8 | 9 | func NewStdConsole() *StdConsole { 10 | return &StdConsole{} 11 | } 12 | 13 | func (s *StdConsole) Resize(h, w int) error { 14 | // we do not need to resize a non tty 15 | return nil 16 | } 17 | 18 | func (s *StdConsole) Close() error { 19 | // nothing to close here 20 | return nil 21 | } 22 | -------------------------------------------------------------------------------- /daemon/logdrivers_linux.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | // Importing packages here only to make sure their init gets called and 4 | // therefore they register themselves to the logdriver factory. 5 | import ( 6 | _ "github.com/docker/docker/daemon/logger/fluentd" 7 | _ "github.com/docker/docker/daemon/logger/gelf" 8 | _ "github.com/docker/docker/daemon/logger/journald" 9 | _ "github.com/docker/docker/daemon/logger/jsonfilelog" 10 | _ "github.com/docker/docker/daemon/logger/syslog" 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/src/github.com/hashicorp/consul/website/LICENSE.md: -------------------------------------------------------------------------------- 1 | # Proprietary License 2 | 3 | This license is temporary while a more official one is drafted. However, 4 | this should make it clear: 5 | 6 | * The text contents of this website are MPL 2.0 licensed. 7 | 8 | * The design contents of this website are proprietary and may not be reproduced 9 | or reused in any way other than to run the Consul website locally. The license 10 | for the design is owned solely by HashiCorp, Inc. 11 | -------------------------------------------------------------------------------- /vendor/src/github.com/mistifyio/go-zfs/error.go: -------------------------------------------------------------------------------- 1 | package zfs 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | // Error is an error which is returned when the `zfs` or `zpool` shell 8 | // commands return with a non-zero exit code. 9 | type Error struct { 10 | Err error 11 | Debug string 12 | Stderr string 13 | } 14 | 15 | // Error returns the string representation of an Error. 16 | func (e Error) Error() string { 17 | return fmt.Sprintf("%s: %q => %s", e.Err, e.Debug, e.Stderr) 18 | } 19 | -------------------------------------------------------------------------------- /docs/reference/commandline/rename.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | # rename 13 | 14 | Usage: docker rename OLD_NAME NEW_NAME 15 | 16 | rename a existing container to a NEW_NAME 17 | 18 | The `docker rename` command allows the container to be renamed to a different name. 19 | -------------------------------------------------------------------------------- /vendor/src/github.com/godbus/dbus/homedir.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "os" 5 | "sync" 6 | ) 7 | 8 | var ( 9 | homeDir string 10 | homeDirLock sync.Mutex 11 | ) 12 | 13 | func getHomeDir() string { 14 | homeDirLock.Lock() 15 | defer homeDirLock.Unlock() 16 | 17 | if homeDir != "" { 18 | return homeDir 19 | } 20 | 21 | homeDir = os.Getenv("HOME") 22 | if homeDir != "" { 23 | return homeDir 24 | } 25 | 26 | homeDir = lookupHomeDir() 27 | return homeDir 28 | } 29 | -------------------------------------------------------------------------------- /vendor/src/github.com/mattn/go-sqlite3/sqlite3_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | // +build windows 6 | 7 | package sqlite3 8 | 9 | /* 10 | #cgo CFLAGS: -I. -fno-stack-check -fno-stack-protector -mno-stack-arg-probe 11 | #cgo windows,386 CFLAGS: -D_localtime32=localtime 12 | #cgo LDFLAGS: -lmingwex -lmingw32 13 | */ 14 | import "C" 15 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/devices/devices_windows.go: -------------------------------------------------------------------------------- 1 | package devices 2 | 3 | import ( 4 | "github.com/opencontainers/runc/libcontainer/configs" 5 | ) 6 | 7 | // TODO Windows. This can be factored out further - Devices are not supported 8 | // by Windows Containers. 9 | 10 | func DeviceFromPath(path, permissions string) (*configs.Device, error) { 11 | return nil, nil 12 | } 13 | 14 | func HostDevices() ([]*configs.Device, error) { 15 | return nil, nil 16 | } 17 | -------------------------------------------------------------------------------- /daemon/stats_windows.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "github.com/docker/docker/api/types" 5 | "github.com/opencontainers/runc/libcontainer" 6 | ) 7 | 8 | // convertStatsToAPITypes converts the libcontainer.Stats to the api specific 9 | // structs. This is done to preserve API compatibility and versioning. 10 | func convertStatsToAPITypes(ls *libcontainer.Stats) *types.Stats { 11 | // TODO Windows. Refactor accordingly to fill in stats. 12 | s := &types.Stats{} 13 | return s 14 | } 15 | -------------------------------------------------------------------------------- /docs/touch-up.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | 4 | # Sed to process GitHub Markdown 5 | # 1-2 Remove comment code from metadata block 6 | # 7 | for i in ls -l /docs/content/* 8 | do # Line breaks are important 9 | if [ -d $i ] # Spaces are important 10 | then 11 | y=${i##*/} 12 | find $i -type f -name "*.md" -exec sed -i.old \ 13 | -e '/^/g' \ 14 | -e '/^/g' {} \; 15 | fi 16 | done 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /runconfig/fixtures/container_hostconfig_1_14.json: -------------------------------------------------------------------------------- 1 | { 2 | "Binds": ["/tmp:/tmp"], 3 | "ContainerIDFile": "", 4 | "LxcConf": [], 5 | "Privileged": false, 6 | "PortBindings": { 7 | "80/tcp": [ 8 | { 9 | "HostIp": "0.0.0.0", 10 | "HostPort": "49153" 11 | } 12 | ] 13 | }, 14 | "Links": ["/name:alias"], 15 | "PublishAllPorts": false, 16 | "CapAdd": ["NET_ADMIN"], 17 | "CapDrop": ["MKNOD"] 18 | } 19 | -------------------------------------------------------------------------------- /cli/common.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | flag "github.com/docker/docker/pkg/mflag" 5 | "github.com/docker/docker/pkg/tlsconfig" 6 | ) 7 | 8 | // CommonFlags represents flags that are common to both the client and the daemon. 9 | type CommonFlags struct { 10 | FlagSet *flag.FlagSet 11 | PostParse func() 12 | 13 | Debug bool 14 | Hosts []string 15 | LogLevel string 16 | TLS bool 17 | TLSVerify bool 18 | TLSOptions *tlsconfig.Options 19 | TrustKey string 20 | } 21 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /docs/reference/commandline/restart.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | # restart 13 | 14 | Usage: docker restart [OPTIONS] CONTAINER [CONTAINER...] 15 | 16 | Restart a running container 17 | 18 | -t, --time=10 Seconds to wait for stop before killing the container 19 | 20 | -------------------------------------------------------------------------------- /daemon/resize.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | func (daemon *Daemon) ContainerResize(name string, height, width int) error { 4 | container, err := daemon.Get(name) 5 | if err != nil { 6 | return err 7 | } 8 | 9 | return container.Resize(height, width) 10 | } 11 | 12 | func (daemon *Daemon) ContainerExecResize(name string, height, width int) error { 13 | execConfig, err := daemon.getExecConfig(name) 14 | if err != nil { 15 | return err 16 | } 17 | 18 | return execConfig.Resize(height, width) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libtrust/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package libtrust provides an interface for managing authentication and 3 | authorization using public key cryptography. Authentication is handled 4 | using the identity attached to the public key and verified through TLS 5 | x509 certificates, a key challenge, or signature. Authorization and 6 | access control is managed through a trust graph distributed between 7 | both remote trust servers and locally cached and managed data. 8 | */ 9 | package libtrust 10 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/console_freebsd.go: -------------------------------------------------------------------------------- 1 | // +build freebsd 2 | 3 | package libcontainer 4 | 5 | import ( 6 | "errors" 7 | ) 8 | 9 | // newConsole returns an initalized console that can be used within a container by copying bytes 10 | // from the master side to the slave that is attached as the tty for the container's init process. 11 | func newConsole(uid, gid int) (Console, error) { 12 | return nil, errors.New("libcontainer console is not supported on FreeBSD") 13 | } 14 | -------------------------------------------------------------------------------- /pkg/term/tc_other.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | // +build !linux !cgo 3 | 4 | package term 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | func tcget(fd uintptr, p *Termios) syscall.Errno { 12 | _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(getTermios), uintptr(unsafe.Pointer(p))) 13 | return err 14 | } 15 | 16 | func tcset(fd uintptr, p *Termios) syscall.Errno { 17 | _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, setTermios, uintptr(unsafe.Pointer(p))) 18 | return err 19 | } 20 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/drivers/bridge/setup_firewalld.go: -------------------------------------------------------------------------------- 1 | package bridge 2 | 3 | import "github.com/docker/libnetwork/iptables" 4 | 5 | func (n *bridgeNetwork) setupFirewalld(config *networkConfiguration, i *bridgeInterface) error { 6 | // Sanity check. 7 | if config.EnableIPTables == false { 8 | return IPTableCfgError(config.BridgeName) 9 | } 10 | 11 | iptables.OnReloaded(func() { n.setupIPTables(config, i) }) 12 | iptables.OnReloaded(n.portMapper.ReMapAll) 13 | 14 | return nil 15 | } 16 | -------------------------------------------------------------------------------- /vendor/src/github.com/hashicorp/serf/serf/event_delegate.go: -------------------------------------------------------------------------------- 1 | package serf 2 | 3 | import ( 4 | "github.com/hashicorp/memberlist" 5 | ) 6 | 7 | type eventDelegate struct { 8 | serf *Serf 9 | } 10 | 11 | func (e *eventDelegate) NotifyJoin(n *memberlist.Node) { 12 | e.serf.handleNodeJoin(n) 13 | } 14 | 15 | func (e *eventDelegate) NotifyLeave(n *memberlist.Node) { 16 | e.serf.handleNodeLeave(n) 17 | } 18 | 19 | func (e *eventDelegate) NotifyUpdate(n *memberlist.Node) { 20 | e.serf.handleNodeUpdate(n) 21 | } 22 | -------------------------------------------------------------------------------- /daemon/execdriver/lxc/lxc_init_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package lxc 4 | 5 | import ( 6 | "fmt" 7 | 8 | "github.com/opencontainers/runc/libcontainer/utils" 9 | ) 10 | 11 | func finalizeNamespace(args *InitArgs) error { 12 | if err := utils.CloseExecFrom(3); err != nil { 13 | return err 14 | } 15 | if err := setupUser(args.User); err != nil { 16 | return fmt.Errorf("setup user %s", err) 17 | } 18 | if err := setupWorkingDirectory(args); err != nil { 19 | return err 20 | } 21 | return nil 22 | } 23 | -------------------------------------------------------------------------------- /docs/reference/api/docker-io_api.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | # Docker Hub API 12 | 13 | This API is deprecated as of 1.7. To view the old version, see the [Docker Hub API](https://docs.docker.com/v1.7/reference/api/docker-io_api/) in the 1.7 documentation. 14 | 15 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/drivers_freebsd.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import ( 4 | "github.com/docker/libnetwork/driverapi" 5 | "github.com/docker/libnetwork/drivers/null" 6 | "github.com/docker/libnetwork/drivers/remote" 7 | ) 8 | 9 | func initDrivers(dc driverapi.DriverCallback) error { 10 | for _, fn := range [](func(driverapi.DriverCallback) error){ 11 | null.Init, 12 | remote.Init, 13 | } { 14 | if err := fn(dc); err != nil { 15 | return err 16 | } 17 | } 18 | return nil 19 | } 20 | -------------------------------------------------------------------------------- /vendor/src/github.com/godbus/dbus/conn_darwin.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "errors" 5 | "os/exec" 6 | ) 7 | 8 | func sessionBusPlatform() (*Conn, error) { 9 | cmd := exec.Command("launchctl", "getenv", "DBUS_LAUNCHD_SESSION_BUS_SOCKET") 10 | b, err := cmd.CombinedOutput() 11 | 12 | if err != nil { 13 | return nil, err 14 | } 15 | 16 | if len(b) == 0 { 17 | return nil, errors.New("dbus: couldn't determine address of session bus") 18 | } 19 | 20 | return Dial("unix:path=" + string(b[:len(b)-1])) 21 | } 22 | -------------------------------------------------------------------------------- /pkg/homedir/homedir_test.go: -------------------------------------------------------------------------------- 1 | package homedir 2 | 3 | import ( 4 | "path/filepath" 5 | "testing" 6 | ) 7 | 8 | func TestGet(t *testing.T) { 9 | home := Get() 10 | if home == "" { 11 | t.Fatal("returned home directory is empty") 12 | } 13 | 14 | if !filepath.IsAbs(home) { 15 | t.Fatalf("returned path is not absolute: %s", home) 16 | } 17 | } 18 | 19 | func TestGetShortcutString(t *testing.T) { 20 | shortcut := GetShortcutString() 21 | if shortcut == "" { 22 | t.Fatal("returned shortcut string is empty") 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/src/github.com/Sirupsen/logrus/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 0.8.2 2 | 3 | logrus: fix more Fatal family functions 4 | 5 | # 0.8.1 6 | 7 | logrus: fix not exiting on `Fatalf` and `Fatalln` 8 | 9 | # 0.8.0 10 | 11 | logrus: defaults to stderr instead of stdout 12 | hooks/sentry: add special field for `*http.Request` 13 | formatter/text: ignore Windows for colors 14 | 15 | # 0.7.3 16 | 17 | formatter/\*: allow configuration of timestamp layout 18 | 19 | # 0.7.2 20 | 21 | formatter/text: Add configuration option for time format (#158) 22 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/distribution/.mailmap: -------------------------------------------------------------------------------- 1 | Stephen J Day Stephen Day 2 | Stephen J Day Stephen Day 3 | Olivier Gambier Olivier Gambier 4 | Brian Bland Brian Bland 5 | Josh Hawn Josh Hawn 6 | Richard Scothern Richard -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libtrust/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to libtrust 2 | 3 | Want to hack on libtrust? Awesome! Here are instructions to get you 4 | started. 5 | 6 | libtrust is a part of the [Docker](https://www.docker.com) project, and follows 7 | the same rules and principles. If you're already familiar with the way 8 | Docker does things, you'll feel right at home. 9 | 10 | Otherwise, go read 11 | [Docker's contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md). 12 | 13 | Happy hacking! 14 | -------------------------------------------------------------------------------- /docs/reference/commandline/logout.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | # logout 13 | 14 | Usage: docker logout [SERVER] 15 | 16 | Log out from a Docker registry, if no server is 17 | specified "https://index.docker.io/v1/" is the default. 18 | 19 | For example: 20 | 21 | $ docker logout localhost:8080 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | 26 | # Coverage 27 | *.tmp 28 | *.coverprofile 29 | 30 | # IDE files 31 | .project 32 | 33 | libnetwork-build.created 34 | -------------------------------------------------------------------------------- /vendor/src/github.com/vbatts/tar-split/tar/storage/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package storage is for metadata of a tar archive. 3 | 4 | Packing and unpacking the Entries of the stream. The types of streams are 5 | either segments of raw bytes (for the raw headers and various padding) and for 6 | an entry marking a file payload. 7 | 8 | The raw bytes are stored precisely in the packed (marshalled) Entry. Where as 9 | the file payload marker include the name of the file, size, and crc64 checksum 10 | (for basic file integrity). 11 | */ 12 | package storage 13 | -------------------------------------------------------------------------------- /vendor/src/github.com/vishvananda/netlink/neigh.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | import ( 4 | "fmt" 5 | "net" 6 | ) 7 | 8 | // Neigh represents a link layer neighbor from netlink. 9 | type Neigh struct { 10 | LinkIndex int 11 | Family int 12 | State int 13 | Type int 14 | Flags int 15 | IP net.IP 16 | HardwareAddr net.HardwareAddr 17 | } 18 | 19 | // String returns $ip/$hwaddr $label 20 | func (neigh *Neigh) String() string { 21 | return fmt.Sprintf("%s %s", neigh.IP, neigh.HardwareAddr) 22 | } 23 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/drivers/bridge/netlink_deprecated_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package bridge 4 | 5 | import ( 6 | "errors" 7 | "net" 8 | ) 9 | 10 | // Add a slave to a bridge device. This is more backward-compatible than 11 | // netlink.NetworkSetMaster and works on RHEL 6. 12 | func ioctlAddToBridge(iface, master *net.Interface) error { 13 | return errors.New("not implemented") 14 | } 15 | 16 | func ioctlCreateBridge(name string, setMacAddr bool) error { 17 | return errors.New("not implemented") 18 | } 19 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/configs/namespaces_syscall_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package configs 4 | 5 | func (n *Namespace) Syscall() int { 6 | panic("No namespace syscall support") 7 | return 0 8 | } 9 | 10 | // CloneFlags parses the container's Namespaces options to set the correct 11 | // flags on clone, unshare. This functions returns flags only for new namespaces. 12 | func (n *Namespaces) CloneFlags() uintptr { 13 | panic("No namespace syscall support") 14 | return uintptr(0) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/user/lookup_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris 2 | 3 | package user 4 | 5 | import "io" 6 | 7 | func GetPasswdPath() (string, error) { 8 | return "", ErrUnsupported 9 | } 10 | 11 | func GetPasswd() (io.ReadCloser, error) { 12 | return nil, ErrUnsupported 13 | } 14 | 15 | func GetGroupPath() (string, error) { 16 | return "", ErrUnsupported 17 | } 18 | 19 | func GetGroup() (io.ReadCloser, error) { 20 | return nil, ErrUnsupported 21 | } 22 | -------------------------------------------------------------------------------- /daemon/volumes_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package daemon 4 | 5 | import ( 6 | "os" 7 | 8 | "github.com/docker/docker/daemon/execdriver" 9 | ) 10 | 11 | // Not supported on Windows 12 | func copyOwnership(source, destination string) error { 13 | return nil 14 | } 15 | 16 | func (container *Container) setupMounts() ([]execdriver.Mount, error) { 17 | return nil, nil 18 | } 19 | 20 | func migrateVolume(id, vfs string) error { 21 | return nil 22 | } 23 | 24 | func validVolumeLayout(files []os.FileInfo) bool { 25 | return true 26 | } 27 | -------------------------------------------------------------------------------- /docs/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 | -------------------------------------------------------------------------------- /contrib/builder/rpm/fedora-20/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # THIS FILE IS AUTOGENERATED; SEE "contrib/builder/rpm/generate.sh"! 3 | # 4 | 5 | FROM fedora:20 6 | 7 | RUN yum install -y @development-tools fedora-packager 8 | RUN yum install -y btrfs-progs-devel device-mapper-devel glibc-static libselinux-devel sqlite-devel tar 9 | 10 | ENV GO_VERSION 1.4.2 11 | RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local 12 | ENV PATH $PATH:/usr/local/go/bin 13 | 14 | ENV AUTO_GOPATH 1 15 | ENV DOCKER_BUILDTAGS selinux 16 | -------------------------------------------------------------------------------- /contrib/builder/rpm/fedora-21/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # THIS FILE IS AUTOGENERATED; SEE "contrib/builder/rpm/generate.sh"! 3 | # 4 | 5 | FROM fedora:21 6 | 7 | RUN yum install -y @development-tools fedora-packager 8 | RUN yum install -y btrfs-progs-devel device-mapper-devel glibc-static libselinux-devel sqlite-devel tar 9 | 10 | ENV GO_VERSION 1.4.2 11 | RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local 12 | ENV PATH $PATH:/usr/local/go/bin 13 | 14 | ENV AUTO_GOPATH 1 15 | ENV DOCKER_BUILDTAGS selinux 16 | -------------------------------------------------------------------------------- /contrib/builder/rpm/fedora-22/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # THIS FILE IS AUTOGENERATED; SEE "contrib/builder/rpm/generate.sh"! 3 | # 4 | 5 | FROM fedora:22 6 | 7 | RUN yum install -y @development-tools fedora-packager 8 | RUN yum install -y btrfs-progs-devel device-mapper-devel glibc-static libselinux-devel sqlite-devel tar 9 | 10 | ENV GO_VERSION 1.4.2 11 | RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local 12 | ENV PATH $PATH:/usr/local/go/bin 13 | 14 | ENV AUTO_GOPATH 1 15 | ENV DOCKER_BUILDTAGS selinux 16 | -------------------------------------------------------------------------------- /contrib/builder/rpm/oraclelinux-6/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # THIS FILE IS AUTOGENERATED; SEE "contrib/builder/rpm/generate.sh"! 3 | # 4 | 5 | FROM oraclelinux:6 6 | 7 | RUN yum groupinstall -y "Development Tools" 8 | RUN yum install -y btrfs-progs-devel device-mapper-devel glibc-static libselinux-devel sqlite-devel tar 9 | 10 | ENV GO_VERSION 1.4.2 11 | RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local 12 | ENV PATH $PATH:/usr/local/go/bin 13 | 14 | ENV AUTO_GOPATH 1 15 | ENV DOCKER_BUILDTAGS selinux 16 | -------------------------------------------------------------------------------- /docs/reference/commandline/start.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | # start 13 | 14 | Usage: docker start [OPTIONS] CONTAINER [CONTAINER...] 15 | 16 | Start one or more stopped containers 17 | 18 | -a, --attach=false Attach STDOUT/STDERR and forward signals 19 | -i, --interactive=false Attach container's STDIN 20 | 21 | -------------------------------------------------------------------------------- /vendor/src/github.com/vbatts/tar-split/archive/tar/stat_atim.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux dragonfly openbsd solaris 6 | 7 | package tar 8 | 9 | import ( 10 | "syscall" 11 | "time" 12 | ) 13 | 14 | func statAtime(st *syscall.Stat_t) time.Time { 15 | return time.Unix(st.Atim.Unix()) 16 | } 17 | 18 | func statCtime(st *syscall.Stat_t) time.Time { 19 | return time.Unix(st.Ctim.Unix()) 20 | } 21 | -------------------------------------------------------------------------------- /contrib/syntax/textmate/README.md: -------------------------------------------------------------------------------- 1 | # Docker.tmbundle 2 | 3 | Dockerfile syntax 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 | You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you. 15 | 16 | enjoy. 17 | 18 | -------------------------------------------------------------------------------- /vendor/src/github.com/vbatts/tar-split/archive/tar/stat_atimespec.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin freebsd netbsd 6 | 7 | package tar 8 | 9 | import ( 10 | "syscall" 11 | "time" 12 | ) 13 | 14 | func statAtime(st *syscall.Stat_t) time.Time { 15 | return time.Unix(st.Atimespec.Unix()) 16 | } 17 | 18 | func statCtime(st *syscall.Stat_t) time.Time { 19 | return time.Unix(st.Ctimespec.Unix()) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/distribution/registry/api/v2/doc.go: -------------------------------------------------------------------------------- 1 | // Package v2 describes routes, urls and the error codes used in the Docker 2 | // Registry JSON HTTP API V2. In addition to declarations, descriptors are 3 | // provided for routes and error codes that can be used for implementation and 4 | // automatically generating documentation. 5 | // 6 | // Definitions here are considered to be locked down for the V2 registry api. 7 | // Any changes must be considered carefully and should not proceed without a 8 | // change proposal in docker core. 9 | package v2 10 | -------------------------------------------------------------------------------- /contrib/syntax/vim/README.md: -------------------------------------------------------------------------------- 1 | dockerfile.vim 2 | ============== 3 | 4 | Syntax highlighting for Dockerfiles 5 | 6 | Installation 7 | ------------ 8 | With [pathogen](https://github.com/tpope/vim-pathogen), the usual way... 9 | 10 | With [Vundle](https://github.com/gmarik/Vundle.vim) 11 | 12 | Plugin 'docker/docker' , {'rtp': '/contrib/syntax/vim/'} 13 | 14 | Features 15 | -------- 16 | 17 | The syntax highlighting includes: 18 | 19 | * The directives (e.g. `FROM`) 20 | * Strings 21 | * Comments 22 | 23 | License 24 | ------- 25 | 26 | BSD, short and sweet 27 | -------------------------------------------------------------------------------- /pkg/reexec/command_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package reexec 4 | 5 | import ( 6 | "os/exec" 7 | ) 8 | 9 | // Self returns the path to the current process's binary. 10 | // Uses os.Args[0]. 11 | func Self() string { 12 | return naiveSelf() 13 | } 14 | 15 | // Command returns *exec.Cmd which have Path as current binary. 16 | // For example if current binary is "docker.exe" at "C:\", then cmd.Path will 17 | // be set to "C:\docker.exe". 18 | func Command(args ...string) *exec.Cmd { 19 | return &exec.Cmd{ 20 | Path: Self(), 21 | Args: args, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /docs/reference/commandline/push.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | # push 13 | 14 | Usage: docker push NAME[:TAG] 15 | 16 | Push an image or a repository to the registry 17 | 18 | --disable-content-trust=true Skip image signing 19 | 20 | Use `docker push` to share your images to the [Docker Hub](https://hub.docker.com) 21 | registry or to a self-hosted one. 22 | -------------------------------------------------------------------------------- /integration-cli/docker_cli_login_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bytes" 5 | "os/exec" 6 | 7 | "github.com/go-check/check" 8 | ) 9 | 10 | func (s *DockerSuite) TestLoginWithoutTTY(c *check.C) { 11 | cmd := exec.Command(dockerBinary, "login") 12 | 13 | // Send to stdin so the process does not get the TTY 14 | cmd.Stdin = bytes.NewBufferString("buffer test string \n") 15 | 16 | // run the command and block until it's done 17 | if err := cmd.Run(); err == nil { 18 | c.Fatal("Expected non nil err when loginning in & TTY not available") 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /integration-cli/docker_api_exec_resize_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | "strings" 6 | 7 | "github.com/go-check/check" 8 | ) 9 | 10 | func (s *DockerSuite) TestExecResizeApiHeightWidthNoInt(c *check.C) { 11 | out, _ := dockerCmd(c, "run", "-d", "busybox", "top") 12 | cleanedContainerID := strings.TrimSpace(out) 13 | 14 | endpoint := "/exec/" + cleanedContainerID + "/resize?h=foo&w=bar" 15 | status, _, err := sockRequest("POST", endpoint, nil) 16 | c.Assert(status, check.Equals, http.StatusInternalServerError) 17 | c.Assert(err, check.IsNil) 18 | } 19 | -------------------------------------------------------------------------------- /pkg/archive/changes_windows.go: -------------------------------------------------------------------------------- 1 | package archive 2 | 3 | import ( 4 | "github.com/docker/docker/pkg/system" 5 | ) 6 | 7 | func statDifferent(oldStat *system.Stat_t, newStat *system.Stat_t) bool { 8 | 9 | // Don't look at size for dirs, its not a good measure of change 10 | if oldStat.ModTime() != newStat.ModTime() || 11 | oldStat.Mode() != newStat.Mode() || 12 | oldStat.Size() != newStat.Size() && !oldStat.IsDir() { 13 | return true 14 | } 15 | return false 16 | } 17 | 18 | func (info *FileInfo) isDir() bool { 19 | return info.parent == nil || info.stat.IsDir() 20 | } 21 | -------------------------------------------------------------------------------- /pkg/chrootarchive/init_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package chrootarchive 4 | 5 | import ( 6 | "fmt" 7 | "io" 8 | "io/ioutil" 9 | "os" 10 | 11 | "github.com/docker/docker/pkg/reexec" 12 | ) 13 | 14 | func init() { 15 | reexec.Register("docker-applyLayer", applyLayer) 16 | reexec.Register("docker-untar", untar) 17 | } 18 | 19 | func fatal(err error) { 20 | fmt.Fprint(os.Stderr, err) 21 | os.Exit(1) 22 | } 23 | 24 | // flush consumes all the bytes from the reader discarding 25 | // any errors 26 | func flush(r io.Reader) { 27 | io.Copy(ioutil.Discard, r) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/src/github.com/BurntSushi/toml/COPYING: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | 15 | -------------------------------------------------------------------------------- /vendor/src/github.com/syndtr/gocapability/capability/capability_noop.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013, Suryandaru Triandana 2 | // All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style license that can be 5 | // found in the LICENSE file. 6 | 7 | // +build !linux 8 | 9 | package capability 10 | 11 | import "errors" 12 | 13 | func newPid(pid int) (Capabilities, error) { 14 | return nil, errors.New("not supported") 15 | } 16 | 17 | func newFile(path string) (Capabilities, error) { 18 | return nil, errors.New("not supported") 19 | } 20 | -------------------------------------------------------------------------------- /contrib/builder/rpm/oraclelinux-7/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # THIS FILE IS AUTOGENERATED; SEE "contrib/builder/rpm/generate.sh"! 3 | # 4 | 5 | FROM oraclelinux:7 6 | 7 | RUN yum groupinstall -y "Development Tools" 8 | RUN yum install -y --enablerepo=ol7_optional_latest btrfs-progs-devel device-mapper-devel glibc-static libselinux-devel sqlite-devel tar 9 | 10 | ENV GO_VERSION 1.4.2 11 | RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local 12 | ENV PATH $PATH:/usr/local/go/bin 13 | 14 | ENV AUTO_GOPATH 1 15 | ENV DOCKER_BUILDTAGS selinux 16 | -------------------------------------------------------------------------------- /docs/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 | -------------------------------------------------------------------------------- /contrib/project-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 | ## https://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 | -------------------------------------------------------------------------------- /hack/make/binary: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | BINARY_NAME="docker-$VERSION" 5 | BINARY_EXTENSION="$(binary_extension)" 6 | BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION" 7 | 8 | source "${MAKEDIR}/.go-autogen" 9 | 10 | echo "Building: $DEST/$BINARY_FULLNAME" 11 | go build \ 12 | -o "$DEST/$BINARY_FULLNAME" \ 13 | "${BUILDFLAGS[@]}" \ 14 | -ldflags " 15 | $LDFLAGS 16 | $LDFLAGS_STATIC_DOCKER 17 | " \ 18 | ./docker 19 | 20 | echo "Created binary: $DEST/$BINARY_FULLNAME" 21 | ln -sf "$BINARY_FULLNAME" "$DEST/docker$BINARY_EXTENSION" 22 | 23 | hash_files "$DEST/$BINARY_FULLNAME" 24 | -------------------------------------------------------------------------------- /vendor/src/github.com/BurntSushi/toml/cmd/tomlv/COPYING: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | 15 | -------------------------------------------------------------------------------- /vendor/src/github.com/godbus/dbus/conn_other.go: -------------------------------------------------------------------------------- 1 | // +build !darwin 2 | 3 | package dbus 4 | 5 | import ( 6 | "bytes" 7 | "errors" 8 | "os/exec" 9 | ) 10 | 11 | func sessionBusPlatform() (*Conn, error) { 12 | cmd := exec.Command("dbus-launch") 13 | b, err := cmd.CombinedOutput() 14 | 15 | if err != nil { 16 | return nil, err 17 | } 18 | 19 | i := bytes.IndexByte(b, '=') 20 | j := bytes.IndexByte(b, '\n') 21 | 22 | if i == -1 || j == -1 { 23 | return nil, errors.New("dbus: couldn't determine address of session bus") 24 | } 25 | 26 | return Dial(string(b[i+1 : j])) 27 | } 28 | -------------------------------------------------------------------------------- /hack/make/test-docker-py: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # subshell so that we can export PATH without breaking other things 5 | ( 6 | bundle .integration-daemon-start 7 | 8 | dockerPy='/docker-py' 9 | [ -d "$dockerPy" ] || { 10 | dockerPy="$DEST/docker-py" 11 | git clone https://github.com/docker/docker-py.git "$dockerPy" 12 | } 13 | 14 | # exporting PYTHONPATH to import "docker" from our local docker-py 15 | test_env PYTHONPATH="$dockerPy" NOT_ON_HOST=true python "$dockerPy/tests/integration_test.py" 16 | 17 | bundle .integration-daemon-stop 18 | ) 2>&1 | tee -a "$DEST/test.log" 19 | -------------------------------------------------------------------------------- /pkg/timeoutconn/timeoutconn.go: -------------------------------------------------------------------------------- 1 | package timeoutconn 2 | 3 | import ( 4 | "net" 5 | "time" 6 | ) 7 | 8 | func New(netConn net.Conn, timeout time.Duration) net.Conn { 9 | return &conn{netConn, timeout} 10 | } 11 | 12 | // A net.Conn that sets a deadline for every Read or Write operation 13 | type conn struct { 14 | net.Conn 15 | timeout time.Duration 16 | } 17 | 18 | func (c *conn) Read(b []byte) (int, error) { 19 | if c.timeout > 0 { 20 | if err := c.Conn.SetReadDeadline(time.Now().Add(c.timeout)); err != nil { 21 | return 0, err 22 | } 23 | } 24 | return c.Conn.Read(b) 25 | } 26 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/src/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | 15 | -------------------------------------------------------------------------------- /vendor/src/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | 15 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/drivers/bridge/setup_fixedcidrv4.go: -------------------------------------------------------------------------------- 1 | package bridge 2 | 3 | import ( 4 | log "github.com/Sirupsen/logrus" 5 | ) 6 | 7 | func setupFixedCIDRv4(config *networkConfiguration, i *bridgeInterface) error { 8 | addrv4, _, err := i.addresses() 9 | if err != nil { 10 | return err 11 | } 12 | 13 | log.Debugf("Using IPv4 subnet: %v", config.FixedCIDR) 14 | if err := ipAllocator.RegisterSubnet(addrv4.IPNet, config.FixedCIDR); err != nil { 15 | return &FixedCIDRv4Error{Subnet: config.FixedCIDR, Net: addrv4.IPNet, Err: err} 16 | } 17 | 18 | return nil 19 | } 20 | -------------------------------------------------------------------------------- /daemon/execdriver/execdrivers/execdrivers_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package execdrivers 4 | 5 | import ( 6 | "fmt" 7 | 8 | "github.com/docker/docker/daemon/execdriver" 9 | "github.com/docker/docker/daemon/execdriver/windows" 10 | "github.com/docker/docker/pkg/sysinfo" 11 | ) 12 | 13 | func NewDriver(name string, options []string, root, libPath, initPath string, sysInfo *sysinfo.SysInfo) (execdriver.Driver, error) { 14 | switch name { 15 | case "windows": 16 | return windows.NewDriver(root, initPath, options) 17 | } 18 | return nil, fmt.Errorf("unknown exec driver %s", name) 19 | } 20 | -------------------------------------------------------------------------------- /daemon/export.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | ) 7 | 8 | func (daemon *Daemon) ContainerExport(name string, out io.Writer) error { 9 | container, err := daemon.Get(name) 10 | if err != nil { 11 | return err 12 | } 13 | 14 | data, err := container.Export() 15 | if err != nil { 16 | return fmt.Errorf("%s: %s", name, err) 17 | } 18 | defer data.Close() 19 | 20 | // Stream the entire contents of the container (basically a volatile snapshot) 21 | if _, err := io.Copy(out, data); err != nil { 22 | return fmt.Errorf("%s: %s", name, err) 23 | } 24 | return nil 25 | } 26 | -------------------------------------------------------------------------------- /docs/extend/index.md: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | ## Extending Docker 15 | 16 | Currently, you can extend Docker by adding a plugin. This section contains the following topics: 17 | 18 | * [Understand Docker plugins](plugins.md) 19 | * [Write a volume plugin](plugins_volumes.md) 20 | * [Docker plugin API](plugin_api.md) 21 | 22 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/system/sysconfig_notcgo.go: -------------------------------------------------------------------------------- 1 | // +build !cgo windows 2 | 3 | package system 4 | 5 | func GetClockTicks() int { 6 | // TODO figure out a better alternative for platforms where we're missing cgo 7 | // 8 | // TODO Windows. This could be implemented using Win32 QueryPerformanceFrequency(). 9 | // https://msdn.microsoft.com/en-us/library/windows/desktop/ms644905(v=vs.85).aspx 10 | // 11 | // An example of its usage can be found here. 12 | // https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx 13 | 14 | return 100 15 | } 16 | -------------------------------------------------------------------------------- /pkg/directory/directory_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package directory 4 | 5 | import ( 6 | "os" 7 | "path/filepath" 8 | ) 9 | 10 | // Size walks a directory tree and returns its total size in bytes. 11 | func Size(dir string) (size int64, err error) { 12 | err = filepath.Walk(dir, func(d string, fileInfo os.FileInfo, e error) error { 13 | // Ignore directory sizes 14 | if fileInfo == nil { 15 | return nil 16 | } 17 | 18 | s := fileInfo.Size() 19 | if fileInfo.IsDir() || s == 0 { 20 | return nil 21 | } 22 | 23 | size += s 24 | 25 | return nil 26 | }) 27 | return 28 | } 29 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/resolvconf/dns/resolvconf.go: -------------------------------------------------------------------------------- 1 | package dns 2 | 3 | import ( 4 | "regexp" 5 | ) 6 | 7 | // IPLocalhost is a regex patter for localhost IP address range. 8 | const IPLocalhost = `((127\.([0-9]{1,3}.){2}[0-9]{1,3})|(::1))` 9 | 10 | var localhostIPRegexp = regexp.MustCompile(IPLocalhost) 11 | 12 | // IsLocalhost returns true if ip matches the localhost IP regular expression. 13 | // Used for determining if nameserver settings are being passed which are 14 | // localhost addresses 15 | func IsLocalhost(ip string) bool { 16 | return localhostIPRegexp.MatchString(ip) 17 | } 18 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /docs/reference/commandline/kill.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | # kill 13 | 14 | Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...] 15 | 16 | Kill a running container using SIGKILL or a specified signal 17 | 18 | -s, --signal="KILL" Signal to send to the container 19 | 20 | The main process inside the container will be sent `SIGKILL`, or any 21 | signal specified with option `--signal`. 22 | -------------------------------------------------------------------------------- /pkg/system/stat_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | import ( 6 | "os" 7 | "time" 8 | ) 9 | 10 | type Stat_t struct { 11 | name string 12 | size int64 13 | mode os.FileMode 14 | modTime time.Time 15 | isDir bool 16 | } 17 | 18 | func (s Stat_t) Name() string { 19 | return s.name 20 | } 21 | 22 | func (s Stat_t) Size() int64 { 23 | return s.size 24 | } 25 | 26 | func (s Stat_t) Mode() os.FileMode { 27 | return s.mode 28 | } 29 | 30 | func (s Stat_t) ModTime() time.Time { 31 | return s.modTime 32 | } 33 | 34 | func (s Stat_t) IsDir() bool { 35 | return s.isDir 36 | } 37 | -------------------------------------------------------------------------------- /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/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,"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} -------------------------------------------------------------------------------- /vendor/src/github.com/hashicorp/memberlist/merge_delegate.go: -------------------------------------------------------------------------------- 1 | package memberlist 2 | 3 | // MergeDelegate is used to involve a client in 4 | // a potential cluster merge operation. Namely, when 5 | // a node does a TCP push/pull (as part of a join), 6 | // the delegate is involved and allowed to cancel the join 7 | // based on custom logic. The merge delegate is NOT invoked 8 | // as part of the push-pull anti-entropy. 9 | type MergeDelegate interface { 10 | // NotifyMerge is invoked when a merge could take place. 11 | // Provides a list of the nodes known by the peer. 12 | NotifyMerge(peers []*Node) (cancel bool) 13 | } 14 | -------------------------------------------------------------------------------- /daemon/graphdriver/btrfs/version.go: -------------------------------------------------------------------------------- 1 | // +build linux,!btrfs_noversion 2 | 3 | package btrfs 4 | 5 | /* 6 | #include 7 | 8 | // around version 3.16, they did not define lib version yet 9 | #ifndef BTRFS_LIB_VERSION 10 | #define BTRFS_LIB_VERSION -1 11 | #endif 12 | 13 | // upstream had removed it, but now it will be coming back 14 | #ifndef BTRFS_BUILD_VERSION 15 | #define BTRFS_BUILD_VERSION "-" 16 | #endif 17 | */ 18 | import "C" 19 | 20 | func BtrfsBuildVersion() string { 21 | return string(C.BTRFS_BUILD_VERSION) 22 | } 23 | 24 | func BtrfsLibVersion() int { 25 | return int(C.BTRFS_LIB_VERSION) 26 | } 27 | -------------------------------------------------------------------------------- /docker/daemon_windows.go: -------------------------------------------------------------------------------- 1 | // +build daemon 2 | 3 | package main 4 | 5 | import ( 6 | apiserver "github.com/docker/docker/api/server" 7 | "github.com/docker/docker/daemon" 8 | ) 9 | 10 | func setPlatformServerConfig(serverConfig *apiserver.ServerConfig, daemonCfg *daemon.Config) *apiserver.ServerConfig { 11 | return serverConfig 12 | } 13 | 14 | // currentUserIsOwner checks whether the current user is the owner of the given 15 | // file. 16 | func currentUserIsOwner(f string) bool { 17 | return false 18 | } 19 | 20 | // setDefaultUmask doesn't do anything on windows 21 | func setDefaultUmask() error { 22 | return nil 23 | } 24 | -------------------------------------------------------------------------------- /docs/reference/commandline/tag.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | # tag 13 | 14 | Usage: docker tag [OPTIONS] IMAGE[:TAG] [REGISTRYHOST/][USERNAME/]NAME[:TAG] 15 | 16 | Tag an image into a repository 17 | 18 | -f, --force=false Force 19 | 20 | You can group your images together using names and tags, and then upload them 21 | to [*Share Images via Repositories*](/userguide/dockerrepos/#contributing-to-docker-hub). 22 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/src/github.com/opencontainers/runc/libcontainer/stacktrace/capture.go: -------------------------------------------------------------------------------- 1 | package stacktrace 2 | 3 | import "runtime" 4 | 5 | // Caputure captures a stacktrace for the current calling go program 6 | // 7 | // skip is the number of frames to skip 8 | func Capture(userSkip int) Stacktrace { 9 | var ( 10 | skip = userSkip + 1 // add one for our own function 11 | frames []Frame 12 | ) 13 | for i := skip; ; i++ { 14 | pc, file, line, ok := runtime.Caller(i) 15 | if !ok { 16 | break 17 | } 18 | frames = append(frames, NewFrame(pc, file, line)) 19 | } 20 | return Stacktrace{ 21 | Frames: frames, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /docs/reference/commandline/stop.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | # stop 13 | 14 | Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...] 15 | 16 | Stop a running container by sending SIGTERM and then SIGKILL after a 17 | grace period 18 | 19 | -t, --time=10 Seconds to wait for stop before killing it 20 | 21 | The main process inside the container will receive `SIGTERM`, and after a grace 22 | period, `SIGKILL`. -------------------------------------------------------------------------------- /opts/ip.go: -------------------------------------------------------------------------------- 1 | package opts 2 | 3 | import ( 4 | "fmt" 5 | "net" 6 | ) 7 | 8 | // IpOpt type that hold an IP 9 | type IpOpt struct { 10 | *net.IP 11 | } 12 | 13 | func NewIpOpt(ref *net.IP, defaultVal string) *IpOpt { 14 | o := &IpOpt{ 15 | IP: ref, 16 | } 17 | o.Set(defaultVal) 18 | return o 19 | } 20 | 21 | func (o *IpOpt) Set(val string) error { 22 | ip := net.ParseIP(val) 23 | if ip == nil { 24 | return fmt.Errorf("%s is not an ip address", val) 25 | } 26 | *o.IP = ip 27 | return nil 28 | } 29 | 30 | func (o *IpOpt) String() string { 31 | if *o.IP == nil { 32 | return "" 33 | } 34 | return o.IP.String() 35 | } 36 | -------------------------------------------------------------------------------- /vendor/src/github.com/BurntSushi/toml/encoding_types_1.1.go: -------------------------------------------------------------------------------- 1 | // +build !go1.2 2 | 3 | package toml 4 | 5 | // These interfaces were introduced in Go 1.2, so we add them manually when 6 | // compiling for Go 1.1. 7 | 8 | // TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here 9 | // so that Go 1.1 can be supported. 10 | type TextMarshaler interface { 11 | MarshalText() (text []byte, err error) 12 | } 13 | 14 | // TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined 15 | // here so that Go 1.1 can be supported. 16 | type TextUnmarshaler interface { 17 | UnmarshalText(text []byte) error 18 | } 19 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /contrib/builder/deb/debian-jessie/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # THIS FILE IS AUTOGENERATED; SEE "contrib/builder/deb/generate.sh"! 3 | # 4 | 5 | FROM debian:jessie 6 | 7 | RUN apt-get update && apt-get install -y bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-systemd git libapparmor-dev libdevmapper-dev libsqlite3-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* 8 | 9 | ENV GO_VERSION 1.4.2 10 | RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local 11 | ENV PATH $PATH:/usr/local/go/bin 12 | 13 | ENV AUTO_GOPATH 1 14 | ENV DOCKER_BUILDTAGS apparmor selinux 15 | -------------------------------------------------------------------------------- /contrib/builder/deb/debian-stretch/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # THIS FILE IS AUTOGENERATED; SEE "contrib/builder/deb/generate.sh"! 3 | # 4 | 5 | FROM debian:stretch 6 | 7 | RUN apt-get update && apt-get install -y bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-systemd git libapparmor-dev libdevmapper-dev libsqlite3-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* 8 | 9 | ENV GO_VERSION 1.4.2 10 | RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local 11 | ENV PATH $PATH:/usr/local/go/bin 12 | 13 | ENV AUTO_GOPATH 1 14 | ENV DOCKER_BUILDTAGS apparmor selinux 15 | -------------------------------------------------------------------------------- /graph/tags/tags_unit_test.go: -------------------------------------------------------------------------------- 1 | package tags 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestValidTagName(t *testing.T) { 8 | validTags := []string{"9", "foo", "foo-test", "bar.baz.boo"} 9 | for _, tag := range validTags { 10 | if err := ValidateTagName(tag); err != nil { 11 | t.Errorf("'%s' should've been a valid tag", tag) 12 | } 13 | } 14 | } 15 | 16 | func TestInvalidTagName(t *testing.T) { 17 | validTags := []string{"-9", ".foo", "-test", ".", "-"} 18 | for _, tag := range validTags { 19 | if err := ValidateTagName(tag); err == nil { 20 | t.Errorf("'%s' shouldn't have been a valid tag", tag) 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/src/github.com/fluent/fluent-logger-golang/fluent/proto.go: -------------------------------------------------------------------------------- 1 | //go:generate msgp 2 | 3 | package fluent 4 | 5 | //msgp:tuple Entry 6 | type Entry struct { 7 | Time int64 `msg:"time"` 8 | Record interface{} `msg:"record"` 9 | } 10 | 11 | //msgp:tuple Forward 12 | type Forward struct { 13 | Tag string `msg:"tag"` 14 | Entries []Entry `msg:"entries"` 15 | Option interface{} `msg:"option"` 16 | } 17 | 18 | //msgp:tuple Message 19 | type Message struct { 20 | Tag string `msg:"tag"` 21 | Time int64 `msg:"time"` 22 | Record interface{} `msg:"record"` 23 | Option interface{} `msg:"option"` 24 | } 25 | -------------------------------------------------------------------------------- /contrib/builder/rpm/centos-7/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # THIS FILE IS AUTOGENERATED; SEE "contrib/builder/rpm/generate.sh"! 3 | # 4 | 5 | FROM centos:7 6 | 7 | RUN yum groupinstall -y "Development Tools" 8 | RUN yum -y swap -- remove systemd-container systemd-container-libs -- install systemd systemd-libs 9 | RUN yum install -y btrfs-progs-devel device-mapper-devel glibc-static libselinux-devel sqlite-devel tar 10 | 11 | ENV GO_VERSION 1.4.2 12 | RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local 13 | ENV PATH $PATH:/usr/local/go/bin 14 | 15 | ENV AUTO_GOPATH 1 16 | ENV DOCKER_BUILDTAGS selinux 17 | -------------------------------------------------------------------------------- /pkg/mount/flags_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount 4 | 5 | // These flags are unsupported. 6 | const ( 7 | BIND = 0 8 | DIRSYNC = 0 9 | MANDLOCK = 0 10 | NOATIME = 0 11 | NODEV = 0 12 | NODIRATIME = 0 13 | NOEXEC = 0 14 | NOSUID = 0 15 | UNBINDABLE = 0 16 | RUNBINDABLE = 0 17 | PRIVATE = 0 18 | RPRIVATE = 0 19 | SHARED = 0 20 | RSHARED = 0 21 | SLAVE = 0 22 | RSLAVE = 0 23 | RBIND = 0 24 | RELATIME = 0 25 | RELATIVE = 0 26 | REMOUNT = 0 27 | STRICTATIME = 0 28 | SYNCHRONOUS = 0 29 | RDONLY = 0 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/distribution/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | 26 | # never checkin from the bin file (for now) 27 | bin/* 28 | 29 | # Test key files 30 | *.pem 31 | 32 | # Cover profiles 33 | *.out 34 | 35 | # Editor/IDE specific files. 36 | *.sublime-project 37 | *.sublime-workspace 38 | -------------------------------------------------------------------------------- /vendor/src/github.com/fluent/fluent-logger-golang/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Tatsuo Kaniwa 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /hack/make/.integration-daemon-stop: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | trap - EXIT # reset EXIT trap applied in .integration-daemon-start 4 | 5 | for pidFile in $(find "$DEST" -name docker.pid); do 6 | pid=$(set -x; cat "$pidFile") 7 | ( set -x; kill "$pid" ) 8 | if ! wait "$pid"; then 9 | echo >&2 "warning: PID $pid from $pidFile had a nonzero exit code" 10 | fi 11 | done 12 | 13 | if [ -z "$DOCKER_TEST_HOST" ]; then 14 | # Stop apparmor if it is enabled 15 | if [ -e "/sys/module/apparmor/parameters/enabled" ] && [ "$(cat /sys/module/apparmor/parameters/enabled)" == "Y" ]; then 16 | ( 17 | set -x 18 | /etc/init.d/apparmor stop 19 | ) 20 | fi 21 | fi 22 | -------------------------------------------------------------------------------- /pkg/plugins/pluginrpc-gen/fixtures/foo.go: -------------------------------------------------------------------------------- 1 | package foo 2 | 3 | type wobble struct { 4 | Some string 5 | Val string 6 | Inception *wobble 7 | } 8 | 9 | type Fooer interface{} 10 | 11 | type Fooer2 interface { 12 | Foo() 13 | } 14 | 15 | type Fooer3 interface { 16 | Foo() 17 | Bar(a string) 18 | Baz(a string) (err error) 19 | Qux(a, b string) (val string, err error) 20 | Wobble() (w *wobble) 21 | Wiggle() (w wobble) 22 | } 23 | 24 | type Fooer4 interface { 25 | Foo() error 26 | } 27 | 28 | type Bar interface { 29 | Boo(a string, b string) (s string, err error) 30 | } 31 | 32 | type Fooer5 interface { 33 | Foo() 34 | Bar 35 | } 36 | -------------------------------------------------------------------------------- /vendor/src/github.com/endophage/gotuf/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.4 4 | - tip 5 | 6 | sudo: false 7 | 8 | before_install: 9 | - go get golang.org/x/tools/cmd/cover 10 | 11 | script: 12 | - go test -race -cover ./... 13 | 14 | notifications: 15 | irc: 16 | channels: 17 | - "chat.freenode.net#flynn" 18 | use_notice: true 19 | skip_join: true 20 | on_success: change 21 | on_failure: always 22 | template: 23 | - "%{repository}/%{branch} - %{commit}: %{message} %{build_url}" 24 | email: 25 | on_success: never 26 | on_failure: always 27 | 28 | matrix: 29 | allow_failures: 30 | - go: tip 31 | -------------------------------------------------------------------------------- /contrib/builder/deb/ubuntu-debootstrap-vivid/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # THIS FILE IS AUTOGENERATED; SEE "contrib/builder/deb/generate.sh"! 3 | # 4 | 5 | FROM ubuntu-debootstrap:vivid 6 | 7 | RUN apt-get update && apt-get install -y bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-systemd git libapparmor-dev libdevmapper-dev libsqlite3-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* 8 | 9 | ENV GO_VERSION 1.4.2 10 | RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local 11 | ENV PATH $PATH:/usr/local/go/bin 12 | 13 | ENV AUTO_GOPATH 1 14 | ENV DOCKER_BUILDTAGS apparmor selinux 15 | -------------------------------------------------------------------------------- /contrib/builder/deb/ubuntu-debootstrap-wily/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # THIS FILE IS AUTOGENERATED; SEE "contrib/builder/deb/generate.sh"! 3 | # 4 | 5 | FROM ubuntu-debootstrap:wily 6 | 7 | RUN apt-get update && apt-get install -y bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-systemd git libapparmor-dev libdevmapper-dev libsqlite3-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* 8 | 9 | ENV GO_VERSION 1.4.2 10 | RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local 11 | ENV PATH $PATH:/usr/local/go/bin 12 | 13 | ENV AUTO_GOPATH 1 14 | ENV DOCKER_BUILDTAGS apparmor selinux 15 | -------------------------------------------------------------------------------- /docs/security/trust/index.md: -------------------------------------------------------------------------------- 1 | 12 | 13 | # Use trusted images 14 | 15 | The following topics are available: 16 | 17 | * [Content trust in Docker](/security/trust/content_trust) 18 | * [Manage keys for content trust](/security/trust/trust_key_mng) 19 | * [Automation with content trust](/security/trust/trust_automation) 20 | * [Play in a content trust sandbox](/security/trust/trust_sandbox) 21 | 22 | -------------------------------------------------------------------------------- /pkg/chrootarchive/archive_windows.go: -------------------------------------------------------------------------------- 1 | package chrootarchive 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/docker/docker/pkg/archive" 7 | ) 8 | 9 | // chroot is not supported by Windows 10 | func chroot(path string) error { 11 | return nil 12 | } 13 | 14 | func invokeUnpack(decompressedArchive io.ReadCloser, 15 | dest string, 16 | options *archive.TarOptions) error { 17 | // Windows is different to Linux here because Windows does not support 18 | // chroot. Hence there is no point sandboxing a chrooted process to 19 | // do the unpack. We call inline instead within the daemon process. 20 | return archive.Unpack(decompressedArchive, dest, options) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/distribution/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.4 2 | 3 | RUN apt-get update && \ 4 | apt-get install -y librados-dev apache2-utils && \ 5 | rm -rf /var/lib/apt/lists/* 6 | 7 | ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution 8 | ENV GOPATH $DISTRIBUTION_DIR/Godeps/_workspace:$GOPATH 9 | ENV DOCKER_BUILDTAGS include_rados 10 | 11 | WORKDIR $DISTRIBUTION_DIR 12 | COPY . $DISTRIBUTION_DIR 13 | COPY cmd/registry/config-dev.yml $DISTRIBUTION_DIR/cmd/registry/config.yml 14 | RUN make PREFIX=/go clean binaries 15 | 16 | VOLUME ["/var/lib/registry"] 17 | EXPOSE 5000 18 | ENTRYPOINT ["registry"] 19 | CMD ["cmd/registry/config.yml"] 20 | -------------------------------------------------------------------------------- /vendor/src/github.com/docker/libnetwork/drivers/bridge/setup_ip_forwarding.go: -------------------------------------------------------------------------------- 1 | package bridge 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | ) 7 | 8 | const ( 9 | ipv4ForwardConf = "/proc/sys/net/ipv4/ip_forward" 10 | ipv4ForwardConfPerm = 0644 11 | ) 12 | 13 | func setupIPForwarding(config *configuration) error { 14 | // Sanity Check 15 | if config.EnableIPForwarding == false { 16 | return &ErrIPFwdCfg{} 17 | } 18 | 19 | // Enable IPv4 forwarding 20 | if err := ioutil.WriteFile(ipv4ForwardConf, []byte{'1', '\n'}, ipv4ForwardConfPerm); err != nil { 21 | return fmt.Errorf("Setup IP forwarding failed: %v", err) 22 | } 23 | 24 | return nil 25 | } 26 | -------------------------------------------------------------------------------- /vendor/src/github.com/kr/pty/README.md: -------------------------------------------------------------------------------- 1 | # pty 2 | 3 | Pty is a Go package for using unix pseudo-terminals. 4 | 5 | ## Install 6 | 7 | go get github.com/kr/pty 8 | 9 | ## Example 10 | 11 | ```go 12 | package main 13 | 14 | import ( 15 | "github.com/kr/pty" 16 | "io" 17 | "os" 18 | "os/exec" 19 | ) 20 | 21 | func main() { 22 | c := exec.Command("grep", "--color=auto", "bar") 23 | f, err := pty.Start(c) 24 | if err != nil { 25 | panic(err) 26 | } 27 | 28 | go func() { 29 | f.Write([]byte("foo\n")) 30 | f.Write([]byte("bar\n")) 31 | f.Write([]byte("baz\n")) 32 | f.Write([]byte{4}) // EOT 33 | }() 34 | io.Copy(os.Stdout, f) 35 | } 36 | ``` 37 | -------------------------------------------------------------------------------- /contrib/builder/deb/ubuntu-debootstrap-trusty/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # THIS FILE IS AUTOGENERATED; SEE "contrib/builder/deb/generate.sh"! 3 | # 4 | 5 | FROM ubuntu-debootstrap:trusty 6 | 7 | RUN apt-get update && apt-get install -y bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-systemd git libapparmor-dev libdevmapper-dev libsqlite3-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* 8 | 9 | ENV GO_VERSION 1.4.2 10 | RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local 11 | ENV PATH $PATH:/usr/local/go/bin 12 | 13 | ENV AUTO_GOPATH 1 14 | ENV DOCKER_BUILDTAGS apparmor selinux 15 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /daemon/daemon_aufs.go: -------------------------------------------------------------------------------- 1 | // +build !exclude_graphdriver_aufs,linux 2 | 3 | package daemon 4 | 5 | import ( 6 | "github.com/Sirupsen/logrus" 7 | "github.com/docker/docker/daemon/graphdriver" 8 | "github.com/docker/docker/daemon/graphdriver/aufs" 9 | ) 10 | 11 | // Given the graphdriver ad, if it is aufs, then migrate it. 12 | // If aufs driver is not built, this func is a noop. 13 | func migrateIfAufs(driver graphdriver.Driver, root string) error { 14 | if ad, ok := driver.(*aufs.Driver); ok { 15 | logrus.Debugf("Migrating existing containers") 16 | if err := ad.Migrate(root, setupInitLayer); err != nil { 17 | return err 18 | } 19 | } 20 | return nil 21 | } 22 | -------------------------------------------------------------------------------- /integration-cli/docker_api_version_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "net/http" 6 | 7 | "github.com/docker/docker/api/types" 8 | "github.com/docker/docker/autogen/dockerversion" 9 | "github.com/go-check/check" 10 | ) 11 | 12 | func (s *DockerSuite) TestGetVersion(c *check.C) { 13 | status, body, err := sockRequest("GET", "/version", nil) 14 | c.Assert(status, check.Equals, http.StatusOK) 15 | c.Assert(err, check.IsNil) 16 | 17 | var v types.Version 18 | if err := json.Unmarshal(body, &v); err != nil { 19 | c.Fatal(err) 20 | } 21 | 22 | if v.Version != dockerversion.VERSION { 23 | c.Fatal("Version mismatch") 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /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 | // PathDepth 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 | -------------------------------------------------------------------------------- /vendor/src/github.com/BurntSushi/toml/encoding_types.go: -------------------------------------------------------------------------------- 1 | // +build go1.2 2 | 3 | package toml 4 | 5 | // In order to support Go 1.1, we define our own TextMarshaler and 6 | // TextUnmarshaler types. For Go 1.2+, we just alias them with the 7 | // standard library interfaces. 8 | 9 | import ( 10 | "encoding" 11 | ) 12 | 13 | // TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here 14 | // so that Go 1.1 can be supported. 15 | type TextMarshaler encoding.TextMarshaler 16 | 17 | // TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined 18 | // here so that Go 1.1 can be supported. 19 | type TextUnmarshaler encoding.TextUnmarshaler 20 | --------------------------------------------------------------------------------