├── VERSION ├── 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.rc │ │ ├── docker.ico │ │ ├── docker.png │ │ └── dockerd.rc │ ├── test-integration-shell │ ├── .integration-daemon-setup │ ├── install-binary │ ├── install-binary-client │ ├── cover │ ├── binary-client │ ├── yaml-docs-generator │ ├── binary │ ├── binary-daemon │ ├── dynbinary │ ├── build-integration-test-binary │ └── .binary-setup ├── validate │ ├── .swagger-yamllint │ ├── all │ ├── changelog-date-descending │ └── swagger ├── Jenkins │ └── readme.md ├── integration-cli-on-swarm │ └── agent │ │ ├── vendor.conf │ │ └── Dockerfile ├── generate-authors.sh └── vendor.sh ├── pkg ├── testutil │ └── pkg.go ├── chrootarchive │ ├── init_windows.go │ └── chroot_unix.go ├── archive │ ├── README.md │ ├── testdata │ │ └── broken.tar │ ├── archive_other.go │ ├── copy_windows.go │ ├── copy_unix.go │ ├── time_unsupported.go │ └── time_linux.go ├── stringutils │ └── README.md ├── sysinfo │ ├── README.md │ ├── numcpu.go │ ├── sysinfo_windows.go │ └── sysinfo_unix.go ├── stringid │ └── README.md ├── term │ └── windows │ │ └── windows_test.go ├── signal │ ├── README.md │ └── signal_unsupported.go ├── tarsum │ ├── testdata │ │ └── xattr │ │ │ └── layer.tar │ └── writercloser.go ├── useragent │ └── README.md ├── mount │ ├── mountinfo_windows.go │ ├── mounter_unsupported.go │ └── mountinfo_unsupported.go ├── plugins │ ├── pluginrpc-gen │ │ └── fixtures │ │ │ └── otherfixture │ │ │ └── spaceship.go │ ├── discovery_unix.go │ ├── discovery_windows.go │ ├── plugins_unix.go │ └── plugins_windows.go ├── fileutils │ ├── fileutils_windows.go │ └── fileutils_solaris.go ├── namesgenerator │ └── cmd │ │ └── names-generator │ │ └── main.go ├── system │ ├── errors.go │ ├── meminfo_unsupported.go │ ├── umask_windows.go │ ├── utimes_unsupported.go │ ├── syscall_windows_test.go │ ├── umask.go │ ├── stat_openbsd.go │ ├── stat_solaris.go │ ├── chtimes_unix.go │ ├── lstat_windows.go │ ├── stat_darwin.go │ ├── stat_freebsd.go │ ├── mknod_windows.go │ ├── lstat_unix.go │ ├── xattrs_unsupported.go │ └── meminfo.go ├── ioutils │ ├── temp_unix.go │ ├── fmt_test.go │ └── temp_windows.go ├── parsers │ └── kernel │ │ ├── uname_solaris.go │ │ └── uname_unsupported.go ├── reexec │ ├── README.md │ └── command_unsupported.go ├── symlink │ ├── fs_unix.go │ └── README.md ├── pidfile │ ├── pidfile_darwin.go │ └── pidfile_unix.go ├── tlsconfig │ └── tlsconfig_clone.go ├── promise │ └── promise.go ├── httputils │ └── mimetype_test.go ├── homedir │ └── homedir_others.go ├── devicemapper │ ├── log.go │ └── devmapper_wrapper_no_deferred_remove.go ├── random │ └── random_test.go └── idtools │ └── usergroupadd_unsupported.go ├── project └── CONTRIBUTING.md ├── man ├── src │ ├── rmi.md │ ├── tag.md │ ├── container │ │ ├── run.md │ │ ├── restart.md │ │ ├── start.md │ │ ├── rename.md │ │ ├── stop.md │ │ ├── kill.md │ │ ├── wait.md │ │ ├── unpause.md │ │ └── top.md │ ├── cp.md │ ├── image │ │ ├── build.md │ │ └── rm.md │ ├── images.md │ ├── info.md │ ├── load.md │ ├── ps.md │ ├── pull.md │ ├── push.md │ ├── rm.md │ ├── save.md │ ├── top.md │ ├── commit.md │ ├── create.md │ ├── diff.md │ ├── events.md │ ├── exec.md │ ├── export.md │ ├── history.md │ ├── import.md │ ├── kill.md │ ├── logs.md │ ├── pause.md │ ├── port.md │ ├── rename.md │ ├── start.md │ ├── stats.md │ ├── stop.md │ ├── update.md │ ├── wait.md │ ├── attach.md │ ├── restart.md │ ├── unpause.md │ ├── network │ │ └── disconnect.md │ └── volume │ │ └── inspect.md ├── generate.sh └── glide.yaml ├── cli ├── command │ ├── container │ │ └── testdata │ │ │ ├── valid.env │ │ │ ├── valid.label │ │ │ ├── utf8.env │ │ │ ├── utf16.env │ │ │ └── utf16be.env │ ├── secret │ │ └── testdata │ │ │ ├── secret-create-with-name.golden │ │ │ ├── secret-inspect-with-format.simple-template.golden │ │ │ ├── secret-list-with-quiet-option.golden │ │ │ ├── secret-list-with-format.golden │ │ │ ├── secret-list-with-config-format.golden │ │ │ ├── secret-inspect-with-format.json-template.golden │ │ │ ├── secret-list.golden │ │ │ ├── secret-list-with-filter.golden │ │ │ └── secret-inspect-without-format.single-secret.golden │ ├── swarm │ │ └── testdata │ │ │ ├── jointoken-worker-quiet.golden │ │ │ ├── unlockkeys-unlock-key-quiet.golden │ │ │ ├── update-all-flags-quiet.golden │ │ │ ├── jointoken-manager-quiet.golden │ │ │ ├── unlockkeys-unlock-key-rotate-quiet.golden │ │ │ ├── jointoken-manager.golden │ │ │ ├── jointoken-worker.golden │ │ │ ├── init-init.golden │ │ │ ├── jointoken-manager-rotate.golden │ │ │ ├── unlockkeys-unlock-key.golden │ │ │ ├── update-autolock-unlock-key.golden │ │ │ └── unlockkeys-unlock-key-rotate.golden │ ├── volume │ │ └── testdata │ │ │ ├── volume-prune.empty.golden │ │ │ ├── volume-inspect-with-format.simple-template.golden │ │ │ ├── volume-inspect-with-format.json-template.golden │ │ │ ├── volume-list-with-format.golden │ │ │ ├── volume-list-with-config-format.golden │ │ │ ├── volume-prune.deletedVolumes.golden │ │ │ ├── volume-list-without-format.golden │ │ │ ├── volume-prune-no.golden │ │ │ ├── volume-prune-yes.golden │ │ │ └── volume-inspect-without-format.single-volume.golden │ ├── image │ │ └── build │ │ │ ├── context_unix.go │ │ │ └── context_windows.go │ └── node │ │ ├── testdata │ │ ├── node-ps.simple.golden │ │ └── node-ps.with-errors.golden │ │ └── opts.go ├── config │ └── credentials │ │ ├── default_store_windows.go │ │ ├── default_store_darwin.go │ │ ├── default_store_linux.go │ │ └── default_store_unsupported.go ├── compose │ └── loader │ │ ├── example2.env │ │ └── example1.env ├── internal │ └── test │ │ ├── builders │ │ └── doc.go │ │ └── doc.go └── flags │ └── client.go ├── vendor ├── github.com │ ├── docker │ │ ├── go-connections │ │ │ └── sockets │ │ │ │ └── README.md │ │ ├── swarmkit │ │ │ ├── manager │ │ │ │ ├── doc.go │ │ │ │ ├── allocator │ │ │ │ │ └── networkallocator │ │ │ │ │ │ ├── drivers_unsupported.go │ │ │ │ │ │ ├── drivers_darwin.go │ │ │ │ │ │ └── drivers_network.go │ │ │ │ ├── state │ │ │ │ │ └── store │ │ │ │ │ │ └── combinators.go │ │ │ │ └── storeapi │ │ │ │ │ └── server.go │ │ │ ├── protobuf │ │ │ │ ├── ptypes │ │ │ │ │ ├── doc.go │ │ │ │ │ └── timestamp.go │ │ │ │ └── plugin │ │ │ │ │ ├── gen.go │ │ │ │ │ └── helpers.go │ │ │ ├── api │ │ │ │ └── README.md │ │ │ ├── log │ │ │ │ └── grpc.go │ │ │ └── agent │ │ │ │ └── helpers.go │ │ ├── libnetwork │ │ │ ├── ns │ │ │ │ └── init_unspecified.go │ │ │ ├── resolver_freebsd.go │ │ │ ├── resolvconf │ │ │ │ └── README.md │ │ │ ├── osl │ │ │ │ ├── neigh_freebsd.go │ │ │ │ ├── neigh_solaris.go │ │ │ │ ├── neigh_windows.go │ │ │ │ ├── interface_freebsd.go │ │ │ │ ├── interface_solaris.go │ │ │ │ ├── interface_windows.go │ │ │ │ └── namespace_unsupported.go │ │ │ ├── resolver_windows.go │ │ │ ├── portallocator │ │ │ │ └── portallocator_solaris.go │ │ │ ├── drivers │ │ │ │ └── bridge │ │ │ │ │ ├── netlink_deprecated_linux_armppc64.go │ │ │ │ │ └── netlink_deprecated_linux_notarm.go │ │ │ ├── drivers_experimental_linux.go │ │ │ ├── sandbox_externalkey.go │ │ │ ├── network_unix.go │ │ │ ├── default_gateway_freebsd.go │ │ │ ├── service_windows.go │ │ │ ├── drivers_freebsd.go │ │ │ └── drivers_solaris.go │ │ ├── distribution │ │ │ ├── manifest │ │ │ │ └── doc.go │ │ │ └── doc.go │ │ ├── go-metrics │ │ │ ├── docs.go │ │ │ ├── helpers.go │ │ │ ├── handler.go │ │ │ └── unit.go │ │ ├── notary │ │ │ ├── const_windows.go │ │ │ ├── tuf │ │ │ │ └── README.md │ │ │ ├── trustmanager │ │ │ │ └── yubikey │ │ │ │ │ ├── pkcs11_darwin.go │ │ │ │ │ ├── pkcs11_linux.go │ │ │ │ │ └── non_pkcs11.go │ │ │ ├── const_nowindows.go │ │ │ └── notary.go │ │ └── go-events │ │ │ └── errors.go │ ├── ugorji │ │ └── go │ │ │ └── codec │ │ │ └── prebuild.go │ ├── fluent │ │ └── fluent-logger-golang │ │ │ └── fluent │ │ │ └── version.go │ ├── matttproud │ │ └── golang_protobuf_extensions │ │ │ └── NOTICE │ ├── opencontainers │ │ └── runc │ │ │ └── libcontainer │ │ │ ├── cgroups │ │ │ └── cgroups_unsupported.go │ │ │ ├── devices │ │ │ └── devices_unsupported.go │ │ │ ├── nsenter │ │ │ ├── nsenter_unsupported.go │ │ │ └── nsenter.go │ │ │ ├── configs │ │ │ ├── namespaces.go │ │ │ ├── cgroup_unsupported.go │ │ │ ├── cgroup_windows.go │ │ │ ├── hugepage_limit.go │ │ │ ├── namespaces_unsupported.go │ │ │ └── interface_priority_map.go │ │ │ ├── system │ │ │ ├── unsupported.go │ │ │ └── sysconfig.go │ │ │ └── apparmor │ │ │ └── apparmor_disabled.go │ ├── pivotal-golang │ │ └── clock │ │ │ ├── README.md │ │ │ └── ticker.go │ ├── spf13 │ │ └── cobra │ │ │ └── command_notwin.go │ ├── vishvananda │ │ ├── netns │ │ │ ├── netns_linux_386.go │ │ │ ├── netns_linux_arm.go │ │ │ ├── netns_linux_amd64.go │ │ │ ├── netns_linux_arm64.go │ │ │ ├── netns_linux_ppc64le.go │ │ │ └── netns_linux_s390x.go │ │ └── netlink │ │ │ ├── nl │ │ │ └── nl_unspecified.go │ │ │ ├── route_unspecified.go │ │ │ ├── netlink_linux.go │ │ │ └── link_tuntap_linux.go │ ├── flynn-archive │ │ └── go-shlex │ │ │ └── README.md │ ├── philhofer │ │ └── fwd │ │ │ ├── writer_appengine.go │ │ │ └── writer_unsafe.go │ ├── kr │ │ └── pty │ │ │ ├── types.go │ │ │ ├── ztypes_386.go │ │ │ ├── ztypes_arm.go │ │ │ ├── ztypes_amd64.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 │ │ │ └── doc.go │ ├── Azure │ │ └── go-ansiterm │ │ │ ├── context.go │ │ │ ├── winterm │ │ │ └── utilities.go │ │ │ └── utilities.go │ ├── Microsoft │ │ ├── go-winio │ │ │ ├── backuptar │ │ │ │ └── noop.go │ │ │ └── syscall.go │ │ └── hcsshim │ │ │ ├── version.go │ │ │ ├── cgo.go │ │ │ └── guid.go │ ├── aws │ │ └── aws-sdk-go │ │ │ ├── NOTICE.txt │ │ │ ├── aws │ │ │ ├── version.go │ │ │ ├── client │ │ │ │ └── metadata │ │ │ │ │ └── client_info.go │ │ │ └── signer │ │ │ │ └── v4 │ │ │ │ ├── uri_path_1_4.go │ │ │ │ └── uri_path.go │ │ │ └── service │ │ │ └── sts │ │ │ └── customizations.go │ ├── godbus │ │ └── dbus │ │ │ ├── transport_darwin.go │ │ │ ├── homedir_dynamic.go │ │ │ └── homedir.go │ ├── coreos │ │ ├── etcd │ │ │ ├── NOTICE │ │ │ ├── pkg │ │ │ │ └── README.md │ │ │ └── snap │ │ │ │ └── snappb │ │ │ │ └── snap.proto │ │ └── pkg │ │ │ ├── NOTICE │ │ │ └── README.md │ ├── Sirupsen │ │ └── logrus │ │ │ ├── terminal_appengine.go │ │ │ ├── terminal_bsd.go │ │ │ ├── terminal_solaris.go │ │ │ └── terminal_linux.go │ ├── prometheus │ │ ├── client_model │ │ │ └── NOTICE │ │ ├── common │ │ │ └── NOTICE │ │ └── procfs │ │ │ └── NOTICE │ ├── boltdb │ │ └── bolt │ │ │ ├── boltsync_unix.go │ │ │ ├── bolt_linux.go │ │ │ ├── bolt_ppc.go │ │ │ ├── bolt_ppc64.go │ │ │ ├── bolt_386.go │ │ │ ├── bolt_amd64.go │ │ │ ├── bolt_arm64.go │ │ │ ├── bolt_ppc64le.go │ │ │ └── bolt_s390x.go │ ├── armon │ │ └── go-metrics │ │ │ ├── const_unix.go │ │ │ └── const_windows.go │ ├── jmespath │ │ └── go-jmespath │ │ │ └── README.md │ ├── Nvveen │ │ └── Gotty │ │ │ └── README │ ├── google │ │ └── certificate-transparency │ │ │ ├── cpp │ │ │ └── version.h │ │ │ └── go │ │ │ └── x509 │ │ │ ├── root.go │ │ │ └── root_stub.go │ ├── gorilla │ │ └── context │ │ │ └── README.md │ ├── hashicorp │ │ ├── serf │ │ │ └── serf │ │ │ │ └── conflict_delegate.go │ │ ├── go-immutable-radix │ │ │ └── edges.go │ │ └── memberlist │ │ │ ├── logging.go │ │ │ └── conflict_delegate.go │ ├── xeipuuv │ │ ├── gojsonreference │ │ │ └── README.md │ │ └── gojsonpointer │ │ │ └── README.md │ ├── pborman │ │ └── uuid │ │ │ └── doc.go │ ├── vbatts │ │ └── tar-split │ │ │ └── tar │ │ │ └── asm │ │ │ └── doc.go │ ├── fsnotify │ │ └── fsnotify │ │ │ ├── open_mode_bsd.go │ │ │ └── open_mode_darwin.go │ ├── samuel │ │ └── go-zookeeper │ │ │ └── README.md │ ├── stretchr │ │ └── testify │ │ │ └── assert │ │ │ └── errors.go │ ├── cloudflare │ │ └── cfssl │ │ │ └── ocsp │ │ │ └── config │ │ │ └── config.go │ ├── go-check │ │ └── check │ │ │ └── README.md │ ├── mattn │ │ └── go-shellwords │ │ │ ├── util_windows.go │ │ │ └── util_posix.go │ └── mistifyio │ │ └── go-zfs │ │ └── error.go ├── golang.org │ └── x │ │ ├── time │ │ └── README │ │ ├── net │ │ └── README │ │ ├── crypto │ │ ├── README │ │ └── ssh │ │ │ └── terminal │ │ │ └── util_bsd.go │ │ ├── sys │ │ ├── README │ │ ├── unix │ │ │ ├── asm.s │ │ │ ├── constants.go │ │ │ ├── syscall_no_getwd.go │ │ │ ├── zsysnum_solaris_amd64.go │ │ │ ├── env_unset.go │ │ │ └── flock_linux_32bit.go │ │ └── windows │ │ │ ├── svc │ │ │ └── go12.go │ │ │ ├── registry │ │ │ └── mksyscall.go │ │ │ ├── mksyscall.go │ │ │ ├── env_unset.go │ │ │ ├── asm_windows_386.s │ │ │ └── asm_windows_amd64.s │ │ └── oauth2 │ │ └── google │ │ ├── appengine_hook.go │ │ └── appenginevm_hook.go ├── google.golang.org │ └── grpc │ │ ├── doc.go │ │ └── health │ │ └── grpc_health_v1 │ │ └── health.proto └── cloud.google.com │ └── go │ └── logging │ └── apiv2 │ └── README.md ├── integration-cli ├── fixtures │ ├── secrets │ │ └── default │ └── deploy │ │ ├── remove.yaml │ │ └── default.yaml ├── test_vars_exec_test.go ├── test_vars_seccomp_test.go ├── test_vars_noexec_test.go ├── test_vars_noseccomp_test.go ├── request │ ├── npipe.go │ └── npipe_windows.go ├── environment │ └── protect.go ├── test_vars_unix_test.go ├── registry │ └── requirement.go ├── test_vars_test.go └── test_vars_windows_test.go ├── contrib ├── REVIEWERS ├── completion │ ├── powershell │ │ └── readme.txt │ ├── REVIEWERS │ └── zsh │ │ └── REVIEWERS ├── selinux-fedora-24 │ └── docker-engine-selinux │ │ └── README.md ├── selinux-oraclelinux-7 │ └── docker-engine-selinux │ │ ├── README.md │ │ ├── docker_selinux.8.gz │ │ └── Makefile ├── syntax │ ├── textmate │ │ └── REVIEWERS │ └── vim │ │ └── ftdetect │ │ └── dockerfile.vim ├── docker-device-tool │ └── device_tool_windows.go ├── httpserver │ ├── Dockerfile │ ├── Dockerfile.solaris │ └── server.go ├── init │ ├── upstart │ │ └── REVIEWERS │ ├── systemd │ │ ├── REVIEWERS │ │ └── docker.socket │ └── sysvinit-redhat │ │ └── docker.sysconfig ├── syscall-test │ ├── exit32.s │ ├── setgid.c │ ├── setuid.c │ ├── appletalk.c │ ├── raw.c │ └── acct.c ├── selinux │ └── docker-engine-selinux │ │ ├── docker_selinux.8.gz │ │ └── Makefile ├── nnp-test │ ├── Dockerfile │ └── nnp-test.c ├── builder │ ├── deb │ │ ├── amd64 │ │ │ ├── build.sh │ │ │ └── README.md │ │ ├── s390x │ │ │ └── build.sh │ │ ├── aarch64 │ │ │ └── build.sh │ │ └── ppc64le │ │ │ └── build.sh │ └── rpm │ │ ├── amd64 │ │ ├── build.sh │ │ └── README.md │ │ ├── armhf │ │ └── build.sh │ │ └── ppc64le │ │ └── build.sh ├── editorconfig ├── README.md ├── udev │ └── 80-docker.rules ├── desktop-integration │ └── README.md └── gitdm │ ├── gitdm.config │ └── generate_aliases.sh ├── daemon ├── graphdriver │ ├── graphtest │ │ └── graphtest_windows.go │ ├── btrfs │ │ ├── dummy_unsupported.go │ │ ├── version_test.go │ │ └── version_none.go │ ├── overlay │ │ └── overlay_unsupported.go │ ├── overlay2 │ │ └── overlay_unsupported.go │ ├── zfs │ │ ├── MAINTAINERS │ │ └── zfs_unsupported.go │ ├── register │ │ ├── register_vfs.go │ │ ├── register_windows.go │ │ ├── register_aufs.go │ │ ├── register_btrfs.go │ │ ├── register_devicemapper.go │ │ ├── register_zfs.go │ │ └── register_overlay.go │ ├── aufs │ │ ├── mount_linux.go │ │ └── mount_unsupported.go │ ├── driver_unsupported.go │ └── driver_windows.go ├── logger │ ├── gelf │ │ └── gelf_unsupported.go │ ├── journald │ │ ├── journald_unsupported.go │ │ ├── read_native.go │ │ ├── read_unsupported.go │ │ └── read_native_compat.go │ ├── gcplogs │ │ └── gcplogging_others.go │ ├── plugin_unsupported.go │ └── logger_test.go ├── bindmount_solaris.go ├── seccomp_unsupported.go ├── bindmount_unix.go ├── secrets_linux.go ├── secrets_unsupported.go ├── daemon_unsupported.go ├── apparmor_default_unsupported.go ├── debugtrap_unsupported.go ├── keys_unsupported.go ├── cluster │ ├── executor │ │ └── container │ │ │ ├── validate_unix_test.go │ │ │ └── validate_windows_test.go │ └── listen_addr_others.go ├── container_freebsd.go ├── selinux_unsupported.go ├── container_windows.go ├── daemon_experimental.go ├── info_windows.go ├── update_freebsd.go ├── update_solaris.go ├── exec_freebsd.go ├── exec_solaris.go ├── update_windows.go ├── selinux_linux.go ├── stats_windows.go ├── list_unix.go ├── exec_windows.go └── auth.go ├── docs ├── extend │ └── images │ │ ├── authz_deny.png │ │ ├── authz_allow.png │ │ ├── authz_chunked.png │ │ ├── authz_additional_info.png │ │ └── authz_connection_hijack.png ├── static_files │ ├── contributors.png │ └── docker-logo-compressed.png └── yaml │ └── Dockerfile ├── experimental └── images │ ├── ipvlan-l3.png │ ├── ipvlan_l2_simple.png │ ├── vlans-deeper-look.png │ ├── macvlan-bridge-ipvlan-l2.png │ └── multi_tenant_8021q_vlans.png ├── .dockerignore ├── volume ├── validate_test_windows.go ├── validate_test_unix.go ├── volume_copy_windows.go ├── volume_copy_unix.go ├── store │ └── store_unix.go └── volume_unsupported.go ├── api ├── common_unix.go ├── types │ ├── plugins │ │ └── logdriver │ │ │ ├── gen.go │ │ │ └── entry.proto │ ├── time │ │ └── duration_convert.go │ ├── error_response.go │ ├── id_response.go │ └── service_update_response.go ├── fixtures │ └── keyfile ├── common_windows.go ├── swagger-gen.yaml ├── server │ ├── router │ │ └── checkpoint │ │ │ └── backend.go │ └── httputils │ │ └── httputils_write_json_go16.go └── names.go ├── cmd ├── dockerd │ ├── README.md │ ├── config_experimental.go │ ├── daemon_freebsd.go │ └── service_unsupported.go └── docker │ └── daemon_none_test.go ├── libcontainerd ├── oom_unix.go ├── container.go └── utils_windows_test.go ├── client ├── client_windows.go ├── client_unix.go ├── secret_remove.go ├── interface_stable.go ├── service_remove.go ├── network_remove.go ├── plugin_set.go ├── swarm_join.go ├── container_unpause.go ├── container_pause.go ├── swarm_unlock.go └── swarm_leave.go ├── opts ├── hosts_windows.go ├── opts_unix.go └── hosts_unix.go ├── Jenkinsfile ├── container ├── container_linux.go ├── mounts_windows.go ├── state_solaris.go ├── state_windows.go ├── state_unix.go ├── container_notlinux.go └── mounts_unix.go ├── layer ├── ro_layer_windows.go ├── layer_unix.go └── layer_store_windows.go ├── profiles └── seccomp │ └── seccomp_unsupported.go ├── plugin └── v2 │ └── plugin_unsupported.go ├── distribution └── pull_v2_unix.go ├── oci ├── defaults_windows.go ├── defaults_freebsd.go ├── defaults_solaris.go └── namespaces.go └── runconfig └── hostconfig_windows_test.go /VERSION: -------------------------------------------------------------------------------- 1 | 17.05.0-ce 2 | -------------------------------------------------------------------------------- /hack/make/.build-deb/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /hack/make/.build-deb/docs: -------------------------------------------------------------------------------- 1 | README.md 2 | -------------------------------------------------------------------------------- /pkg/testutil/pkg.go: -------------------------------------------------------------------------------- 1 | package testutil 2 | -------------------------------------------------------------------------------- /project/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ../CONTRIBUTING.md -------------------------------------------------------------------------------- /man/src/rmi.md: -------------------------------------------------------------------------------- 1 | Alias for `docker image rm`. 2 | -------------------------------------------------------------------------------- /man/src/tag.md: -------------------------------------------------------------------------------- 1 | Alias for `docker image tag`. 2 | -------------------------------------------------------------------------------- /man/src/container/run.md: -------------------------------------------------------------------------------- 1 | Alias for `docker run`. 2 | -------------------------------------------------------------------------------- /man/src/cp.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container cp`. 2 | -------------------------------------------------------------------------------- /man/src/image/build.md: -------------------------------------------------------------------------------- 1 | Alias for `docker build`. 2 | -------------------------------------------------------------------------------- /man/src/images.md: -------------------------------------------------------------------------------- 1 | Alias for `docker image ls`. 2 | -------------------------------------------------------------------------------- /man/src/info.md: -------------------------------------------------------------------------------- 1 | Alias for `docker system info`. 2 | -------------------------------------------------------------------------------- /man/src/load.md: -------------------------------------------------------------------------------- 1 | Alias for `docker image load`. 2 | -------------------------------------------------------------------------------- /man/src/ps.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container ls`. 2 | -------------------------------------------------------------------------------- /man/src/pull.md: -------------------------------------------------------------------------------- 1 | Alias for `docker image pull`. 2 | -------------------------------------------------------------------------------- /man/src/push.md: -------------------------------------------------------------------------------- 1 | Alias for `docker image push`. 2 | -------------------------------------------------------------------------------- /man/src/rm.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container rm`. 2 | -------------------------------------------------------------------------------- /man/src/save.md: -------------------------------------------------------------------------------- 1 | Alias for `docker image save`. 2 | -------------------------------------------------------------------------------- /man/src/top.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container top`. 2 | -------------------------------------------------------------------------------- /cli/command/container/testdata/valid.env: -------------------------------------------------------------------------------- 1 | ENV1=value1 2 | -------------------------------------------------------------------------------- /hack/make/.build-deb/docker-engine.manpages: -------------------------------------------------------------------------------- 1 | man/man*/* 2 | -------------------------------------------------------------------------------- /man/src/commit.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container commit`. 2 | -------------------------------------------------------------------------------- /man/src/create.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container create`. 2 | -------------------------------------------------------------------------------- /man/src/diff.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container diff`. 2 | -------------------------------------------------------------------------------- /man/src/events.md: -------------------------------------------------------------------------------- 1 | Alias for `docker system events`. 2 | -------------------------------------------------------------------------------- /man/src/exec.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container exec`. 2 | -------------------------------------------------------------------------------- /man/src/export.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container export`. 2 | -------------------------------------------------------------------------------- /man/src/history.md: -------------------------------------------------------------------------------- 1 | Alias for `docker image history`. 2 | -------------------------------------------------------------------------------- /man/src/import.md: -------------------------------------------------------------------------------- 1 | Alias for `docker image import`. 2 | -------------------------------------------------------------------------------- /man/src/kill.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container kill`. 2 | -------------------------------------------------------------------------------- /man/src/logs.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container logs`. 2 | -------------------------------------------------------------------------------- /man/src/pause.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container pause`. 2 | -------------------------------------------------------------------------------- /man/src/port.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container port`. 2 | -------------------------------------------------------------------------------- /man/src/rename.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container rename`. 2 | -------------------------------------------------------------------------------- /man/src/start.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container start`. 2 | -------------------------------------------------------------------------------- /man/src/stats.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container stats`. 2 | -------------------------------------------------------------------------------- /man/src/stop.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container stop`. 2 | -------------------------------------------------------------------------------- /man/src/update.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container update`. 2 | -------------------------------------------------------------------------------- /man/src/wait.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container wait`. 2 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cli/command/container/testdata/valid.label: -------------------------------------------------------------------------------- 1 | LABEL1=value1 2 | -------------------------------------------------------------------------------- /integration-cli/fixtures/secrets/default: -------------------------------------------------------------------------------- 1 | this is the secret 2 | -------------------------------------------------------------------------------- /man/src/attach.md: -------------------------------------------------------------------------------- 1 | 2 | Alias for `docker container attach`. 3 | -------------------------------------------------------------------------------- /man/src/container/restart.md: -------------------------------------------------------------------------------- 1 | Restart each container listed. 2 | -------------------------------------------------------------------------------- /man/src/container/start.md: -------------------------------------------------------------------------------- 1 | Start one or more containers. 2 | -------------------------------------------------------------------------------- /man/src/restart.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container restart`. 2 | -------------------------------------------------------------------------------- /man/src/unpause.md: -------------------------------------------------------------------------------- 1 | Alias for `docker container unpause`. 2 | -------------------------------------------------------------------------------- /contrib/REVIEWERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | -------------------------------------------------------------------------------- /vendor/github.com/docker/swarmkit/manager/doc.go: -------------------------------------------------------------------------------- 1 | package manager 2 | -------------------------------------------------------------------------------- /cli/command/container/testdata/utf8.env: -------------------------------------------------------------------------------- 1 | FOO=BAR 2 | HELLO=您好 3 | BAR=FOO -------------------------------------------------------------------------------- /daemon/graphdriver/graphtest/graphtest_windows.go: -------------------------------------------------------------------------------- 1 | package graphtest 2 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/ns/init_unspecified.go: -------------------------------------------------------------------------------- 1 | package ns 2 | -------------------------------------------------------------------------------- /cli/command/secret/testdata/secret-create-with-name.golden: -------------------------------------------------------------------------------- 1 | secret_foo_bar 2 | -------------------------------------------------------------------------------- /cli/command/swarm/testdata/jointoken-worker-quiet.golden: -------------------------------------------------------------------------------- 1 | worker-join-token 2 | -------------------------------------------------------------------------------- /cli/command/swarm/testdata/unlockkeys-unlock-key-quiet.golden: -------------------------------------------------------------------------------- 1 | unlock-key 2 | -------------------------------------------------------------------------------- /cli/command/swarm/testdata/update-all-flags-quiet.golden: -------------------------------------------------------------------------------- 1 | Swarm updated. 2 | -------------------------------------------------------------------------------- /hack/make/.build-deb/docker-engine.udev: -------------------------------------------------------------------------------- 1 | ../../../contrib/udev/80-docker.rules -------------------------------------------------------------------------------- /vendor/github.com/docker/distribution/manifest/doc.go: -------------------------------------------------------------------------------- 1 | package manifest 2 | -------------------------------------------------------------------------------- /cli/command/swarm/testdata/jointoken-manager-quiet.golden: -------------------------------------------------------------------------------- 1 | manager-join-token 2 | -------------------------------------------------------------------------------- /cli/command/swarm/testdata/unlockkeys-unlock-key-rotate-quiet.golden: -------------------------------------------------------------------------------- 1 | unlock-key 2 | -------------------------------------------------------------------------------- /cli/command/volume/testdata/volume-prune.empty.golden: -------------------------------------------------------------------------------- 1 | Total reclaimed space: 0B 2 | -------------------------------------------------------------------------------- /daemon/logger/gelf/gelf_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package gelf 4 | -------------------------------------------------------------------------------- /cli/command/secret/testdata/secret-inspect-with-format.simple-template.golden: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /cli/command/secret/testdata/secret-list-with-quiet-option.golden: -------------------------------------------------------------------------------- 1 | ID-foo 2 | ID-bar 3 | -------------------------------------------------------------------------------- /cli/command/volume/testdata/volume-inspect-with-format.simple-template.golden: -------------------------------------------------------------------------------- 1 | volume 2 | -------------------------------------------------------------------------------- /contrib/completion/powershell/readme.txt: -------------------------------------------------------------------------------- 1 | See https://github.com/samneirinck/posh-docker -------------------------------------------------------------------------------- /contrib/selinux-fedora-24/docker-engine-selinux/README.md: -------------------------------------------------------------------------------- 1 | SELinux policy for docker 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /cli/command/secret/testdata/secret-list-with-format.golden: -------------------------------------------------------------------------------- 1 | foo 2 | bar label=label-bar 3 | -------------------------------------------------------------------------------- /cli/command/volume/testdata/volume-inspect-with-format.json-template.golden: -------------------------------------------------------------------------------- 1 | {"foo":"bar"} 2 | -------------------------------------------------------------------------------- /contrib/selinux-oraclelinux-7/docker-engine-selinux/README.md: -------------------------------------------------------------------------------- 1 | SELinux policy for docker 2 | -------------------------------------------------------------------------------- /contrib/syntax/textmate/REVIEWERS: -------------------------------------------------------------------------------- 1 | Asbjorn Enge (@asbjornenge) 2 | -------------------------------------------------------------------------------- /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/golang.org/x/time/README: -------------------------------------------------------------------------------- 1 | This repository provides supplementary Go time packages. 2 | -------------------------------------------------------------------------------- /cli/command/secret/testdata/secret-list-with-config-format.golden: -------------------------------------------------------------------------------- 1 | foo 2 | bar label=label-bar 3 | -------------------------------------------------------------------------------- /contrib/docker-device-tool/device_tool_windows.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | func main() { 4 | } 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/overlay2/overlay_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package overlay2 4 | -------------------------------------------------------------------------------- /man/src/container/rename.md: -------------------------------------------------------------------------------- 1 | Rename a container. Container may be running, paused or stopped. 2 | -------------------------------------------------------------------------------- /man/src/container/stop.md: -------------------------------------------------------------------------------- 1 | Stop a container (Send SIGTERM, and then SIGKILL after grace period) 2 | -------------------------------------------------------------------------------- /cli/command/secret/testdata/secret-inspect-with-format.json-template.golden: -------------------------------------------------------------------------------- 1 | {"label1":"label-foo"} 2 | -------------------------------------------------------------------------------- /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/github.com/ugorji/go/codec/prebuild.go: -------------------------------------------------------------------------------- 1 | package codec 2 | 3 | //go:generate bash prebuild.sh 4 | -------------------------------------------------------------------------------- /hack/make/.resources-windows/docker.rc: -------------------------------------------------------------------------------- 1 | #define DOCKER_NAME "Docker Client" 2 | 3 | #include "common.rc" 4 | -------------------------------------------------------------------------------- /cli/command/volume/testdata/volume-list-with-format.golden: -------------------------------------------------------------------------------- 1 | baz local foo=bar 2 | foo bar 3 | volume local 4 | -------------------------------------------------------------------------------- /contrib/httpserver/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | EXPOSE 80/tcp 3 | COPY httpserver . 4 | CMD ["./httpserver"] 5 | -------------------------------------------------------------------------------- /daemon/bindmount_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | 3 | package daemon 4 | 5 | const bindMountType = "lofs" 6 | -------------------------------------------------------------------------------- /daemon/seccomp_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package daemon 4 | 5 | var supportsSeccomp = false 6 | -------------------------------------------------------------------------------- /pkg/term/windows/windows_test.go: -------------------------------------------------------------------------------- 1 | // This file is necessary to pass the Docker tests. 2 | 3 | package windows 4 | -------------------------------------------------------------------------------- /cli/command/volume/testdata/volume-list-with-config-format.golden: -------------------------------------------------------------------------------- 1 | baz local foo=bar 2 | foo bar 3 | volume local 4 | -------------------------------------------------------------------------------- /daemon/bindmount_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd 2 | 3 | package daemon 4 | 5 | const bindMountType = "bind" 6 | -------------------------------------------------------------------------------- /pkg/signal/README.md: -------------------------------------------------------------------------------- 1 | This package provides helper functions for dealing with signals across various operating systems -------------------------------------------------------------------------------- /vendor/github.com/fluent/fluent-logger-golang/fluent/version.go: -------------------------------------------------------------------------------- 1 | package fluent 2 | 3 | const Version = "1.2.1" 4 | -------------------------------------------------------------------------------- /vendor/github.com/matttproud/golang_protobuf_extensions/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2012 Matt T. Proud (matt.proud@gmail.com) 2 | -------------------------------------------------------------------------------- /cli/config/credentials/default_store_windows.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | const defaultCredentialsStore = "wincred" 4 | -------------------------------------------------------------------------------- /contrib/httpserver/Dockerfile.solaris: -------------------------------------------------------------------------------- 1 | FROM solaris 2 | EXPOSE 80/tcp 3 | COPY httpserver . 4 | CMD ["./httpserver"] 5 | -------------------------------------------------------------------------------- /contrib/syntax/vim/ftdetect/dockerfile.vim: -------------------------------------------------------------------------------- 1 | au BufNewFile,BufRead [Dd]ockerfile,Dockerfile.* set filetype=dockerfile 2 | -------------------------------------------------------------------------------- /docs/extend/images/authz_deny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/docs/extend/images/authz_deny.png -------------------------------------------------------------------------------- /experimental/images/ipvlan-l3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/experimental/images/ipvlan-l3.png -------------------------------------------------------------------------------- /hack/validate/.swagger-yamllint: -------------------------------------------------------------------------------- 1 | extends: default 2 | rules: 3 | document-start: disable 4 | line-length: disable 5 | -------------------------------------------------------------------------------- /pkg/archive/testdata/broken.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/pkg/archive/testdata/broken.tar -------------------------------------------------------------------------------- /cli/config/credentials/default_store_darwin.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | const defaultCredentialsStore = "osxkeychain" 4 | -------------------------------------------------------------------------------- /cli/config/credentials/default_store_linux.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | const defaultCredentialsStore = "secretservice" 4 | -------------------------------------------------------------------------------- /contrib/completion/REVIEWERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | Jessie Frazelle (@jfrazelle) 3 | -------------------------------------------------------------------------------- /docs/extend/images/authz_allow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/docs/extend/images/authz_allow.png -------------------------------------------------------------------------------- /docs/static_files/contributors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/docs/static_files/contributors.png -------------------------------------------------------------------------------- /docs/yaml/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM scratch 2 | COPY docs /docs 3 | # CMD cannot be nil so we set it to empty string 4 | CMD [""] 5 | -------------------------------------------------------------------------------- /hack/Jenkins/readme.md: -------------------------------------------------------------------------------- 1 | These files under this directory are for reference only. 2 | 3 | They are used by Jenkins for CI runs. -------------------------------------------------------------------------------- /pkg/tarsum/testdata/xattr/layer.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/pkg/tarsum/testdata/xattr/layer.tar -------------------------------------------------------------------------------- /pkg/useragent/README.md: -------------------------------------------------------------------------------- 1 | This package provides helper functions to pack version information into a single User-Agent header. 2 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/cgroups/cgroups_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package cgroups 4 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/devices/devices_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package devices 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /daemon/logger/journald/journald_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package journald 4 | 5 | type journald struct { 6 | } 7 | -------------------------------------------------------------------------------- /daemon/secrets_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package daemon 4 | 5 | func secretsSupported() bool { 6 | return true 7 | } 8 | -------------------------------------------------------------------------------- /docs/extend/images/authz_chunked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/docs/extend/images/authz_chunked.png -------------------------------------------------------------------------------- /vendor/github.com/pivotal-golang/clock/README.md: -------------------------------------------------------------------------------- 1 | Provides a `Clock` interface, useful for injecting time dependencies in tests. 2 | -------------------------------------------------------------------------------- /cli/command/container/testdata/utf16.env: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/cli/command/container/testdata/utf16.env -------------------------------------------------------------------------------- /cli/compose/loader/example2.env: -------------------------------------------------------------------------------- 1 | BAR=bar_from_env_file_2 2 | 3 | # overridden in configDetails.Environment 4 | QUX=quz_from_env_file_2 5 | -------------------------------------------------------------------------------- /contrib/syscall-test/exit32.s: -------------------------------------------------------------------------------- 1 | .globl _start 2 | .text 3 | _start: 4 | xorl %eax, %eax 5 | incl %eax 6 | movb $0, %bl 7 | int $0x80 8 | -------------------------------------------------------------------------------- /daemon/secrets_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package daemon 4 | 5 | func secretsSupported() bool { 6 | return false 7 | } 8 | -------------------------------------------------------------------------------- /experimental/images/ipvlan_l2_simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/experimental/images/ipvlan_l2_simple.png -------------------------------------------------------------------------------- /hack/make/.resources-windows/docker.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/hack/make/.resources-windows/docker.ico -------------------------------------------------------------------------------- /hack/make/.resources-windows/docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/hack/make/.resources-windows/docker.png -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/command_notwin.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package cobra 4 | 5 | var preExecHookFn func(*Command) 6 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | bundles 2 | .gopath 3 | vendor/pkg 4 | .go-pkg-cache 5 | .git 6 | hack/integration-cli-on-swarm/integration-cli-on-swarm 7 | 8 | -------------------------------------------------------------------------------- /cli/command/container/testdata/utf16be.env: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/cli/command/container/testdata/utf16be.env -------------------------------------------------------------------------------- /cli/command/volume/testdata/volume-prune.deletedVolumes.golden: -------------------------------------------------------------------------------- 1 | Deleted Volumes: 2 | foo 3 | bar 4 | baz 5 | 6 | Total reclaimed space: 2kB 7 | -------------------------------------------------------------------------------- /daemon/daemon_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd,!windows,!solaris 2 | 3 | package daemon 4 | 5 | const platformSupported = false 6 | -------------------------------------------------------------------------------- /experimental/images/vlans-deeper-look.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/experimental/images/vlans-deeper-look.png -------------------------------------------------------------------------------- /hack/make/.resources-windows/dockerd.rc: -------------------------------------------------------------------------------- 1 | #define DOCKER_NAME "Docker Engine" 2 | 3 | #include "common.rc" 4 | #include "event_messages.rc" 5 | -------------------------------------------------------------------------------- /volume/validate_test_windows.go: -------------------------------------------------------------------------------- 1 | package volume 2 | 3 | var ( 4 | testDestinationPath = `c:\foo` 5 | testSourcePath = `c:\foo` 6 | ) 7 | -------------------------------------------------------------------------------- /docs/extend/images/authz_additional_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/docs/extend/images/authz_additional_info.png -------------------------------------------------------------------------------- /docs/static_files/docker-logo-compressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/docs/static_files/docker-logo-compressed.png -------------------------------------------------------------------------------- /vendor/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/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 | -------------------------------------------------------------------------------- /docs/extend/images/authz_connection_hijack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/docs/extend/images/authz_connection_hijack.png -------------------------------------------------------------------------------- /experimental/images/macvlan-bridge-ipvlan-l2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/experimental/images/macvlan-bridge-ipvlan-l2.png -------------------------------------------------------------------------------- /experimental/images/multi_tenant_8021q_vlans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/experimental/images/multi_tenant_8021q_vlans.png -------------------------------------------------------------------------------- /man/src/container/kill.md: -------------------------------------------------------------------------------- 1 | The main process inside each container specified will be sent SIGKILL, 2 | or any signal specified with option --signal. 3 | -------------------------------------------------------------------------------- /vendor/github.com/flynn-archive/go-shlex/README.md: -------------------------------------------------------------------------------- 1 | go-shlex is a simple lexer for go that supports shell-style quoting, 2 | commenting, and escaping. 3 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/nsenter/nsenter_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux !cgo 2 | 3 | package nsenter 4 | 5 | import "C" 6 | -------------------------------------------------------------------------------- /vendor/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/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 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netns/netns_linux_s390x.go: -------------------------------------------------------------------------------- 1 | // +build linux,s390x 2 | 3 | package netns 4 | 5 | const ( 6 | SYS_SETNS = 339 7 | ) 8 | -------------------------------------------------------------------------------- /daemon/apparmor_default_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package daemon 4 | 5 | func ensureDefaultAppArmorProfile() error { 6 | return nil 7 | } 8 | -------------------------------------------------------------------------------- /daemon/logger/gcplogs/gcplogging_others.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package gcplogs 4 | 5 | func ensureHomeIfIAmStatic() error { 6 | return nil 7 | } 8 | -------------------------------------------------------------------------------- /pkg/mount/mountinfo_windows.go: -------------------------------------------------------------------------------- 1 | package mount 2 | 3 | func parseMountTable() ([]*Info, error) { 4 | // Do NOT return an error! 5 | return nil, nil 6 | } 7 | -------------------------------------------------------------------------------- /pkg/plugins/pluginrpc-gen/fixtures/otherfixture/spaceship.go: -------------------------------------------------------------------------------- 1 | package otherfixture 2 | 3 | // Spaceship is a fixture for tests 4 | type Spaceship struct{} 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/resolver_freebsd.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | 4 | func (r *resolver) setupIPTable() error { 5 | return nil 6 | } 7 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /cli/config/credentials/default_store_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!darwin,!linux 2 | 3 | package credentials 4 | 5 | const defaultCredentialsStore = "" 6 | -------------------------------------------------------------------------------- /cli/internal/test/builders/doc.go: -------------------------------------------------------------------------------- 1 | // Package builders helps you create struct for your unit test while keeping them expressive. 2 | // 3 | package builders 4 | -------------------------------------------------------------------------------- /man/src/network/disconnect.md: -------------------------------------------------------------------------------- 1 | Disconnects a container from a network. 2 | 3 | ```bash 4 | $ docker network disconnect multi-host-network container1 5 | ``` 6 | -------------------------------------------------------------------------------- /pkg/plugins/discovery_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package plugins 4 | 5 | var specsPaths = []string{"/etc/docker/plugins", "/usr/lib/docker/plugins"} 6 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/resolvconf/README.md: -------------------------------------------------------------------------------- 1 | Package resolvconf provides utility code to query and update DNS configuration in /etc/resolv.conf 2 | -------------------------------------------------------------------------------- /api/common_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package api 4 | 5 | // MinVersion represents Minimum REST API version supported 6 | const MinVersion string = "1.12" 7 | -------------------------------------------------------------------------------- /daemon/graphdriver/register/register_vfs.go: -------------------------------------------------------------------------------- 1 | package register 2 | 3 | import ( 4 | // register vfs 5 | _ "github.com/docker/docker/daemon/graphdriver/vfs" 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/github.com/docker/swarmkit/protobuf/ptypes/doc.go: -------------------------------------------------------------------------------- 1 | // Package ptypes provides utility functions for use with 2 | // gogo/protobuf/ptypes. 3 | package ptypes 4 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/configs/namespaces.go: -------------------------------------------------------------------------------- 1 | package configs 2 | 3 | type NamespaceType string 4 | 5 | type Namespaces []Namespace 6 | -------------------------------------------------------------------------------- /volume/validate_test_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package volume 4 | 5 | var ( 6 | testDestinationPath = "/foo" 7 | testSourcePath = "/foo" 8 | ) 9 | -------------------------------------------------------------------------------- /cmd/dockerd/README.md: -------------------------------------------------------------------------------- 1 | docker.go contains Docker daemon's main function. 2 | 3 | This file provides first line CLI argument parsing and environment variable setting. 4 | -------------------------------------------------------------------------------- /contrib/selinux/docker-engine-selinux/docker_selinux.8.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/contrib/selinux/docker-engine-selinux/docker_selinux.8.gz -------------------------------------------------------------------------------- /hack/make/test-integration-shell: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | bundle .integration-daemon-start 4 | bundle .integration-daemon-setup 5 | 6 | export ABS_DEST 7 | bash +e 8 | -------------------------------------------------------------------------------- /libcontainerd/oom_unix.go: -------------------------------------------------------------------------------- 1 | // +build solaris,freebsd +build !linux 2 | 3 | package libcontainerd 4 | 5 | func setOOMScore(pid, score int) error { 6 | return nil 7 | } 8 | -------------------------------------------------------------------------------- /pkg/archive/archive_other.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package archive 4 | 5 | func getWhiteoutConverter(format WhiteoutFormat) tarWhiteoutConverter { 6 | return nil 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/Azure/go-ansiterm/context.go: -------------------------------------------------------------------------------- 1 | package ansiterm 2 | 3 | type ansiContext struct { 4 | currentChar byte 5 | paramBuffer []byte 6 | interBuffer []byte 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/backuptar/noop.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | // This file only exists to allow go get on non-Windows platforms. 3 | 4 | package backuptar 5 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/NOTICE.txt: -------------------------------------------------------------------------------- 1 | AWS SDK for Go 2 | Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | Copyright 2014-2015 Stripe, Inc. 4 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/osl/neigh_freebsd.go: -------------------------------------------------------------------------------- 1 | package osl 2 | 3 | // NeighOption is a function option type to set neighbor options 4 | type NeighOption func() 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/osl/neigh_solaris.go: -------------------------------------------------------------------------------- 1 | package osl 2 | 3 | // NeighOption is a function option type to set interface options 4 | type NeighOption func() 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/osl/neigh_windows.go: -------------------------------------------------------------------------------- 1 | package osl 2 | 3 | // NeighOption is a function option type to set neighbor options 4 | type NeighOption func() 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/resolver_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package libnetwork 4 | 5 | func (r *resolver) setupIPTable() error { 6 | return nil 7 | } 8 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /api/types/plugins/logdriver/gen.go: -------------------------------------------------------------------------------- 1 | //go:generate protoc --gogofast_out=import_path=github.com/docker/docker/api/types/plugins/logdriver:. entry.proto 2 | 3 | package logdriver 4 | -------------------------------------------------------------------------------- /daemon/logger/journald/read_native.go: -------------------------------------------------------------------------------- 1 | // +build linux,cgo,!static_build,journald,!journald_compat 2 | 3 | package journald 4 | 5 | // #cgo pkg-config: libsystemd 6 | import "C" 7 | -------------------------------------------------------------------------------- /daemon/logger/journald/read_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux !cgo static_build !journald 2 | 3 | package journald 4 | 5 | func (s *journald) Close() error { 6 | return nil 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/etcd/NOTICE: -------------------------------------------------------------------------------- 1 | CoreOS Project 2 | Copyright 2014 CoreOS, Inc 3 | 4 | This product includes software developed at CoreOS, Inc. 5 | (http://www.coreos.com/). 6 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/pkg/NOTICE: -------------------------------------------------------------------------------- 1 | CoreOS Project 2 | Copyright 2014 CoreOS, Inc 3 | 4 | This product includes software developed at CoreOS, Inc. 5 | (http://www.coreos.com/). 6 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/osl/interface_freebsd.go: -------------------------------------------------------------------------------- 1 | package osl 2 | 3 | // IfaceOption is a function option type to set interface options 4 | type IfaceOption func() 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/osl/interface_solaris.go: -------------------------------------------------------------------------------- 1 | package osl 2 | 3 | // IfaceOption is a function option type to set interface options 4 | type IfaceOption func() 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/osl/interface_windows.go: -------------------------------------------------------------------------------- 1 | package osl 2 | 3 | // IfaceOption is a function option type to set interface options 4 | type IfaceOption func() 5 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!linux,!freebsd 2 | 3 | package configs 4 | 5 | type Cgroup struct { 6 | } 7 | -------------------------------------------------------------------------------- /volume/volume_copy_windows.go: -------------------------------------------------------------------------------- 1 | package volume 2 | 3 | const ( 4 | // DefaultCopyMode is the copy mode used by default for normal/named volumes 5 | DefaultCopyMode = false 6 | ) 7 | -------------------------------------------------------------------------------- /cli/command/volume/testdata/volume-list-without-format.golden: -------------------------------------------------------------------------------- 1 | DRIVER VOLUME NAME 2 | local baz 3 | bar foo 4 | local volume 5 | -------------------------------------------------------------------------------- /client/client_windows.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | // DefaultDockerHost defines os specific default if DOCKER_HOST is unset 4 | const DefaultDockerHost = "npipe:////./pipe/docker_engine" 5 | -------------------------------------------------------------------------------- /daemon/debugtrap_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!darwin,!freebsd,!windows,!solaris 2 | 3 | package daemon 4 | 5 | func (d *Daemon) setupDumpStackTrap(_ string) { 6 | return 7 | } 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/README: -------------------------------------------------------------------------------- 1 | This repository holds supplementary Go networking libraries. 2 | 3 | To submit changes to this repository, see http://golang.org/doc/contribute.html. 4 | -------------------------------------------------------------------------------- /api/types/plugins/logdriver/entry.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | message LogEntry { 4 | string source = 1; 5 | int64 time_nano = 2; 6 | bytes line = 3; 7 | bool partial = 4; 8 | } 9 | -------------------------------------------------------------------------------- /hack/make/.integration-daemon-setup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | bundle .detect-daemon-osarch 5 | if [ $DOCKER_ENGINE_GOOS != "windows" ]; then 6 | bundle .ensure-emptyfs 7 | fi 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/README: -------------------------------------------------------------------------------- 1 | This repository holds supplementary Go cryptography libraries. 2 | 3 | To submit changes to this repository, see http://golang.org/doc/contribute.html. 4 | -------------------------------------------------------------------------------- /contrib/init/systemd/REVIEWERS: -------------------------------------------------------------------------------- 1 | Lokesh Mandvekar (@lsm5) 2 | Brandon Philips (@philips) 3 | Jessie Frazelle (@jfrazelle) 4 | -------------------------------------------------------------------------------- /daemon/graphdriver/register/register_windows.go: -------------------------------------------------------------------------------- 1 | package register 2 | 3 | import ( 4 | // register the windows graph driver 5 | _ "github.com/docker/docker/daemon/graphdriver/windows" 6 | ) 7 | -------------------------------------------------------------------------------- /daemon/keys_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package daemon 4 | 5 | // ModifyRootKeyLimit is a noop on unsupported platforms. 6 | func ModifyRootKeyLimit() error { 7 | return nil 8 | } 9 | -------------------------------------------------------------------------------- /daemon/logger/journald/read_native_compat.go: -------------------------------------------------------------------------------- 1 | // +build linux,cgo,!static_build,journald,journald_compat 2 | 3 | package journald 4 | 5 | // #cgo pkg-config: libsystemd-journal 6 | import "C" 7 | -------------------------------------------------------------------------------- /integration-cli/test_vars_exec_test.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 | -------------------------------------------------------------------------------- /integration-cli/test_vars_seccomp_test.go: -------------------------------------------------------------------------------- 1 | // +build seccomp 2 | 3 | package main 4 | 5 | const ( 6 | // indicates docker daemon built with seccomp support 7 | supportsSeccomp = true 8 | ) 9 | -------------------------------------------------------------------------------- /pkg/archive/copy_windows.go: -------------------------------------------------------------------------------- 1 | package archive 2 | 3 | import ( 4 | "path/filepath" 5 | ) 6 | 7 | func normalizePath(path string) string { 8 | return filepath.FromSlash(path) 9 | } 10 | -------------------------------------------------------------------------------- /cli/command/volume/testdata/volume-prune-no.golden: -------------------------------------------------------------------------------- 1 | WARNING! This will remove all volumes not used by at least one container. 2 | Are you sure you want to continue? [y/N] Total reclaimed space: 0B 3 | -------------------------------------------------------------------------------- /contrib/selinux-oraclelinux-7/docker-engine-selinux/docker_selinux.8.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freebsd-docker/docker/HEAD/contrib/selinux-oraclelinux-7/docker-engine-selinux/docker_selinux.8.gz -------------------------------------------------------------------------------- /integration-cli/test_vars_noexec_test.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 | -------------------------------------------------------------------------------- /integration-cli/test_vars_noseccomp_test.go: -------------------------------------------------------------------------------- 1 | // +build !seccomp 2 | 3 | package main 4 | 5 | const ( 6 | // indicates docker daemon built with seccomp support 7 | supportsSeccomp = false 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/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/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 | -------------------------------------------------------------------------------- /cli/command/swarm/testdata/jointoken-manager.golden: -------------------------------------------------------------------------------- 1 | To add a manager to this swarm, run the following command: 2 | 3 | docker swarm join \ 4 | --token manager-join-token \ 5 | 127.0.0.1 6 | 7 | -------------------------------------------------------------------------------- /cli/command/swarm/testdata/jointoken-worker.golden: -------------------------------------------------------------------------------- 1 | To add a worker to this swarm, run the following command: 2 | 3 | docker swarm join \ 4 | --token worker-join-token \ 5 | 127.0.0.1 6 | 7 | -------------------------------------------------------------------------------- /hack/validate/all: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Run all validation 4 | 5 | export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | . $SCRIPTDIR/default 8 | . $SCRIPTDIR/vendor 9 | -------------------------------------------------------------------------------- /opts/hosts_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package opts 4 | 5 | // DefaultHost constant defines the default host string used by docker on Windows 6 | var DefaultHost = "npipe://" + DefaultNamedPipe 7 | -------------------------------------------------------------------------------- /pkg/plugins/discovery_windows.go: -------------------------------------------------------------------------------- 1 | package plugins 2 | 3 | import ( 4 | "os" 5 | "path/filepath" 6 | ) 7 | 8 | var specsPaths = []string{filepath.Join(os.Getenv("programdata"), "docker", "plugins")} 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/portallocator/portallocator_solaris.go: -------------------------------------------------------------------------------- 1 | package portallocator 2 | 3 | func getDynamicPortRange() (start int, end int, err error) { 4 | return 32768, 65535, nil 5 | } 6 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /volume/volume_copy_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package volume 4 | 5 | const ( 6 | // DefaultCopyMode is the copy mode used by default for normal/named volumes 7 | DefaultCopyMode = true 8 | ) 9 | -------------------------------------------------------------------------------- /cli/compose/loader/example1.env: -------------------------------------------------------------------------------- 1 | # passed through 2 | FOO=foo_from_env_file 3 | 4 | # overridden in example2.env 5 | BAR=bar_from_env_file 6 | 7 | # overridden in full-example.yml 8 | BAZ=baz_from_env_file 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/drivers/bridge/netlink_deprecated_linux_armppc64.go: -------------------------------------------------------------------------------- 1 | // +build arm ppc64 ppc64le 2 | 3 | package bridge 4 | 5 | func ifrDataByte(b byte) uint8 { 6 | return uint8(b) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/drivers/bridge/netlink_deprecated_linux_notarm.go: -------------------------------------------------------------------------------- 1 | // +build !arm,!ppc64,!ppc64le 2 | 3 | package bridge 4 | 5 | func ifrDataByte(b byte) int8 { 6 | return int8(b) 7 | } 8 | -------------------------------------------------------------------------------- /Jenkinsfile: -------------------------------------------------------------------------------- 1 | pipeline { 2 | agent { label 'freebsd' } 3 | stages { 4 | stage('Build') { 5 | steps { 6 | sh 'AUTO_GOPATH=1 ./hack/make.sh binary' 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /container/container_linux.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | import ( 4 | "golang.org/x/sys/unix" 5 | ) 6 | 7 | func detachMounted(path string) error { 8 | return unix.Unmount(path, unix.MNT_DETACH) 9 | } 10 | -------------------------------------------------------------------------------- /hack/integration-cli-on-swarm/agent/vendor.conf: -------------------------------------------------------------------------------- 1 | # dependencies specific to worker (i.e. github.com/docker/docker/...) are not vendored here 2 | github.com/bfirsh/funker-go eaa0a2e06f30e72c9a0b7f858951e581e26ef773 3 | -------------------------------------------------------------------------------- /opts/opts_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package opts 4 | 5 | // DefaultHTTPHost Default HTTP Host used if only port is provided to -H flag e.g. dockerd -H tcp://:8080 6 | const DefaultHTTPHost = "localhost" 7 | -------------------------------------------------------------------------------- /pkg/fileutils/fileutils_windows.go: -------------------------------------------------------------------------------- 1 | package fileutils 2 | 3 | // GetTotalUsedFds Returns the number of used File Descriptors. Not supported 4 | // on Windows. 5 | func GetTotalUsedFds() int { 6 | return -1 7 | } 8 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package grpc implements an RPC system called gRPC. 3 | 4 | See www.grpc.io for more information about gRPC. 5 | */ 6 | package grpc // import "google.golang.org/grpc" 7 | -------------------------------------------------------------------------------- /cli/command/swarm/testdata/init-init.golden: -------------------------------------------------------------------------------- 1 | Swarm initialized: current node (nodeID) is now a manager. 2 | 3 | To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions. 4 | 5 | -------------------------------------------------------------------------------- /daemon/cluster/executor/container/validate_unix_test.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package container 4 | 5 | const ( 6 | testAbsPath = "/foo" 7 | testAbsNonExistent = "/some-non-existing-host-path/" 8 | ) 9 | -------------------------------------------------------------------------------- /pkg/archive/copy_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package archive 4 | 5 | import ( 6 | "path/filepath" 7 | ) 8 | 9 | func normalizePath(path string) string { 10 | return filepath.ToSlash(path) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/go-winio/syscall.go: -------------------------------------------------------------------------------- 1 | package winio 2 | 3 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go file.go pipe.go sd.go fileinfo.go privilege.go backup.go 4 | -------------------------------------------------------------------------------- /contrib/nnp-test/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM buildpack-deps:jessie 2 | 3 | COPY . /usr/src/ 4 | 5 | WORKDIR /usr/src/ 6 | 7 | RUN gcc -g -Wall -static nnp-test.c -o /usr/bin/nnp-test 8 | 9 | RUN chmod +s /usr/bin/nnp-test 10 | -------------------------------------------------------------------------------- /daemon/cluster/executor/container/validate_windows_test.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package container 4 | 5 | const ( 6 | testAbsPath = `c:\foo` 7 | testAbsNonExistent = `c:\some-non-existing-host-path\` 8 | ) 9 | -------------------------------------------------------------------------------- /hack/make/install-binary: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | rm -rf "$DEST" 5 | 6 | ( 7 | source "${MAKEDIR}/install-binary-client" 8 | ) 9 | 10 | ( 11 | source "${MAKEDIR}/install-binary-daemon" 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-metrics/docs.go: -------------------------------------------------------------------------------- 1 | // This package is small wrapper around the prometheus go client to help enforce convention and best practices for metrics collection in Docker projects. 2 | 3 | package metrics 4 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-metrics/helpers.go: -------------------------------------------------------------------------------- 1 | package metrics 2 | 3 | func sumFloat64(vs ...float64) float64 { 4 | var sum float64 5 | for _, v := range vs { 6 | sum += v 7 | } 8 | 9 | return sum 10 | } 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/README: -------------------------------------------------------------------------------- 1 | This repository holds supplemental Go packages for low-level interactions with the operating system. 2 | 3 | To submit changes to this repository, see http://golang.org/doc/contribute.html. 4 | -------------------------------------------------------------------------------- /contrib/syscall-test/setgid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() { 6 | if (setgid(1) == -1) { 7 | perror("setgid"); 8 | return 1; 9 | } 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /contrib/syscall-test/setuid.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() { 6 | if (setuid(1) == -1) { 7 | perror("setuid"); 8 | return 1; 9 | } 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /pkg/sysinfo/numcpu.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package sysinfo 4 | 5 | import ( 6 | "runtime" 7 | ) 8 | 9 | // NumCPU returns the number of CPUs 10 | func NumCPU() int { 11 | return runtime.NumCPU() 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/swarmkit/manager/allocator/networkallocator/drivers_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!darwin,!windows 2 | 3 | package networkallocator 4 | 5 | func getInitializers() []initializer { 6 | return nil 7 | } 8 | -------------------------------------------------------------------------------- /vendor/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/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/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 | -------------------------------------------------------------------------------- /client/client_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd solaris openbsd darwin 2 | 3 | package client 4 | 5 | // DefaultDockerHost defines os specific default if DOCKER_HOST is unset 6 | const DefaultDockerHost = "unix:///var/run/docker.sock" 7 | -------------------------------------------------------------------------------- /contrib/nnp-test/nnp-test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | printf("EUID=%d\n", geteuid()); 8 | return 0; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /daemon/container_freebsd.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "github.com/docker/docker/container" 5 | ) 6 | 7 | func (daemon *Daemon) saveApparmorConfig(container *container.Container) error { 8 | return nil 9 | } 10 | -------------------------------------------------------------------------------- /daemon/graphdriver/register/register_aufs.go: -------------------------------------------------------------------------------- 1 | // +build !exclude_graphdriver_aufs,linux 2 | 3 | package register 4 | 5 | import ( 6 | // register the aufs graphdriver 7 | _ "github.com/docker/docker/daemon/graphdriver/aufs" 8 | ) 9 | -------------------------------------------------------------------------------- /pkg/sysinfo/sysinfo_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package sysinfo 4 | 5 | // New returns an empty SysInfo for windows for now. 6 | func New(quiet bool) *SysInfo { 7 | sysInfo := &SysInfo{} 8 | return sysInfo 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | // IsTerminal returns true if stderr's file descriptor is a terminal. 6 | func IsTerminal() bool { 7 | return true 8 | } 9 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/NOTICE: -------------------------------------------------------------------------------- 1 | Data model artifacts for Prometheus. 2 | Copyright 2012-2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | -------------------------------------------------------------------------------- /daemon/cluster/listen_addr_others.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!solaris 2 | 3 | package cluster 4 | 5 | import "net" 6 | 7 | func (c *Cluster) resolveSystemAddr() (net.IP, error) { 8 | return c.resolveSystemAddrViaSubnetCheck() 9 | } 10 | -------------------------------------------------------------------------------- /daemon/graphdriver/register/register_btrfs.go: -------------------------------------------------------------------------------- 1 | // +build !exclude_graphdriver_btrfs,linux 2 | 3 | package register 4 | 5 | import ( 6 | // register the btrfs graphdriver 7 | _ "github.com/docker/docker/daemon/graphdriver/btrfs" 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/NOTICE: -------------------------------------------------------------------------------- 1 | Common libraries shared by Prometheus Go components. 2 | Copyright 2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | -------------------------------------------------------------------------------- /cmd/dockerd/config_experimental.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/docker/docker/daemon/config" 5 | "github.com/spf13/pflag" 6 | ) 7 | 8 | func attachExperimentalFlags(conf *config.Config, cmd *pflag.FlagSet) { 9 | } 10 | -------------------------------------------------------------------------------- /pkg/namesgenerator/cmd/names-generator/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/docker/docker/pkg/namesgenerator" 7 | ) 8 | 9 | func main() { 10 | fmt.Println(namesgenerator.GetRandomName(0)) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/boltsync_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!plan9,!linux,!openbsd 2 | 3 | package bolt 4 | 5 | // fdatasync flushes written data to a file descriptor. 6 | func fdatasync(db *DB) error { 7 | return db.file.Sync() 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/etcd/pkg/README.md: -------------------------------------------------------------------------------- 1 | pkg/ is a collection of utility packages used by etcd without being specific to etcd itself. A package belongs here 2 | only if it could possibly be moved out into its own repository in the future. 3 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /cli/command/volume/testdata/volume-prune-yes.golden: -------------------------------------------------------------------------------- 1 | WARNING! This will remove all volumes not used by at least one container. 2 | Are you sure you want to continue? [y/N] Deleted Volumes: 3 | foo 4 | bar 5 | baz 6 | 7 | Total reclaimed space: 2kB 8 | -------------------------------------------------------------------------------- /daemon/graphdriver/aufs/mount_linux.go: -------------------------------------------------------------------------------- 1 | package aufs 2 | 3 | import "syscall" 4 | 5 | func mount(source string, target string, fstype string, flags uintptr, data string) error { 6 | return syscall.Mount(source, target, fstype, flags, data) 7 | } 8 | -------------------------------------------------------------------------------- /daemon/selinux_unsupported.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 | -------------------------------------------------------------------------------- /pkg/fileutils/fileutils_solaris.go: -------------------------------------------------------------------------------- 1 | package fileutils 2 | 3 | // GetTotalUsedFds Returns the number of used File Descriptors. 4 | // On Solaris these limits are per process and not systemwide 5 | func GetTotalUsedFds() int { 6 | return -1 7 | } 8 | -------------------------------------------------------------------------------- /cli/command/image/build/context_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package build 4 | 5 | import ( 6 | "path/filepath" 7 | ) 8 | 9 | func getContextRoot(srcPath string) (string, error) { 10 | return filepath.Join(srcPath, "."), nil 11 | } 12 | -------------------------------------------------------------------------------- /cli/internal/test/doc.go: -------------------------------------------------------------------------------- 1 | // Package test is a test-only package that can be used by other cli package to write unit test. 2 | // 3 | // It as an internal package and cannot be used outside of github.com/docker/docker/cli package. 4 | // 5 | package test 6 | -------------------------------------------------------------------------------- /daemon/graphdriver/zfs/zfs_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd,!solaris 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 | -------------------------------------------------------------------------------- /layer/ro_layer_windows.go: -------------------------------------------------------------------------------- 1 | package layer 2 | 3 | import "github.com/docker/distribution" 4 | 5 | var _ distribution.Describable = &roLayer{} 6 | 7 | func (rl *roLayer) Descriptor() distribution.Descriptor { 8 | return rl.descriptor 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_windows.go: -------------------------------------------------------------------------------- 1 | package configs 2 | 3 | // TODO Windows: This can ultimately be entirely factored out on Windows as 4 | // cgroups are a Unix-specific construct. 5 | type Cgroup struct { 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/nl/nl_unspecified.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package nl 4 | 5 | import "encoding/binary" 6 | 7 | var SupportedNlFamilies = []int{} 8 | 9 | func NativeEndian() binary.ByteOrder { 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /daemon/container_windows.go: -------------------------------------------------------------------------------- 1 | //+build windows 2 | 3 | package daemon 4 | 5 | import ( 6 | "github.com/docker/docker/container" 7 | ) 8 | 9 | func (daemon *Daemon) saveApparmorConfig(container *container.Container) error { 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /daemon/graphdriver/register/register_devicemapper.go: -------------------------------------------------------------------------------- 1 | // +build !exclude_graphdriver_devicemapper,linux 2 | 3 | package register 4 | 5 | import ( 6 | // register the devmapper graphdriver 7 | _ "github.com/docker/docker/daemon/graphdriver/devmapper" 8 | ) 9 | -------------------------------------------------------------------------------- /hack/make/install-binary-client: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | rm -rf "$DEST" 5 | 6 | ( 7 | DEST="$(dirname $DEST)/binary-client" 8 | source "${MAKEDIR}/.binary-setup" 9 | install_binary "${DEST}/${DOCKER_CLIENT_BINARY_NAME}" 10 | ) 11 | -------------------------------------------------------------------------------- /integration-cli/fixtures/deploy/remove.yaml: -------------------------------------------------------------------------------- 1 | 2 | version: "3.1" 3 | services: 4 | web: 5 | image: busybox:latest 6 | command: top 7 | secrets: 8 | - special 9 | secrets: 10 | special: 11 | file: fixtures/secrets/default 12 | -------------------------------------------------------------------------------- /opts/hosts_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package opts 4 | 5 | import "fmt" 6 | 7 | // DefaultHost constant defines the default host string used by docker on other hosts than Windows 8 | var DefaultHost = fmt.Sprintf("unix://%s", DefaultUnixSocket) 9 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/hcsshim/version.go: -------------------------------------------------------------------------------- 1 | package hcsshim 2 | 3 | // IsTP4 returns whether the currently running Windows build is at least TP4. 4 | func IsTP4() bool { 5 | // HNSCall was not present in TP4 6 | return procHNSCall.Find() != nil 7 | } 8 | -------------------------------------------------------------------------------- /vendor/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/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 | -------------------------------------------------------------------------------- /cli/command/swarm/testdata/jointoken-manager-rotate.golden: -------------------------------------------------------------------------------- 1 | Successfully rotated manager join token. 2 | 3 | To add a manager to this swarm, run the following command: 4 | 5 | docker swarm join \ 6 | --token manager-join-token \ 7 | 127.0.0.1 8 | 9 | -------------------------------------------------------------------------------- /container/mounts_windows.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // Mount contains information for a mount operation. 4 | type Mount struct { 5 | Source string `json:"source"` 6 | Destination string `json:"destination"` 7 | Writable bool `json:"writable"` 8 | } 9 | -------------------------------------------------------------------------------- /contrib/builder/deb/amd64/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env 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/deb/s390x/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env 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/amd64/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env 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 | -------------------------------------------------------------------------------- /contrib/builder/rpm/armhf/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env 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 | -------------------------------------------------------------------------------- /layer/layer_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd darwin openbsd solaris 2 | 3 | package layer 4 | 5 | import "github.com/docker/docker/pkg/stringid" 6 | 7 | func (ls *layerStore) mountID(name string) string { 8 | return stringid.GenerateRandomID() 9 | } 10 | -------------------------------------------------------------------------------- /pkg/sysinfo/sysinfo_unix.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!solaris,!windows 2 | 3 | package sysinfo 4 | 5 | // New returns an empty SysInfo for non linux nor solaris for now. 6 | func New(quiet bool) *SysInfo { 7 | sysInfo := &SysInfo{} 8 | return sysInfo 9 | } 10 | -------------------------------------------------------------------------------- /pkg/system/errors.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | // ErrNotSupportedPlatform means the platform is not supported. 9 | ErrNotSupportedPlatform = errors.New("platform and architecture is not supported") 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_linux.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | // fdatasync flushes written data to a file descriptor. 8 | func fdatasync(db *DB) error { 9 | return syscall.Fdatasync(int(db.file.Fd())) 10 | } 11 | -------------------------------------------------------------------------------- /contrib/builder/deb/aarch64/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env 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/deb/ppc64le/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env 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/ppc64le/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env 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 | -------------------------------------------------------------------------------- /daemon/graphdriver/register/register_zfs.go: -------------------------------------------------------------------------------- 1 | // +build !exclude_graphdriver_zfs,linux !exclude_graphdriver_zfs,freebsd, solaris 2 | 3 | package register 4 | 5 | import ( 6 | // register the zfs driver 7 | _ "github.com/docker/docker/daemon/graphdriver/zfs" 8 | ) 9 | -------------------------------------------------------------------------------- /pkg/system/meminfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows,!solaris 2 | 3 | package system 4 | 5 | // ReadMemInfo is not supported on platforms other than linux and windows. 6 | func ReadMemInfo() (*MemInfo, error) { 7 | return nil, ErrNotSupportedPlatform 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/system/unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package system 4 | 5 | // RunningInUserNS is a stub for non-Linux systems 6 | // Always returns false 7 | func RunningInUserNS() bool { 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /contrib/editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | charset = utf-8 7 | indent_style = tab 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | indent_size = 2 13 | indent_style = space 14 | -------------------------------------------------------------------------------- /contrib/init/sysvinit-redhat/docker.sysconfig: -------------------------------------------------------------------------------- 1 | # /etc/sysconfig/docker 2 | # 3 | # Other arguments to pass to the docker daemon process 4 | # These will be parsed by the sysv initscript and appended 5 | # to the arguments list passed to docker daemon 6 | 7 | other_args="" 8 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | // +build !appengine 3 | 4 | package logrus 5 | 6 | import "syscall" 7 | 8 | const ioctlReadTermios = syscall.TIOCGETA 9 | 10 | type Termios syscall.Termios 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/notary/const_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package notary 4 | 5 | import "os" 6 | 7 | // NotarySupportedSignals does not contain any signals, because SIGUSR1/2 are not supported on windows 8 | var NotarySupportedSignals = []os.Signal{} 9 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/route_unspecified.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package netlink 4 | 5 | func (r *Route) ListFlags() []string { 6 | return []string{} 7 | } 8 | 9 | func (n *NexthopInfo) ListFlags() []string { 10 | return []string{} 11 | } 12 | -------------------------------------------------------------------------------- /cli/command/secret/testdata/secret-list.golden: -------------------------------------------------------------------------------- 1 | ID NAME CREATED UPDATED 2 | ID-foo foo 2 hours ago About an hour ago 3 | ID-bar bar 2 hours ago About an hour ago 4 | -------------------------------------------------------------------------------- /contrib/README.md: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /integration-cli/request/npipe.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package request 4 | 5 | import ( 6 | "net" 7 | "time" 8 | ) 9 | 10 | func npipeDial(path string, timeout time.Duration) (net.Conn, error) { 11 | panic("npipe protocol only supported on Windows") 12 | } 13 | -------------------------------------------------------------------------------- /man/src/container/wait.md: -------------------------------------------------------------------------------- 1 | Block until a container stops, then print its exit code. 2 | 3 | # EXAMPLES 4 | 5 | $ docker run -d fedora sleep 99 6 | 079b83f558a2bc52ecad6b2a5de13622d584e6bb1aea058c11b36511e85e7622 7 | $ docker container wait 079b83f558a2bc 8 | 0 9 | -------------------------------------------------------------------------------- /pkg/ioutils/temp_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ioutils 4 | 5 | import "io/ioutil" 6 | 7 | // TempDir on Unix systems is equivalent to ioutil.TempDir. 8 | func TempDir(dir, prefix string) (string, error) { 9 | return ioutil.TempDir(dir, prefix) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/drivers_experimental_linux.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import "github.com/docker/libnetwork/drivers/ipvlan" 4 | 5 | func additionalDrivers() []initializer { 6 | return []initializer{ 7 | {ipvlan.Init, "ipvlan"}, 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/notary/tuf/README.md: -------------------------------------------------------------------------------- 1 | ## Credits 2 | 3 | This implementation was originally forked from [flynn/go-tuf](https://github.com/flynn/go-tuf) 4 | 5 | This implementation retains the same 3 Clause BSD license present on 6 | the original flynn implementation. 7 | -------------------------------------------------------------------------------- /vendor/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/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 | -------------------------------------------------------------------------------- /daemon/daemon_experimental.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import "github.com/docker/docker/api/types/container" 4 | 5 | func (daemon *Daemon) verifyExperimentalContainerSettings(hostConfig *container.HostConfig, config *container.Config) ([]string, error) { 6 | return nil, nil 7 | } 8 | -------------------------------------------------------------------------------- /pkg/chrootarchive/chroot_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!linux 2 | 3 | package chrootarchive 4 | 5 | import "syscall" 6 | 7 | func chroot(path string) error { 8 | if err := syscall.Chroot(path); err != nil { 9 | return err 10 | } 11 | return syscall.Chdir("/") 12 | } 13 | -------------------------------------------------------------------------------- /pkg/signal/signal_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!darwin,!freebsd,!windows,!solaris 2 | 3 | package signal 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // SignalMap is an empty map of signals for unsupported platform. 10 | var SignalMap = map[string]syscall.Signal{} 11 | -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/README.md: -------------------------------------------------------------------------------- 1 | # go-jmespath - A JMESPath implementation in Go 2 | 3 | [![Build Status](https://img.shields.io/travis/jmespath/go-jmespath.svg)](https://travis-ci.org/jmespath/go-jmespath) 4 | 5 | 6 | 7 | See http://jmespath.org for more info. 8 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /container/state_solaris.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // setFromExitStatus is a platform specific helper function to set the state 4 | // based on the ExitStatus structure. 5 | func (s *State) setFromExitStatus(exitStatus *ExitStatus) { 6 | s.ExitCodeValue = exitStatus.ExitCode 7 | } 8 | -------------------------------------------------------------------------------- /container/state_windows.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // setFromExitStatus is a platform specific helper function to set the state 4 | // based on the ExitStatus structure. 5 | func (s *State) setFromExitStatus(exitStatus *ExitStatus) { 6 | s.ExitCodeValue = exitStatus.ExitCode 7 | } 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /integration-cli/request/npipe_windows.go: -------------------------------------------------------------------------------- 1 | package request 2 | 3 | import ( 4 | "net" 5 | "time" 6 | 7 | "github.com/Microsoft/go-winio" 8 | ) 9 | 10 | func npipeDial(path string, timeout time.Duration) (net.Conn, error) { 11 | return winio.DialPipe(path, &timeout) 12 | } 13 | -------------------------------------------------------------------------------- /pkg/system/umask_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | // Umask is not supported on the windows platform. 6 | func Umask(newmask int) (oldmask int, err error) { 7 | // should not be called on cli code path 8 | return 0, ErrNotSupportedPlatform 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/swarmkit/protobuf/plugin/gen.go: -------------------------------------------------------------------------------- 1 | package plugin 2 | 3 | //go:generate protoc -I.:/usr/local --gogoswarm_out=import_path=github.com/docker/swarmkit/protobuf/plugin,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. plugin.proto 4 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /cli/command/node/testdata/node-ps.simple.golden: -------------------------------------------------------------------------------- 1 | ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS 2 | taskID rl02d5gwz6chzu7il5fhtb8be.1 myimage:mytag defaultNodeName Ready Ready 2 hours ago *:80->80/tcp 3 | -------------------------------------------------------------------------------- /cli/command/secret/testdata/secret-list-with-filter.golden: -------------------------------------------------------------------------------- 1 | ID NAME CREATED UPDATED 2 | ID-foo foo 2 hours ago About an hour ago 3 | ID-bar bar 2 hours ago About an hour ago 4 | -------------------------------------------------------------------------------- /daemon/logger/plugin_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!solaris,!freebsd 2 | 3 | package logger 4 | 5 | import ( 6 | "errors" 7 | "io" 8 | ) 9 | 10 | func openPluginStream(a *pluginAdapter) (io.WriteCloser, error) { 11 | return nil, errors.New("log plugin not supported") 12 | } 13 | -------------------------------------------------------------------------------- /pkg/system/utimes_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd 2 | 3 | package system 4 | 5 | import "syscall" 6 | 7 | // LUtimesNano is only supported on linux and freebsd. 8 | func LUtimesNano(path string, ts []syscall.Timespec) error { 9 | return ErrNotSupportedPlatform 10 | } 11 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /pkg/parsers/kernel/uname_solaris.go: -------------------------------------------------------------------------------- 1 | package kernel 2 | 3 | import ( 4 | "golang.org/x/sys/unix" 5 | ) 6 | 7 | func uname() (*unix.Utsname, error) { 8 | uts := &unix.Utsname{} 9 | 10 | if err := unix.Uname(uts); err != nil { 11 | return nil, err 12 | } 13 | return uts, nil 14 | } 15 | -------------------------------------------------------------------------------- /vendor/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 uint64 `json:"limit"` 9 | } 10 | -------------------------------------------------------------------------------- /contrib/syscall-test/appletalk.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() { 5 | 6 | if (socket(AF_APPLETALK, SOCK_DGRAM, 0) != -1) { 7 | fprintf(stderr, "Opening Appletalk socket worked, should be blocked\n"); 8 | return 1; 9 | } 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /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.Error("expected output from btrfs lib version > 0") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /pkg/system/syscall_windows_test.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "testing" 4 | 5 | func TestHasWin32KSupport(t *testing.T) { 6 | s := HasWin32KSupport() // make sure this doesn't panic 7 | 8 | t.Logf("win32k: %v", s) // will be different on different platforms -- informative only 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/Nvveen/Gotty/README: -------------------------------------------------------------------------------- 1 | Gotty is a library written in Go that determines and reads termcap database 2 | files to produce an interface for interacting with the capabilities of a 3 | terminal. 4 | See the godoc documentation or the source code for more information about 5 | function usage. 6 | -------------------------------------------------------------------------------- /vendor/github.com/google/certificate-transparency/cpp/version.h: -------------------------------------------------------------------------------- 1 | #ifndef CERT_TRANS_VERSION_H_ 2 | #define CERT_TRANS_VERSION_H_ 3 | 4 | namespace cert_trans { 5 | 6 | 7 | extern const char kBuildVersion[]; 8 | 9 | 10 | } // namespace cert_trans 11 | 12 | #endif // CERT_TRANS_VERSION_H_ 13 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/NOTICE: -------------------------------------------------------------------------------- 1 | procfs provides functions to retrieve system, kernel and process 2 | metrics from the pseudo-filesystem proc. 3 | 4 | Copyright 2014-2015 The Prometheus Authors 5 | 6 | This product includes software developed at 7 | SoundCloud Ltd. (http://soundcloud.com/). 8 | -------------------------------------------------------------------------------- /cli/command/volume/testdata/volume-inspect-without-format.single-volume.golden: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Driver": "local", 4 | "Labels": null, 5 | "Mountpoint": "/data/volume", 6 | "Name": "volume", 7 | "Options": null, 8 | "Scope": "local" 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/version.go: -------------------------------------------------------------------------------- 1 | // Package aws provides core functionality for making requests to AWS services. 2 | package aws 3 | 4 | // SDKName is the name of this AWS SDK 5 | const SDKName = "aws-sdk-go" 6 | 7 | // SDKVersion is the version of this SDK 8 | const SDKVersion = "1.4.22" 9 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/pkg/README.md: -------------------------------------------------------------------------------- 1 | a collection of go utility packages 2 | 3 | [![Build Status](https://travis-ci.org/coreos/pkg.png?branch=master)](https://travis-ci.org/coreos/pkg) 4 | [![Godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/coreos/pkg) 5 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/configs/namespaces_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd 2 | 3 | package configs 4 | 5 | // Namespace defines configuration for each namespace. It specifies an 6 | // alternate path that is able to be joined via setns. 7 | type Namespace struct { 8 | } 9 | -------------------------------------------------------------------------------- /cmd/dockerd/daemon_freebsd.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | // preNotifySystem sends a message to the host when the API is active, but before the daemon is 4 | func preNotifySystem() { 5 | } 6 | 7 | // notifySystem sends a message to the host when the server is ready to be used 8 | func notifySystem() { 9 | } 10 | -------------------------------------------------------------------------------- /cmd/dockerd/service_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package main 4 | 5 | import ( 6 | "github.com/spf13/pflag" 7 | ) 8 | 9 | func initService(daemonCli *DaemonCli) (bool, bool, error) { 10 | return false, false, nil 11 | } 12 | 13 | func installServiceFlags(flags *pflag.FlagSet) { 14 | } 15 | -------------------------------------------------------------------------------- /daemon/info_windows.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "github.com/docker/docker/api/types" 5 | "github.com/docker/docker/pkg/sysinfo" 6 | ) 7 | 8 | // FillPlatformInfo fills the platform related info. 9 | func (daemon *Daemon) FillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo) { 10 | } 11 | -------------------------------------------------------------------------------- /pkg/plugins/plugins_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package plugins 4 | 5 | // BasePath returns the path to which all paths returned by the plugin are relative to. 6 | // For v1 plugins, this always returns the host's root directory. 7 | func (p *Plugin) BasePath() string { 8 | return "/" 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_ppc.go: -------------------------------------------------------------------------------- 1 | // +build ppc 2 | 3 | package bolt 4 | 5 | // maxMapSize represents the largest mmap size supported by Bolt. 6 | const maxMapSize = 0x7FFFFFFF // 2GB 7 | 8 | // maxAllocSize is the size used when creating array pointers. 9 | const maxAllocSize = 0xFFFFFFF 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | TEXT ·use(SB),NOSPLIT,$0 10 | RET 11 | -------------------------------------------------------------------------------- /volume/store/store_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd solaris 2 | 3 | package store 4 | 5 | // normaliseVolumeName is a platform specific function to normalise the name 6 | // of a volume. This is a no-op on Unix-like platforms 7 | func normaliseVolumeName(name string) string { 8 | return name 9 | } 10 | -------------------------------------------------------------------------------- /daemon/graphdriver/register/register_overlay.go: -------------------------------------------------------------------------------- 1 | // +build !exclude_graphdriver_overlay,linux 2 | 3 | package register 4 | 5 | import ( 6 | // register the overlay graphdriver 7 | _ "github.com/docker/docker/daemon/graphdriver/overlay" 8 | _ "github.com/docker/docker/daemon/graphdriver/overlay2" 9 | ) 10 | -------------------------------------------------------------------------------- /man/src/container/unpause.md: -------------------------------------------------------------------------------- 1 | The `docker container unpause` command un-suspends all processes in a container. 2 | On Linux, it does this using the cgroups freezer. 3 | 4 | See the [cgroups freezer documentation] 5 | (https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt) for 6 | further details. 7 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/netlink_linux.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | import "github.com/vishvananda/netlink/nl" 4 | 5 | // Family type definitions 6 | const ( 7 | FAMILY_ALL = nl.FAMILY_ALL 8 | FAMILY_V4 = nl.FAMILY_V4 9 | FAMILY_V6 = nl.FAMILY_V6 10 | FAMILY_MPLS = nl.FAMILY_MPLS 11 | ) 12 | -------------------------------------------------------------------------------- /client/secret_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // SecretRemove removes a Secret. 6 | func (cli *Client) SecretRemove(ctx context.Context, id string) error { 7 | resp, err := cli.delete(ctx, "/secrets/"+id, nil, nil) 8 | ensureReaderClosed(resp) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /contrib/syscall-test/raw.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | int main() { 8 | if (socket(PF_INET, SOCK_RAW, IPPROTO_UDP) == -1) { 9 | perror("socket"); 10 | return 1; 11 | } 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /daemon/update_freebsd.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "github.com/docker/docker/api/types/container" 5 | "github.com/docker/docker/libcontainerd" 6 | ) 7 | 8 | func toContainerdResources(resources container.Resources) libcontainerd.Resources { 9 | var r libcontainerd.Resources 10 | return r 11 | } 12 | -------------------------------------------------------------------------------- /daemon/update_solaris.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "github.com/docker/docker/api/types/container" 5 | "github.com/docker/docker/libcontainerd" 6 | ) 7 | 8 | func toContainerdResources(resources container.Resources) libcontainerd.Resources { 9 | var r libcontainerd.Resources 10 | return r 11 | } 12 | -------------------------------------------------------------------------------- /hack/make/cover: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env 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 | bundle_cover 2>&1 | tee "$DEST/report.log" 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pkg/system/umask.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Umask sets current process's file mode creation mask to newmask 10 | // and returns oldmask. 11 | func Umask(newmask int) (oldmask int, err error) { 12 | return syscall.Umask(newmask), nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_ppc64.go: -------------------------------------------------------------------------------- 1 | // +build ppc64 2 | 3 | package bolt 4 | 5 | // maxMapSize represents the largest mmap size supported by Bolt. 6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 7 | 8 | // maxAllocSize is the size used when creating array pointers. 9 | const maxAllocSize = 0x7FFFFFFF 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/sandbox_externalkey.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import "github.com/docker/docker/pkg/reexec" 4 | 5 | type setKeyData struct { 6 | ContainerID string 7 | Key string 8 | } 9 | 10 | func init() { 11 | reexec.Register("libnetwork-setkey", processSetKeyReexec) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/notary/trustmanager/yubikey/pkcs11_darwin.go: -------------------------------------------------------------------------------- 1 | // +build pkcs11,darwin 2 | 3 | package yubikey 4 | 5 | var possiblePkcs11Libs = []string{ 6 | "/usr/local/lib/libykcs11.dylib", 7 | "/usr/local/docker/lib/libykcs11.dylib", 8 | "/usr/local/docker-experimental/lib/libykcs11.dylib", 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/notary/trustmanager/yubikey/pkcs11_linux.go: -------------------------------------------------------------------------------- 1 | // +build pkcs11,linux 2 | 3 | package yubikey 4 | 5 | var possiblePkcs11Libs = []string{ 6 | "/usr/lib/libykcs11.so", 7 | "/usr/lib64/libykcs11.so", 8 | "/usr/lib/x86_64-linux-gnu/libykcs11.so", 9 | "/usr/local/lib/libykcs11.so", 10 | } 11 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /cli/command/swarm/testdata/unlockkeys-unlock-key.golden: -------------------------------------------------------------------------------- 1 | To unlock a swarm manager after it restarts, run the `docker swarm unlock` 2 | command and provide the following key: 3 | 4 | unlock-key 5 | 6 | Please remember to store this key in a password manager, since without it you 7 | will not be able to restart the manager. 8 | -------------------------------------------------------------------------------- /client/interface_stable.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | // APIClient is an interface that clients that talk with a docker server must implement. 4 | type APIClient interface { 5 | CommonAPIClient 6 | apiClientExperimental 7 | } 8 | 9 | // Ensure that Client always implements APIClient. 10 | var _ APIClient = &Client{} 11 | -------------------------------------------------------------------------------- /hack/make/binary-client: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | [ -z "$KEEPDEST" ] && \ 5 | rm -rf "$DEST" 6 | 7 | ( 8 | source "${MAKEDIR}/.binary-setup" 9 | export BINARY_SHORT_NAME="$DOCKER_CLIENT_BINARY_NAME" 10 | export GO_PACKAGE='github.com/docker/docker/cmd/docker' 11 | source "${MAKEDIR}/.binary" 12 | ) 13 | -------------------------------------------------------------------------------- /hack/make/yaml-docs-generator: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | [ -z "$KEEPDEST" ] && \ 5 | rm -rf "$DEST" 6 | 7 | ( 8 | source "${MAKEDIR}/.binary-setup" 9 | export BINARY_SHORT_NAME="yaml-docs-generator" 10 | export GO_PACKAGE='github.com/docker/docker/docs/yaml' 11 | source "${MAKEDIR}/.binary" 12 | ) 13 | -------------------------------------------------------------------------------- /pkg/symlink/fs_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package symlink 4 | 5 | import ( 6 | "path/filepath" 7 | ) 8 | 9 | func evalSymlinks(path string) (string, error) { 10 | return filepath.EvalSymlinks(path) 11 | } 12 | 13 | func isDriveOrRoot(p string) bool { 14 | return p == string(filepath.Separator) 15 | } 16 | -------------------------------------------------------------------------------- /man/src/volume/inspect.md: -------------------------------------------------------------------------------- 1 | Returns information about one or more volumes. By default, this command renders 2 | all results in a JSON array. You can specify an alternate format to execute a 3 | given template is executed for each result. Go's https://golang.org/pkg/text/template/ 4 | package describes all the details of the format. 5 | -------------------------------------------------------------------------------- /pkg/pidfile/pidfile_darwin.go: -------------------------------------------------------------------------------- 1 | // +build darwin 2 | 3 | package pidfile 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | func processExists(pid int) bool { 10 | // OS X does not have a proc filesystem. 11 | // Use kill -0 pid to judge if the process exists. 12 | err := syscall.Kill(pid, 0) 13 | return err == nil 14 | } 15 | -------------------------------------------------------------------------------- /pkg/reexec/command_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows,!freebsd,!solaris,!darwin 2 | 3 | package reexec 4 | 5 | import ( 6 | "os/exec" 7 | ) 8 | 9 | // Command is unsupported on operating systems apart from Linux, Windows, Solaris and Darwin. 10 | func Command(args ...string) *exec.Cmd { 11 | return nil 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/Microsoft/hcsshim/cgo.go: -------------------------------------------------------------------------------- 1 | package hcsshim 2 | 3 | import "C" 4 | 5 | // This import is needed to make the library compile as CGO because HCSSHIM 6 | // only works with CGO due to callbacks from HCS comming back from a C thread 7 | // which is not supported without CGO. See https://github.com/golang/go/issues/10973 8 | -------------------------------------------------------------------------------- /api/fixtures/keyfile: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | keyID: AWX2:I27X:WQFX:IOMK:CNAK:O7PW:VYNB:ZLKC:CVAE:YJP2:SI4A:XXAY 3 | 4 | MHcCAQEEILHTRWdcpKWsnORxSFyBnndJ4ROU41hMtr/GCiLVvwBQoAoGCCqGSM49 5 | AwEHoUQDQgAElpVFbQ2V2UQKajqdE3fVxJ+/pE/YuEFOxWbOxF2be19BY209/iky 6 | NzeFFK7SLpQ4CBJ7zDVXOHsMzrkY/GquGA== 7 | -----END EC PRIVATE KEY----- 8 | -------------------------------------------------------------------------------- /daemon/exec_freebsd.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "github.com/docker/docker/container" 5 | "github.com/docker/docker/daemon/exec" 6 | "github.com/docker/docker/libcontainerd" 7 | ) 8 | 9 | func execSetPlatformOpt(c *container.Container, ec *exec.Config, p *libcontainerd.Process) error { 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /daemon/exec_solaris.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "github.com/docker/docker/container" 5 | "github.com/docker/docker/daemon/exec" 6 | "github.com/docker/docker/libcontainerd" 7 | ) 8 | 9 | func execSetPlatformOpt(c *container.Container, ec *exec.Config, p *libcontainerd.Process) error { 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /layer/layer_store_windows.go: -------------------------------------------------------------------------------- 1 | package layer 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/docker/distribution" 7 | ) 8 | 9 | func (ls *layerStore) RegisterWithDescriptor(ts io.Reader, parent ChainID, descriptor distribution.Descriptor) (Layer, error) { 10 | return ls.registerWithDescriptor(ts, parent, descriptor) 11 | } 12 | -------------------------------------------------------------------------------- /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/mount/mounter_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd,!solaris freebsd,!cgo solaris,!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/pidfile/pidfile_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!darwin 2 | 3 | package pidfile 4 | 5 | import ( 6 | "os" 7 | "path/filepath" 8 | "strconv" 9 | ) 10 | 11 | func processExists(pid int) bool { 12 | if _, err := os.Stat(filepath.Join("/proc", strconv.Itoa(pid))); err == nil { 13 | return true 14 | } 15 | return false 16 | } 17 | -------------------------------------------------------------------------------- /pkg/plugins/plugins_windows.go: -------------------------------------------------------------------------------- 1 | package plugins 2 | 3 | // BasePath returns the path to which all paths returned by the plugin are relative to. 4 | // For Windows v1 plugins, this returns an empty string, since the plugin is already aware 5 | // of the absolute path of the mount. 6 | func (p *Plugin) BasePath() string { 7 | return "" 8 | } 9 | -------------------------------------------------------------------------------- /pkg/tlsconfig/tlsconfig_clone.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package tlsconfig 4 | 5 | import "crypto/tls" 6 | 7 | // Clone returns a clone of tls.Config. This function is provided for 8 | // compatibility for go1.7 that doesn't include this method in stdlib. 9 | func Clone(c *tls.Config) *tls.Config { 10 | return c.Clone() 11 | } 12 | -------------------------------------------------------------------------------- /cli/command/secret/testdata/secret-inspect-without-format.single-secret.golden: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "ID": "ID-foo", 4 | "Version": {}, 5 | "CreatedAt": "0001-01-01T00:00:00Z", 6 | "UpdatedAt": "0001-01-01T00:00:00Z", 7 | "Spec": { 8 | "Name": "foo", 9 | "Labels": null 10 | } 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/swarmkit/api/README.md: -------------------------------------------------------------------------------- 1 | ### Notice 2 | 3 | Do not change .pb.go files directly. You need to change the corresponding .proto files and run the following command to regenerate the .pb.go files. 4 | ``` 5 | $ make generate 6 | ``` 7 | 8 | Click [here](https://github.com/google/protobuf) for more information about protobuf. 9 | -------------------------------------------------------------------------------- /cli/command/swarm/testdata/update-autolock-unlock-key.golden: -------------------------------------------------------------------------------- 1 | Swarm updated. 2 | To unlock a swarm manager after it restarts, run the `docker swarm unlock` 3 | command and provide the following key: 4 | 5 | unlock-key 6 | 7 | Please remember to store this key in a password manager, since without it you 8 | will not be able to restart the manager. 9 | -------------------------------------------------------------------------------- /client/service_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // ServiceRemove kills and removes a service. 6 | func (cli *Client) ServiceRemove(ctx context.Context, serviceID string) error { 7 | resp, err := cli.delete(ctx, "/services/"+serviceID, nil, nil) 8 | ensureReaderClosed(resp) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /daemon/update_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package daemon 4 | 5 | import ( 6 | "github.com/docker/docker/api/types/container" 7 | "github.com/docker/docker/libcontainerd" 8 | ) 9 | 10 | func toContainerdResources(resources container.Resources) libcontainerd.Resources { 11 | var r libcontainerd.Resources 12 | return r 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/swarmkit/log/grpc.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | "google.golang.org/grpc/grpclog" 6 | ) 7 | 8 | func init() { 9 | ctx := WithModule(context.Background(), "grpc") 10 | 11 | // completely replace the grpc logger with the logrus logger. 12 | grpclog.SetLogger(G(ctx)) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/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/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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/go12.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 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 windows 6 | // +build !go1.3 7 | 8 | package svc 9 | 10 | // from go12.c 11 | func getServiceMain(r *uintptr) 12 | -------------------------------------------------------------------------------- /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 utilities of >= 3.16.1 7 | 8 | func btrfsBuildVersion() string { 9 | return "-" 10 | } 11 | 12 | func btrfsLibVersion() int { 13 | return -1 14 | } 15 | -------------------------------------------------------------------------------- /hack/make/binary: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | rm -rf "$DEST" 4 | 5 | # This script exists as backwards compatibility for CI 6 | ( 7 | DEST="${DEST}-client" 8 | ABS_DEST="${ABS_DEST}-client" 9 | . hack/make/binary-client 10 | ) 11 | ( 12 | DEST="${DEST}-daemon" 13 | ABS_DEST="${ABS_DEST}-daemon" 14 | . hack/make/binary-daemon 15 | ) 16 | -------------------------------------------------------------------------------- /integration-cli/fixtures/deploy/default.yaml: -------------------------------------------------------------------------------- 1 | 2 | version: "3" 3 | services: 4 | web: 5 | image: busybox@sha256:e4f93f6ed15a0cdd342f5aae387886fba0ab98af0a102da6276eaf24d6e6ade0 6 | command: top 7 | db: 8 | image: busybox@sha256:e4f93f6ed15a0cdd342f5aae387886fba0ab98af0a102da6276eaf24d6e6ade0 9 | command: "tail -f /dev/null" 10 | -------------------------------------------------------------------------------- /pkg/mount/mountinfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!linux,!freebsd,!solaris freebsd,!cgo solaris,!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/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/github.com/xeipuuv/gojsonreference/README.md: -------------------------------------------------------------------------------- 1 | # gojsonreference 2 | An implementation of JSON Reference - Go language 3 | 4 | ## Dependencies 5 | https://github.com/xeipuuv/gojsonpointer 6 | 7 | ## References 8 | http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 9 | 10 | http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/registry/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 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 | package registry 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall.go 8 | -------------------------------------------------------------------------------- /profiles/seccomp/seccomp_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build linux,!seccomp 2 | 3 | package seccomp 4 | 5 | import ( 6 | "github.com/docker/docker/api/types" 7 | "github.com/opencontainers/runtime-spec/specs-go" 8 | ) 9 | 10 | // DefaultProfile returns a nil pointer on unsupported systems. 11 | func DefaultProfile() *types.Seccomp { 12 | return nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-events/errors.go: -------------------------------------------------------------------------------- 1 | package events 2 | 3 | import "fmt" 4 | 5 | var ( 6 | // ErrSinkClosed is returned if a write is issued to a sink that has been 7 | // closed. If encountered, the error should be considered terminal and 8 | // retries will not be successful. 9 | ErrSinkClosed = fmt.Errorf("events: sink closed") 10 | ) 11 | -------------------------------------------------------------------------------- /container/state_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd 2 | 3 | package container 4 | 5 | // setFromExitStatus is a platform specific helper function to set the state 6 | // based on the ExitStatus structure. 7 | func (s *State) setFromExitStatus(exitStatus *ExitStatus) { 8 | s.ExitCodeValue = exitStatus.ExitCode 9 | s.OOMKilled = exitStatus.OOMKilled 10 | } 11 | -------------------------------------------------------------------------------- /hack/make/binary-daemon: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | [ -z "$KEEPDEST" ] && \ 5 | rm -rf "$DEST" 6 | 7 | ( 8 | source "${MAKEDIR}/.binary-setup" 9 | export BINARY_SHORT_NAME="$DOCKER_DAEMON_BINARY_NAME" 10 | export GO_PACKAGE='github.com/docker/docker/cmd/dockerd' 11 | source "${MAKEDIR}/.binary" 12 | copy_binaries "$DEST" 'hash' 13 | ) 14 | -------------------------------------------------------------------------------- /hack/make/dynbinary: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # This script exists as backwards compatibility for CI 5 | ( 6 | DEST="${DEST}-client" 7 | ABS_DEST="${ABS_DEST}-client" 8 | . hack/make/dynbinary-client 9 | ) 10 | ( 11 | 12 | DEST="${DEST}-daemon" 13 | ABS_DEST="${ABS_DEST}-daemon" 14 | . hack/make/dynbinary-daemon 15 | ) 16 | -------------------------------------------------------------------------------- /man/generate.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Generate man pages for docker/docker 4 | # 5 | 6 | set -eu 7 | 8 | mkdir -p ./man/man1 9 | 10 | # Generate man pages from cobra commands 11 | go build -o /tmp/gen-manpages ./man 12 | /tmp/gen-manpages --root . --target ./man/man1 13 | 14 | # Generate legacy pages from markdown 15 | ./man/md2man-all.sh -q 16 | -------------------------------------------------------------------------------- /pkg/httputils/mimetype_test.go: -------------------------------------------------------------------------------- 1 | package httputils 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestDetectContentType(t *testing.T) { 8 | input := []byte("That is just a plain text") 9 | 10 | if contentType, _, err := DetectContentType(input); err != nil || contentType != "text/plain" { 11 | t.Error("TestDetectContentType failed") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-metrics/handler.go: -------------------------------------------------------------------------------- 1 | package metrics 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/prometheus/client_golang/prometheus" 7 | ) 8 | 9 | // Handler returns the global http.Handler that provides the prometheus 10 | // metrics format on GET requests 11 | func Handler() http.Handler { 12 | return prometheus.Handler() 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/swarmkit/manager/state/store/combinators.go: -------------------------------------------------------------------------------- 1 | package store 2 | 3 | type orCombinator struct { 4 | bys []By 5 | } 6 | 7 | func (b orCombinator) isBy() { 8 | } 9 | 10 | // Or returns a combinator that applies OR logic on all the supplied By 11 | // arguments. 12 | func Or(bys ...By) By { 13 | return orCombinator{bys: bys} 14 | } 15 | -------------------------------------------------------------------------------- /client/network_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // NetworkRemove removes an existent network from the docker host. 6 | func (cli *Client) NetworkRemove(ctx context.Context, networkID string) error { 7 | resp, err := cli.delete(ctx, "/networks/"+networkID, nil, nil) 8 | ensureReaderClosed(resp) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /hack/make/build-integration-test-binary: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | rm -rf "$DEST" 5 | DEST="$ABS_DEST/../test-integration-cli" 6 | 7 | if [ -z $DOCKER_INTEGRATION_TESTS_VERIFIED ]; then 8 | source ${MAKEDIR}/.integration-test-helpers 9 | ensure_test_dir integration-cli "$DEST/test.main" 10 | export DOCKER_INTEGRATION_TESTS_VERIFIED=1 11 | fi 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pkg/system/stat_openbsd.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "syscall" 4 | 5 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 6 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 7 | return &StatT{size: s.Size, 8 | mode: uint32(s.Mode), 9 | uid: s.Uid, 10 | gid: s.Gid, 11 | rdev: uint64(s.Rdev), 12 | mtim: s.Mtim}, nil 13 | } 14 | -------------------------------------------------------------------------------- /pkg/system/stat_solaris.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "syscall" 4 | 5 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 6 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 7 | return &StatT{size: s.Size, 8 | mode: uint32(s.Mode), 9 | uid: s.Uid, 10 | gid: s.Gid, 11 | rdev: uint64(s.Rdev), 12 | mtim: s.Mtim}, nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-metrics/unit.go: -------------------------------------------------------------------------------- 1 | package metrics 2 | 3 | // Unit represents the type or precision of a metric that is appended to 4 | // the metrics fully qualified name 5 | type Unit string 6 | 7 | const ( 8 | Nanoseconds Unit = "nanoseconds" 9 | Seconds Unit = "seconds" 10 | Bytes Unit = "bytes" 11 | Total Unit = "total" 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/github.com/pborman/uuid/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. 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 | // The uuid package generates and inspects UUIDs. 6 | // 7 | // UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security Services. 8 | package uuid 9 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /libcontainerd/container.go: -------------------------------------------------------------------------------- 1 | package libcontainerd 2 | 3 | const ( 4 | // InitFriendlyName is the name given in the lookup map of processes 5 | // for the first process started in a container. 6 | InitFriendlyName = "init" 7 | configFilename = "config.json" 8 | ) 9 | 10 | type containerCommon struct { 11 | process 12 | processes map[string]*process 13 | } 14 | -------------------------------------------------------------------------------- /pkg/homedir/homedir_others.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package homedir 4 | 5 | import ( 6 | "errors" 7 | ) 8 | 9 | // GetStatic is not needed for non-linux systems. 10 | // (Precisely, it is needed only for glibc-based linux systems.) 11 | func GetStatic() (string, error) { 12 | return "", errors.New("homedir.GetStatic() is not supported on this system") 13 | } 14 | -------------------------------------------------------------------------------- /pkg/system/chtimes_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "time" 7 | ) 8 | 9 | //setCTime will set the create time on a file. On Unix, the create 10 | //time is updated as a side effect of setting the modified time, so 11 | //no action is required. 12 | func setCTime(path string, ctime time.Time) error { 13 | return nil 14 | } 15 | -------------------------------------------------------------------------------- /pkg/system/lstat_windows.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "os" 4 | 5 | // Lstat calls os.Lstat to get a fileinfo interface back. 6 | // This is then copied into our own locally defined structure. 7 | func Lstat(path string) (*StatT, error) { 8 | fi, err := os.Lstat(path) 9 | if err != nil { 10 | return nil, err 11 | } 12 | 13 | return fromStatT(&fi) 14 | } 15 | -------------------------------------------------------------------------------- /pkg/system/stat_darwin.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "syscall" 4 | 5 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 6 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 7 | return &StatT{size: s.Size, 8 | mode: uint32(s.Mode), 9 | uid: s.Uid, 10 | gid: s.Gid, 11 | rdev: uint64(s.Rdev), 12 | mtim: s.Mtimespec}, nil 13 | } 14 | -------------------------------------------------------------------------------- /pkg/system/stat_freebsd.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "syscall" 4 | 5 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 6 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 7 | return &StatT{size: s.Size, 8 | mode: uint32(s.Mode), 9 | uid: s.Uid, 10 | gid: s.Gid, 11 | rdev: uint64(s.Rdev), 12 | mtim: s.Mtimespec}, nil 13 | } 14 | -------------------------------------------------------------------------------- /plugin/v2/plugin_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package v2 4 | 5 | import ( 6 | "errors" 7 | 8 | specs "github.com/opencontainers/runtime-spec/specs-go" 9 | ) 10 | 11 | // InitSpec creates an OCI spec from the plugin's config. 12 | func (p *Plugin) InitSpec(execRoot string) (*specs.Spec, error) { 13 | return nil, errors.New("not supported") 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_386.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | // maxMapSize represents the largest mmap size supported by Bolt. 4 | const maxMapSize = 0x7FFFFFFF // 2GB 5 | 6 | // maxAllocSize is the size used when creating array pointers. 7 | const maxAllocSize = 0xFFFFFFF 8 | 9 | // Are unaligned load/stores broken on this arch? 10 | var brokenUnaligned = false 11 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /api/types/time/duration_convert.go: -------------------------------------------------------------------------------- 1 | package time 2 | 3 | import ( 4 | "strconv" 5 | "time" 6 | ) 7 | 8 | // DurationToSecondsString converts the specified duration to the number 9 | // seconds it represents, formatted as a string. 10 | func DurationToSecondsString(duration time.Duration) string { 11 | return strconv.FormatFloat(duration.Seconds(), 'f', 0, 64) 12 | } 13 | -------------------------------------------------------------------------------- /client/plugin_set.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | ) 6 | 7 | // PluginSet modifies settings for an existing plugin 8 | func (cli *Client) PluginSet(ctx context.Context, name string, args []string) error { 9 | resp, err := cli.post(ctx, "/plugins/"+name+"/set", nil, args, nil) 10 | ensureReaderClosed(resp) 11 | return err 12 | } 13 | -------------------------------------------------------------------------------- /container/container_notlinux.go: -------------------------------------------------------------------------------- 1 | // +build solaris freebsd 2 | 3 | package container 4 | 5 | import ( 6 | "golang.org/x/sys/unix" 7 | ) 8 | 9 | func detachMounted(path string) error { 10 | //Solaris and FreeBSD do not support the lazy unmount or MNT_DETACH feature. 11 | // Therefore there are separate definitions for this. 12 | return unix.Unmount(path, 0) 13 | } 14 | -------------------------------------------------------------------------------- /distribution/pull_v2_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package distribution 4 | 5 | import ( 6 | "github.com/docker/distribution" 7 | "github.com/docker/distribution/context" 8 | ) 9 | 10 | func (ld *v2LayerDescriptor) open(ctx context.Context) (distribution.ReadSeekCloser, error) { 11 | blobs := ld.repo.Blobs(ctx) 12 | return blobs.Open(ctx, ld.digest) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/pivotal-golang/clock/ticker.go: -------------------------------------------------------------------------------- 1 | package clock 2 | 3 | import "time" 4 | 5 | type Ticker interface { 6 | C() <-chan time.Time 7 | Stop() 8 | } 9 | 10 | type realTicker struct { 11 | t *time.Ticker 12 | } 13 | 14 | func (t *realTicker) C() <-chan time.Time { 15 | return t.t.C 16 | } 17 | 18 | func (t *realTicker) Stop() { 19 | t.t.Stop() 20 | } 21 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pkg/system/mknod_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | // Mknod is not implemented on Windows. 6 | func Mknod(path string, mode uint32, dev int) error { 7 | return ErrNotSupportedPlatform 8 | } 9 | 10 | // Mkdev is not implemented on Windows. 11 | func Mkdev(major int64, minor int64) uint32 { 12 | panic("Mkdev not implemented on Windows.") 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/Azure/go-ansiterm/winterm/utilities.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package winterm 4 | 5 | // AddInRange increments a value by the passed quantity while ensuring the values 6 | // always remain within the supplied min / max range. 7 | func addInRange(n int16, increment int16, min int16, max int16) int16 { 8 | return ensureInRange(n+increment, min, max) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_amd64.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | // maxMapSize represents the largest mmap size supported by Bolt. 4 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 5 | 6 | // maxAllocSize is the size used when creating array pointers. 7 | const maxAllocSize = 0x7FFFFFFF 8 | 9 | // Are unaligned load/stores broken on this arch? 10 | var brokenUnaligned = false 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/network_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package libnetwork 4 | 5 | import "github.com/docker/libnetwork/ipamapi" 6 | 7 | // Stub implementations for DNS related functions 8 | 9 | func (n *network) startResolver() { 10 | } 11 | 12 | func defaultIpamForNetworkType(networkType string) string { 13 | return ipamapi.DefaultIPAM 14 | } 15 | -------------------------------------------------------------------------------- /vendor/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/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 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 dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /cli/command/image/build/context_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package build 4 | 5 | import ( 6 | "path/filepath" 7 | 8 | "github.com/docker/docker/pkg/longpath" 9 | ) 10 | 11 | func getContextRoot(srcPath string) (string, error) { 12 | cr, err := filepath.Abs(srcPath) 13 | if err != nil { 14 | return "", err 15 | } 16 | return longpath.AddPrefix(cr), nil 17 | } 18 | -------------------------------------------------------------------------------- /client/swarm_join.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "github.com/docker/docker/api/types/swarm" 5 | "golang.org/x/net/context" 6 | ) 7 | 8 | // SwarmJoin joins the swarm. 9 | func (cli *Client) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error { 10 | resp, err := cli.post(ctx, "/swarm/join", nil, req, nil) 11 | ensureReaderClosed(resp) 12 | return err 13 | } 14 | -------------------------------------------------------------------------------- /cmd/docker/daemon_none_test.go: -------------------------------------------------------------------------------- 1 | // +build !daemon 2 | 3 | package main 4 | 5 | import ( 6 | "testing" 7 | 8 | "github.com/docker/docker/pkg/testutil/assert" 9 | ) 10 | 11 | func TestDaemonCommand(t *testing.T) { 12 | cmd := newDaemonCommand() 13 | cmd.SetArgs([]string{"--version"}) 14 | err := cmd.Execute() 15 | 16 | assert.Error(t, err, "Please run `dockerd`") 17 | } 18 | -------------------------------------------------------------------------------- /container/mounts_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package container 4 | 5 | // Mount contains information for a mount operation. 6 | type Mount struct { 7 | Source string `json:"source"` 8 | Destination string `json:"destination"` 9 | Writable bool `json:"writable"` 10 | Data string `json:"data"` 11 | Propagation string `json:"mountpropagation"` 12 | } 13 | -------------------------------------------------------------------------------- /contrib/selinux/docker-engine-selinux/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS?=docker 2 | MODULES?=${TARGETS:=.pp.bz2} 3 | SHAREDIR?=/usr/share 4 | 5 | all: ${TARGETS:=.pp.bz2} 6 | 7 | %.pp.bz2: %.pp 8 | @echo Compressing $^ -\> $@ 9 | bzip2 -9 $^ 10 | 11 | %.pp: %.te 12 | make -f ${SHAREDIR}/selinux/devel/Makefile $@ 13 | 14 | clean: 15 | rm -f *~ *.tc *.pp *.pp.bz2 16 | rm -rf tmp *.tar.gz 17 | -------------------------------------------------------------------------------- /daemon/graphdriver/aufs/mount_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package aufs 4 | 5 | import "errors" 6 | 7 | // MsRemount declared to specify a non-linux system mount. 8 | const MsRemount = 0 9 | 10 | func mount(source string, target string, fstype string, flags uintptr, data string) (err error) { 11 | return errors.New("mount is not implemented on this platform") 12 | } 13 | -------------------------------------------------------------------------------- /hack/integration-cli-on-swarm/agent/Dockerfile: -------------------------------------------------------------------------------- 1 | # this Dockerfile is solely used for the master image. 2 | # Please refer to the top-level Makefile for the worker image. 3 | FROM golang:1.7 4 | ADD . /go/src/github.com/docker/docker/hack/integration-cli-on-swarm/agent 5 | RUN go build -o /master github.com/docker/docker/hack/integration-cli-on-swarm/agent/master 6 | ENTRYPOINT ["/master"] 7 | -------------------------------------------------------------------------------- /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/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go: -------------------------------------------------------------------------------- 1 | package metadata 2 | 3 | // ClientInfo wraps immutable data from the client.Client structure. 4 | type ClientInfo struct { 5 | ServiceName string 6 | APIVersion string 7 | Endpoint string 8 | SigningName string 9 | SigningRegion string 10 | JSONVersion string 11 | TargetPrefix string 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go: -------------------------------------------------------------------------------- 1 | package sts 2 | 3 | import "github.com/aws/aws-sdk-go/aws/request" 4 | 5 | func init() { 6 | initRequest = func(r *request.Request) { 7 | switch r.Operation.Name { 8 | case opAssumeRoleWithSAML, opAssumeRoleWithWebIdentity: 9 | r.Handlers.Sign.Clear() // these operations are unsigned 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /cli/command/swarm/testdata/unlockkeys-unlock-key-rotate.golden: -------------------------------------------------------------------------------- 1 | Successfully rotated manager unlock key. 2 | 3 | To unlock a swarm manager after it restarts, run the `docker swarm unlock` 4 | command and provide the following key: 5 | 6 | unlock-key 7 | 8 | Please remember to store this key in a password manager, since without it you 9 | will not be able to restart the manager. 10 | -------------------------------------------------------------------------------- /cli/flags/client.go: -------------------------------------------------------------------------------- 1 | package flags 2 | 3 | // ClientOptions are the options used to configure the client cli 4 | type ClientOptions struct { 5 | Common *CommonOptions 6 | ConfigDir string 7 | Version bool 8 | } 9 | 10 | // NewClientOptions returns a new ClientOptions 11 | func NewClientOptions() *ClientOptions { 12 | return &ClientOptions{Common: NewCommonOptions()} 13 | } 14 | -------------------------------------------------------------------------------- /daemon/selinux_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package daemon 4 | 5 | import "github.com/opencontainers/runc/libcontainer/selinux" 6 | 7 | func selinuxSetDisabled() { 8 | selinux.SetDisabled() 9 | } 10 | 11 | func selinuxFreeLxcContexts(label string) { 12 | selinux.FreeLxcContexts(label) 13 | } 14 | 15 | func selinuxEnabled() bool { 16 | return selinux.SelinuxEnabled() 17 | } 18 | -------------------------------------------------------------------------------- /man/glide.yaml: -------------------------------------------------------------------------------- 1 | package: github.com/docker/docker/man 2 | import: 3 | - package: github.com/cpuguy83/go-md2man 4 | subpackages: 5 | - md2man 6 | - package: github.com/inconshreveable/mousetrap 7 | - package: github.com/spf13/pflag 8 | - package: github.com/spf13/viper 9 | - package: github.com/spf13/cobra 10 | repo: https://github.com/dnephin/cobra 11 | subpackages: 12 | - doc 13 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris,!appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "os" 7 | 8 | "golang.org/x/sys/unix" 9 | ) 10 | 11 | // IsTerminal returns true if the given file descriptor is a terminal. 12 | func IsTerminal() bool { 13 | _, err := unix.IoctlGetTermios(int(os.Stdout.Fd()), unix.TCGETA) 14 | return err == nil 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/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 | -------------------------------------------------------------------------------- /vendor/github.com/samuel/go-zookeeper/README.md: -------------------------------------------------------------------------------- 1 | Native Go Zookeeper Client Library 2 | =================================== 3 | 4 | [![Build Status](https://travis-ci.org/samuel/go-zookeeper.png)](https://travis-ci.org/samuel/go-zookeeper) 5 | 6 | Documentation: http://godoc.org/github.com/samuel/go-zookeeper/zk 7 | 8 | License 9 | ------- 10 | 11 | 3-clause BSD. See LICENSE file. 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 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 | package windows 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 8 | -------------------------------------------------------------------------------- /client/container_unpause.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // ContainerUnpause resumes the process execution within a container 6 | func (cli *Client) ContainerUnpause(ctx context.Context, containerID string) error { 7 | resp, err := cli.post(ctx, "/containers/"+containerID+"/unpause", nil, nil, nil) 8 | ensureReaderClosed(resp) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /hack/validate/changelog-date-descending: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | changelogFile=${1:-CHANGELOG.md} 4 | 5 | if [ ! -r "$changelogFile" ]; then 6 | echo "Unable to read file $changelogFile" >&2 7 | exit 1 8 | fi 9 | 10 | grep -e '^## ' "$changelogFile" | awk '{print$3}' | sort -c -r || exit 2 11 | 12 | echo "Congratulations! Changelog $changelogFile dates are in descending order." 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_no_getwd.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 dragonfly freebsd netbsd openbsd 6 | 7 | package unix 8 | 9 | const ImplementsGetwd = false 10 | 11 | func Getwd() (string, error) { return "", ENOTSUP } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 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 amd64,solaris 6 | 7 | package unix 8 | 9 | // TODO(aram): remove these before Go 1.3. 10 | const ( 11 | SYS_EXECVE = 59 12 | SYS_FCNTL = 62 13 | ) 14 | -------------------------------------------------------------------------------- /contrib/selinux-oraclelinux-7/docker-engine-selinux/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS?=docker 2 | MODULES?=${TARGETS:=.pp.bz2} 3 | SHAREDIR?=/usr/share 4 | 5 | all: ${TARGETS:=.pp.bz2} 6 | 7 | %.pp.bz2: %.pp 8 | @echo Compressing $^ -\> $@ 9 | bzip2 -9 $^ 10 | 11 | %.pp: %.te 12 | make -f ${SHAREDIR}/selinux/devel/Makefile $@ 13 | 14 | clean: 15 | rm -f *~ *.tc *.pp *.pp.bz2 16 | rm -rf tmp *.tar.gz 17 | -------------------------------------------------------------------------------- /contrib/syscall-test/acct.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | int main(int argc, char **argv) 9 | { 10 | int err = acct("/tmp/t"); 11 | if (err == -1) { 12 | fprintf(stderr, "acct failed: %s\n", strerror(errno)); 13 | exit(EXIT_FAILURE); 14 | } 15 | exit(EXIT_SUCCESS); 16 | } 17 | -------------------------------------------------------------------------------- /integration-cli/environment/protect.go: -------------------------------------------------------------------------------- 1 | package environment 2 | 3 | // ProtectImage adds the specified image(s) to be protected in case of clean 4 | func (e *Execution) ProtectImage(t testingT, images ...string) { 5 | for _, image := range images { 6 | e.protectedElements.images[image] = struct{}{} 7 | } 8 | } 9 | 10 | type protectedElements struct { 11 | images map[string]struct{} 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/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 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/link_tuntap_linux.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | // ideally golang.org/x/sys/unix would define IfReq but it only has 4 | // IFNAMSIZ, hence this minimalistic implementation 5 | const ( 6 | SizeOfIfReq = 40 7 | IFNAMSIZ = 16 8 | ) 9 | 10 | type ifReq struct { 11 | Name [IFNAMSIZ]byte 12 | Flags uint16 13 | pad [SizeOfIfReq - IFNAMSIZ - 2]byte 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/xeipuuv/gojsonpointer/README.md: -------------------------------------------------------------------------------- 1 | # gojsonpointer 2 | An implementation of JSON Pointer - Go language 3 | 4 | ## References 5 | http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 6 | 7 | ### Note 8 | The 4.Evaluation part of the previous reference, starting with 'If the currently referenced value is a JSON array, the reference token MUST contain either...' is not implemented. 9 | -------------------------------------------------------------------------------- /api/types/error_response.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // ErrorResponse Represents an error. 7 | // swagger:model ErrorResponse 8 | type ErrorResponse struct { 9 | 10 | // The error message. 11 | // Required: true 12 | Message string `json:"message"` 13 | } 14 | -------------------------------------------------------------------------------- /client/container_pause.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // ContainerPause pauses the main process of a given container without terminating it. 6 | func (cli *Client) ContainerPause(ctx context.Context, containerID string) error { 7 | resp, err := cli.post(ctx, "/containers/"+containerID+"/pause", nil, nil, nil) 8 | ensureReaderClosed(resp) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 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 go1.4 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Unsetenv(key string) error { 12 | // This was added in Go 1.4. 13 | return syscall.Unsetenv(key) 14 | } 15 | -------------------------------------------------------------------------------- /client/swarm_unlock.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "github.com/docker/docker/api/types/swarm" 5 | "golang.org/x/net/context" 6 | ) 7 | 8 | // SwarmUnlock unlocks locked swarm. 9 | func (cli *Client) SwarmUnlock(ctx context.Context, req swarm.UnlockRequest) error { 10 | serverResp, err := cli.post(ctx, "/swarm/unlock", nil, req, nil) 11 | ensureReaderClosed(serverResp) 12 | return err 13 | } 14 | -------------------------------------------------------------------------------- /contrib/gitdm/gitdm.config: -------------------------------------------------------------------------------- 1 | # 2 | # EmailAliases lets us cope with developers who use more 3 | # than one address. 4 | # 5 | EmailAliases aliases 6 | 7 | # 8 | # EmailMap does the main work of mapping addresses onto 9 | # employers. 10 | # 11 | EmailMap domain-map 12 | 13 | # 14 | # Use GroupMap to map a file full of addresses to the 15 | # same employer 16 | # 17 | # GroupMap company-Docker Docker 18 | -------------------------------------------------------------------------------- /daemon/stats_windows.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "github.com/docker/docker/api/types" 5 | "github.com/docker/docker/container" 6 | ) 7 | 8 | // Windows network stats are obtained directly through HCS, hence this is a no-op. 9 | func (daemon *Daemon) getNetworkStats(c *container.Container) (map[string]types.NetworkStats, error) { 10 | return make(map[string]types.NetworkStats), nil 11 | } 12 | -------------------------------------------------------------------------------- /vendor/cloud.google.com/go/logging/apiv2/README.md: -------------------------------------------------------------------------------- 1 | Auto-generated logging v2 clients 2 | ================================= 3 | 4 | This package includes auto-generated clients for the logging v2 API. 5 | 6 | Use the handwritten logging client (in the parent directory, 7 | cloud.google.com/go/logging) in preference to this. 8 | 9 | This code is EXPERIMENTAL and subject to CHANGE AT ANY TIME. 10 | 11 | 12 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_arm64.go: -------------------------------------------------------------------------------- 1 | // +build arm64 2 | 3 | package bolt 4 | 5 | // maxMapSize represents the largest mmap size supported by Bolt. 6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 7 | 8 | // maxAllocSize is the size used when creating array pointers. 9 | const maxAllocSize = 0x7FFFFFFF 10 | 11 | // Are unaligned load/stores broken on this arch? 12 | var brokenUnaligned = false 13 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_ppc64le.go: -------------------------------------------------------------------------------- 1 | // +build ppc64le 2 | 3 | package bolt 4 | 5 | // maxMapSize represents the largest mmap size supported by Bolt. 6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 7 | 8 | // maxAllocSize is the size used when creating array pointers. 9 | const maxAllocSize = 0x7FFFFFFF 10 | 11 | // Are unaligned load/stores broken on this arch? 12 | var brokenUnaligned = false 13 | -------------------------------------------------------------------------------- /vendor/github.com/boltdb/bolt/bolt_s390x.go: -------------------------------------------------------------------------------- 1 | // +build s390x 2 | 3 | package bolt 4 | 5 | // maxMapSize represents the largest mmap size supported by Bolt. 6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 7 | 8 | // maxAllocSize is the size used when creating array pointers. 9 | const maxAllocSize = 0x7FFFFFFF 10 | 11 | // Are unaligned load/stores broken on this arch? 12 | var brokenUnaligned = false 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/notary/trustmanager/yubikey/non_pkcs11.go: -------------------------------------------------------------------------------- 1 | // go list ./... and go test ./... will not pick up this package without this 2 | // file, because go ? ./... does not honor build tags. 3 | 4 | // e.g. "go list -tags pkcs11 ./..." will not list this package if all the 5 | // files in it have a build tag. 6 | 7 | // See https://github.com/golang/go/issues/11246 8 | 9 | package yubikey 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/swarmkit/manager/allocator/networkallocator/drivers_darwin.go: -------------------------------------------------------------------------------- 1 | package networkallocator 2 | 3 | import ( 4 | "github.com/docker/libnetwork/drivers/overlay/ovmanager" 5 | "github.com/docker/libnetwork/drivers/remote" 6 | ) 7 | 8 | func getInitializers() []initializer { 9 | return []initializer{ 10 | {remote.Init, "remote"}, 11 | {ovmanager.Init, "overlay"}, 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /daemon/graphdriver/driver_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows,!freebsd,!solaris 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 | // GetFSMagic returns the filesystem id given the path. 13 | func GetFSMagic(rootpath string) (FsMagic, error) { 14 | return FsMagicUnsupported, nil 15 | } 16 | -------------------------------------------------------------------------------- /man/src/image/rm.md: -------------------------------------------------------------------------------- 1 | Removes one or more images from the host node. This does not remove images from 2 | a registry. You cannot remove an image of a running container unless you use the 3 | **-f** option. To see all images on a host use the **docker image ls** command. 4 | 5 | # EXAMPLES 6 | 7 | ## Removing an image 8 | 9 | Here is an example of removing an image: 10 | 11 | docker image rm fedora/httpd 12 | -------------------------------------------------------------------------------- /vendor/github.com/Azure/go-ansiterm/utilities.go: -------------------------------------------------------------------------------- 1 | package ansiterm 2 | 3 | import ( 4 | "strconv" 5 | ) 6 | 7 | func sliceContains(bytes []byte, b byte) bool { 8 | for _, v := range bytes { 9 | if v == b { 10 | return true 11 | } 12 | } 13 | 14 | return false 15 | } 16 | 17 | func convertBytesToInteger(bytes []byte) int { 18 | s := string(bytes) 19 | i, _ := strconv.Atoi(s) 20 | return i 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-immutable-radix/edges.go: -------------------------------------------------------------------------------- 1 | package iradix 2 | 3 | import "sort" 4 | 5 | type edges []edge 6 | 7 | func (e edges) Len() int { 8 | return len(e) 9 | } 10 | 11 | func (e edges) Less(i, j int) bool { 12 | return e[i].label < e[j].label 13 | } 14 | 15 | func (e edges) Swap(i, j int) { 16 | e[i], e[j] = e[j], e[i] 17 | } 18 | 19 | func (e edges) Sort() { 20 | sort.Sort(e) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/errors.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // AnError is an error instance useful for testing. If the code does not care 8 | // about error specifics, and only needs to return the error for example, this 9 | // error should be used to make the test code more readable. 10 | var AnError = errors.New("assert.AnError general error for testing") 11 | -------------------------------------------------------------------------------- /api/common_windows.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | // MinVersion represents Minimum REST API version supported 4 | // Technically the first daemon API version released on Windows is v1.25 in 5 | // engine version 1.13. However, some clients are explicitly using downlevel 6 | // APIs (e.g. docker-compose v2.1 file format) and that is just too restrictive. 7 | // Hence also allowing 1.24 on Windows. 8 | const MinVersion string = "1.24" 9 | -------------------------------------------------------------------------------- /daemon/graphdriver/driver_windows.go: -------------------------------------------------------------------------------- 1 | package graphdriver 2 | 3 | var ( 4 | // Slice of drivers that should be used in order 5 | priority = []string{ 6 | "windowsfilter", 7 | } 8 | ) 9 | 10 | // GetFSMagic returns the filesystem id given the path. 11 | func GetFSMagic(rootpath string) (FsMagic, error) { 12 | // Note it is OK to return FsMagicUnsupported on Windows. 13 | return FsMagicUnsupported, nil 14 | } 15 | -------------------------------------------------------------------------------- /pkg/symlink/README.md: -------------------------------------------------------------------------------- 1 | Package symlink implements EvalSymlinksInScope which is an extension of filepath.EvalSymlinks, 2 | as well as a Windows long-path aware version of filepath.EvalSymlinks 3 | from the [Go standard library](https://golang.org/pkg/path/filepath). 4 | 5 | The code from filepath.EvalSymlinks has been adapted in fs.go. 6 | Please read the LICENSE.BSD file that governs fs.go and LICENSE.APACHE for fs_test.go. 7 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /vendor/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 | // +build !appengine 7 | 8 | package logrus 9 | 10 | import "syscall" 11 | 12 | const ioctlReadTermios = syscall.TCGETS 13 | 14 | type Termios syscall.Termios 15 | -------------------------------------------------------------------------------- /api/types/id_response.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // IDResponse Response to an API call that returns just an Id 7 | // swagger:model IdResponse 8 | type IDResponse struct { 9 | 10 | // The id of the newly created object. 11 | // Required: true 12 | ID string `json:"Id"` 13 | } 14 | -------------------------------------------------------------------------------- /api/types/service_update_response.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // ServiceUpdateResponse service update response 7 | // swagger:model ServiceUpdateResponse 8 | type ServiceUpdateResponse struct { 9 | 10 | // Optional warning messages 11 | Warnings []string `json:"Warnings"` 12 | } 13 | -------------------------------------------------------------------------------- /integration-cli/test_vars_unix_test.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 | // On Unix variants, the busybox image comes with the `top` command which 12 | // runs indefinitely while still being interruptible by a signal. 13 | defaultSleepImage = "busybox" 14 | ) 15 | -------------------------------------------------------------------------------- /client/swarm_leave.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // SwarmLeave leaves the swarm. 10 | func (cli *Client) SwarmLeave(ctx context.Context, force bool) error { 11 | query := url.Values{} 12 | if force { 13 | query.Set("force", "1") 14 | } 15 | resp, err := cli.post(ctx, "/swarm/leave", query, nil, nil) 16 | ensureReaderClosed(resp) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /daemon/list_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd solaris 2 | 3 | package daemon 4 | 5 | import "github.com/docker/docker/container" 6 | 7 | // excludeByIsolation is a platform specific helper function to support PS 8 | // filtering by Isolation. This is a Windows-only concept, so is a no-op on Unix. 9 | func excludeByIsolation(container *container.Container, ctx *listContext) iterationAction { 10 | return includeContainer 11 | } 12 | -------------------------------------------------------------------------------- /integration-cli/registry/requirement.go: -------------------------------------------------------------------------------- 1 | package registry 2 | 3 | import "os/exec" 4 | 5 | // Hosting returns wether the host can host a registry (v2) or not 6 | func Hosting() bool { 7 | // for now registry binary is built only if we're running inside 8 | // container through `make test`. Figure that out by testing if 9 | // registry binary is in PATH. 10 | _, err := exec.LookPath(v2binary) 11 | return err == nil 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/swarmkit/manager/storeapi/server.go: -------------------------------------------------------------------------------- 1 | package storeapi 2 | 3 | import ( 4 | "github.com/docker/swarmkit/manager/state/store" 5 | ) 6 | 7 | // Server is the store API gRPC server. 8 | type Server struct { 9 | store *store.MemoryStore 10 | } 11 | 12 | // NewServer creates a store API server. 13 | func NewServer(store *store.MemoryStore) *Server { 14 | return &Server{ 15 | store: store, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_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 darwin dragonfly freebsd netbsd openbsd 6 | 7 | package terminal 8 | 9 | import "syscall" 10 | 11 | const ioctlReadTermios = syscall.TIOCGETA 12 | const ioctlWriteTermios = syscall.TIOCSETA 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/env_unset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 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 windows 6 | // +build go1.4 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | func Unsetenv(key string) error { 13 | // This was added in Go 1.4. 14 | return syscall.Unsetenv(key) 15 | } 16 | -------------------------------------------------------------------------------- /api/swagger-gen.yaml: -------------------------------------------------------------------------------- 1 | 2 | layout: 3 | models: 4 | - name: definition 5 | source: asset:model 6 | target: "{{ joinFilePath .Target .ModelPackage }}" 7 | file_name: "{{ (snakize (pascalize .Name)) }}.go" 8 | operations: 9 | - name: handler 10 | source: asset:serverOperation 11 | target: "{{ joinFilePath .Target .APIPackage .Package }}" 12 | file_name: "{{ (snakize (pascalize .Name)) }}.go" 13 | -------------------------------------------------------------------------------- /hack/make/.binary-setup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DOCKER_CLIENT_BINARY_NAME='docker' 4 | DOCKER_DAEMON_BINARY_NAME='dockerd' 5 | DOCKER_RUNC_BINARY_NAME='docker-runc' 6 | DOCKER_CONTAINERD_BINARY_NAME='docker-containerd' 7 | DOCKER_CONTAINERD_CTR_BINARY_NAME='docker-containerd-ctr' 8 | DOCKER_CONTAINERD_SHIM_BINARY_NAME='docker-containerd-shim' 9 | DOCKER_PROXY_BINARY_NAME='docker-proxy' 10 | DOCKER_INIT_BINARY_NAME='docker-init' 11 | -------------------------------------------------------------------------------- /libcontainerd/utils_windows_test.go: -------------------------------------------------------------------------------- 1 | package libcontainerd 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestEnvironmentParsing(t *testing.T) { 8 | env := []string{"foo=bar", "car=hat", "a=b=c"} 9 | result := setupEnvironmentVariables(env) 10 | if len(result) != 3 || result["foo"] != "bar" || result["car"] != "hat" || result["a"] != "b=c" { 11 | t.Fatalf("Expected map[foo:bar car:hat a:b=c], got %v", result) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /oci/defaults_windows.go: -------------------------------------------------------------------------------- 1 | package oci 2 | 3 | import ( 4 | "runtime" 5 | 6 | "github.com/opencontainers/runtime-spec/specs-go" 7 | ) 8 | 9 | // DefaultSpec returns default spec used by docker. 10 | func DefaultSpec() specs.Spec { 11 | return specs.Spec{ 12 | Version: specs.Version, 13 | Platform: specs.Platform{ 14 | OS: runtime.GOOS, 15 | Arch: runtime.GOARCH, 16 | }, 17 | Windows: &specs.Windows{}, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/swarmkit/protobuf/plugin/helpers.go: -------------------------------------------------------------------------------- 1 | package plugin 2 | 3 | import ( 4 | "github.com/gogo/protobuf/proto" 5 | google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" 6 | ) 7 | 8 | // DeepcopyEnabled returns true if deepcopy is enabled for the descriptor. 9 | func DeepcopyEnabled(options *google_protobuf.MessageOptions) bool { 10 | return proto.GetBoolExtension(options, E_Deepcopy, true) 11 | } 12 | -------------------------------------------------------------------------------- /hack/validate/swagger: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | source "${SCRIPTDIR}/.validate" 5 | 6 | IFS=$'\n' 7 | files=( $(validate_diff --diff-filter=ACMR --name-only -- 'api/swagger.yaml' || true) ) 8 | unset IFS 9 | 10 | if [ ${#files[@]} -gt 0 ]; then 11 | yamllint -c ${SCRIPTDIR}/.swagger-yamllint api/swagger.yaml 12 | swagger validate api/swagger.yaml 13 | fi 14 | -------------------------------------------------------------------------------- /vendor/github.com/cloudflare/cfssl/ocsp/config/config.go: -------------------------------------------------------------------------------- 1 | // Package config in the ocsp directory provides configuration data for an OCSP 2 | // signer. 3 | package config 4 | 5 | import "time" 6 | 7 | // Config contains configuration information required to set up an OCSP signer. 8 | type Config struct { 9 | CACertFile string 10 | ResponderCertFile string 11 | KeyFile string 12 | Interval time.Duration 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/default_gateway_freebsd.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import "github.com/docker/libnetwork/types" 4 | 5 | const libnGWNetwork = "docker_gwbridge" 6 | 7 | func getPlatformOption() EndpointOption { 8 | return nil 9 | } 10 | 11 | func (c *controller) createGWNetwork() (Network, error) { 12 | return nil, types.NotImplementedErrorf("default gateway functionality is not implemented in freebsd") 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/notary/const_nowindows.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package notary 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | ) 9 | 10 | // NotarySupportedSignals contains the signals we would like to capture: 11 | // - SIGUSR1, indicates a increment of the log level. 12 | // - SIGUSR2, indicates a decrement of the log level. 13 | var NotarySupportedSignals = []os.Signal{ 14 | syscall.SIGUSR1, 15 | syscall.SIGUSR2, 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/swarmkit/manager/allocator/networkallocator/drivers_network.go: -------------------------------------------------------------------------------- 1 | // +build linux windows 2 | 3 | package networkallocator 4 | 5 | import ( 6 | "github.com/docker/libnetwork/drivers/overlay/ovmanager" 7 | "github.com/docker/libnetwork/drivers/remote" 8 | ) 9 | 10 | func getInitializers() []initializer { 11 | return []initializer{ 12 | {remote.Init, "remote"}, 13 | {ovmanager.Init, "overlay"}, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/go-check/check/README.md: -------------------------------------------------------------------------------- 1 | Go-check 2 | ======== 3 | 4 | This is a fork of https://github.com/go-check/check 5 | 6 | The intention of this fork is not to change any of the original behavior, but add 7 | some specific behaviors needed for some of my projects already using this test suite. 8 | For documentation on the main behavior of go-check see the aforementioned repo. 9 | 10 | The original branch is intact at `orig_v1` 11 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-shellwords/util_windows.go: -------------------------------------------------------------------------------- 1 | package shellwords 2 | 3 | import ( 4 | "errors" 5 | "os" 6 | "os/exec" 7 | "strings" 8 | ) 9 | 10 | func shellRun(line string) (string, error) { 11 | shell := os.Getenv("COMSPEC") 12 | b, err := exec.Command(shell, "/c", line).Output() 13 | if err != nil { 14 | return "", errors.New(err.Error() + ":" + string(b)) 15 | } 16 | return strings.TrimSpace(string(b)), nil 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/google/appengine_hook.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 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 appengine 6 | 7 | package google 8 | 9 | import "google.golang.org/appengine" 10 | 11 | func init() { 12 | appengineTokenFunc = appengine.AccessToken 13 | appengineAppIDFunc = appengine.AppID 14 | } 15 | -------------------------------------------------------------------------------- /oci/defaults_freebsd.go: -------------------------------------------------------------------------------- 1 | package oci 2 | 3 | import ( 4 | "runtime" 5 | 6 | "github.com/opencontainers/runtime-spec/specs-go" 7 | ) 8 | 9 | // DefaultSpec returns default oci spec used by docker. 10 | func DefaultSpec() specs.Spec { 11 | s := specs.Spec{ 12 | Version: "0.6.0", 13 | Platform: specs.Platform{ 14 | OS: "SunOS", 15 | Arch: runtime.GOARCH, 16 | }, 17 | } 18 | s.Solaris = &specs.Solaris{} 19 | return s 20 | } 21 | -------------------------------------------------------------------------------- /oci/defaults_solaris.go: -------------------------------------------------------------------------------- 1 | package oci 2 | 3 | import ( 4 | "runtime" 5 | 6 | "github.com/opencontainers/runtime-spec/specs-go" 7 | ) 8 | 9 | // DefaultSpec returns default oci spec used by docker. 10 | func DefaultSpec() specs.Spec { 11 | s := specs.Spec{ 12 | Version: "0.6.0", 13 | Platform: specs.Platform{ 14 | OS: "SunOS", 15 | Arch: runtime.GOARCH, 16 | }, 17 | } 18 | s.Solaris = &specs.Solaris{} 19 | return s 20 | } 21 | -------------------------------------------------------------------------------- /oci/namespaces.go: -------------------------------------------------------------------------------- 1 | package oci 2 | 3 | import specs "github.com/opencontainers/runtime-spec/specs-go" 4 | 5 | // RemoveNamespace removes the `nsType` namespace from OCI spec `s` 6 | func RemoveNamespace(s *specs.Spec, nsType specs.NamespaceType) { 7 | for i, n := range s.Linux.Namespaces { 8 | if n.Type == nsType { 9 | s.Linux.Namespaces = append(s.Linux.Namespaces[:i], s.Linux.Namespaces[i+1:]...) 10 | return 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /pkg/system/lstat_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import "syscall" 6 | 7 | // Lstat takes a path to a file and returns 8 | // a system.StatT type pertaining to that file. 9 | // 10 | // Throws an error if the file does not exist 11 | func Lstat(path string) (*StatT, error) { 12 | s := &syscall.Stat_t{} 13 | if err := syscall.Lstat(path, s); err != nil { 14 | return nil, err 15 | } 16 | return fromStatT(s) 17 | } 18 | -------------------------------------------------------------------------------- /pkg/system/xattrs_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package system 4 | 5 | // Lgetxattr is not supported on platforms other than linux. 6 | func Lgetxattr(path string, attr string) ([]byte, error) { 7 | return nil, ErrNotSupportedPlatform 8 | } 9 | 10 | // Lsetxattr is not supported on platforms other than linux. 11 | func Lsetxattr(path string, attr string, data []byte, flags int) error { 12 | return ErrNotSupportedPlatform 13 | } 14 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /api/server/router/checkpoint/backend.go: -------------------------------------------------------------------------------- 1 | package checkpoint 2 | 3 | import "github.com/docker/docker/api/types" 4 | 5 | // Backend for Checkpoint 6 | type Backend interface { 7 | CheckpointCreate(container string, config types.CheckpointCreateOptions) error 8 | CheckpointDelete(container string, config types.CheckpointDeleteOptions) error 9 | CheckpointList(container string, config types.CheckpointListOptions) ([]types.Checkpoint, error) 10 | } 11 | -------------------------------------------------------------------------------- /contrib/builder/rpm/amd64/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/amd64` in https://github.com/docker/docker](https://github.com/docker/docker/tree/master/contrib/builder/rpm/amd64), specifically the `generate.sh` script, whose usage is described in a comment at the top of the file. 6 | -------------------------------------------------------------------------------- /integration-cli/test_vars_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | // sleepCommandForDaemonPlatform is a helper function that determines what 4 | // the command is for a sleeping container based on the daemon platform. 5 | // The Windows busybox image does not have a `top` command. 6 | func sleepCommandForDaemonPlatform() []string { 7 | if testEnv.DaemonPlatform() == "windows" { 8 | return []string{"sleep", "240"} 9 | } 10 | return []string{"top"} 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/etcd/snap/snappb/snap.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | package snappb; 3 | 4 | import "gogoproto/gogo.proto"; 5 | 6 | option (gogoproto.marshaler_all) = true; 7 | option (gogoproto.sizer_all) = true; 8 | option (gogoproto.unmarshaler_all) = true; 9 | option (gogoproto.goproto_getters_all) = false; 10 | 11 | message snapshot { 12 | optional uint32 crc = 1 [(gogoproto.nullable) = false]; 13 | optional bytes data = 2; 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/service_windows.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import "net" 4 | 5 | func (n *network) addLBBackend(ip, vip net.IP, fwMark uint32, ingressPorts []*PortConfig) { 6 | } 7 | 8 | func (n *network) rmLBBackend(ip, vip net.IP, fwMark uint32, ingressPorts []*PortConfig, rmService bool) { 9 | } 10 | 11 | func (sb *sandbox) populateLoadbalancers(ep *endpoint) { 12 | } 13 | 14 | func arrangeIngressFilterRule() { 15 | } 16 | -------------------------------------------------------------------------------- /api/names.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | import "regexp" 4 | 5 | // RestrictedNameChars collects the characters allowed to represent a name, normally used to validate container and volume names. 6 | const RestrictedNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.-]` 7 | 8 | // RestrictedNamePattern is a regular expression to validate names against the collection of restricted characters. 9 | var RestrictedNamePattern = regexp.MustCompile(`^` + RestrictedNameChars + `+$`) 10 | -------------------------------------------------------------------------------- /contrib/builder/deb/amd64/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/amd64` in https://github.com/docker/docker](https://github.com/docker/docker/tree/master/contrib/builder/deb/amd64), specifically the `generate.sh` script, whose usage is described in a comment at the top of the file. 6 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/signer/v4/uri_path_1_4.go: -------------------------------------------------------------------------------- 1 | // +build !go1.5 2 | 3 | package v4 4 | 5 | import ( 6 | "net/url" 7 | "strings" 8 | ) 9 | 10 | func getURIPath(u *url.URL) string { 11 | var uri string 12 | 13 | if len(u.Opaque) > 0 { 14 | uri = "/" + strings.Join(strings.Split(u.Opaque, "/")[3:], "/") 15 | } else { 16 | uri = u.Path 17 | } 18 | 19 | if len(uri) == 0 { 20 | uri = "/" 21 | } 22 | 23 | return uri 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/drivers_freebsd.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import ( 4 | "github.com/docker/libnetwork/drivers/freebsd/bridge" 5 | "github.com/docker/libnetwork/drivers/null" 6 | "github.com/docker/libnetwork/drivers/remote" 7 | ) 8 | 9 | func getInitializers(experimental bool) []initializer { 10 | return []initializer{ 11 | {bridge.Init, "bridge"}, 12 | {null.Init, "null"}, 13 | {remote.Init, "remote"}, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/swarmkit/agent/helpers.go: -------------------------------------------------------------------------------- 1 | package agent 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // runctx blocks until the function exits, closed is closed, or the context is 6 | // cancelled. Call as part of go statement. 7 | func runctx(ctx context.Context, closed chan struct{}, errs chan error, fn func(ctx context.Context) error) { 8 | select { 9 | case errs <- fn(ctx): 10 | case <-closed: 11 | case <-ctx.Done(): 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /daemon/exec_windows.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "github.com/docker/docker/container" 5 | "github.com/docker/docker/daemon/exec" 6 | "github.com/docker/docker/libcontainerd" 7 | ) 8 | 9 | func execSetPlatformOpt(c *container.Container, ec *exec.Config, p *libcontainerd.Process) error { 10 | // Process arguments need to be escaped before sending to OCI. 11 | p.Args = escapeArgs(p.Args) 12 | p.User.Username = ec.User 13 | return nil 14 | } 15 | -------------------------------------------------------------------------------- /daemon/logger/logger_test.go: -------------------------------------------------------------------------------- 1 | package logger 2 | 3 | func (m *Message) copy() *Message { 4 | msg := &Message{ 5 | Source: m.Source, 6 | Partial: m.Partial, 7 | Timestamp: m.Timestamp, 8 | } 9 | 10 | if m.Attrs != nil { 11 | msg.Attrs = make(map[string]string, len(m.Attrs)) 12 | for k, v := range m.Attrs { 13 | msg.Attrs[k] = v 14 | } 15 | } 16 | 17 | msg.Line = append(make([]byte, 0, len(m.Line)), m.Line...) 18 | return msg 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/signer/v4/uri_path.go: -------------------------------------------------------------------------------- 1 | // +build go1.5 2 | 3 | package v4 4 | 5 | import ( 6 | "net/url" 7 | "strings" 8 | ) 9 | 10 | func getURIPath(u *url.URL) string { 11 | var uri string 12 | 13 | if len(u.Opaque) > 0 { 14 | uri = "/" + strings.Join(strings.Split(u.Opaque, "/")[3:], "/") 15 | } else { 16 | uri = u.EscapedPath() 17 | } 18 | 19 | if len(uri) == 0 { 20 | uri = "/" 21 | } 22 | 23 | return uri 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/osl/namespace_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows,!freebsd 2 | 3 | package osl 4 | 5 | // GC triggers garbage collection of namespace path right away 6 | // and waits for it. 7 | func GC() { 8 | } 9 | 10 | func GetSandboxForExternalKey(path string, key string) (Sandbox, error) { 11 | return nil, nil 12 | } 13 | 14 | // SetBasePath sets the base url prefix for the ns path 15 | func SetBasePath(path string) { 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/google/certificate-transparency/go/x509/root.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 | package x509 6 | 7 | import "sync" 8 | 9 | var ( 10 | once sync.Once 11 | systemRoots *CertPool 12 | ) 13 | 14 | func systemRootsPool() *CertPool { 15 | once.Do(initSystemRoots) 16 | return systemRoots 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/memberlist/logging.go: -------------------------------------------------------------------------------- 1 | package memberlist 2 | 3 | import ( 4 | "fmt" 5 | "net" 6 | ) 7 | 8 | func LogAddress(addr net.Addr) string { 9 | if addr == nil { 10 | return "from=" 11 | } 12 | 13 | return fmt.Sprintf("from=%s", addr.String()) 14 | } 15 | 16 | func LogConn(conn net.Conn) string { 17 | if conn == nil { 18 | return LogAddress(nil) 19 | } 20 | 21 | return LogAddress(conn.RemoteAddr()) 22 | } 23 | -------------------------------------------------------------------------------- /man/src/container/top.md: -------------------------------------------------------------------------------- 1 | Display the running process of the container. ps-OPTION can be any of the options you would pass to a Linux ps command. 2 | 3 | All displayed information is from host's point of view. 4 | 5 | # EXAMPLES 6 | 7 | Run **docker container top** with the ps option of -x: 8 | 9 | $ docker container top 8601afda2b -x 10 | PID TTY STAT TIME COMMAND 11 | 16623 ? Ss 0:00 sleep 99999 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/libnetwork/drivers_solaris.go: -------------------------------------------------------------------------------- 1 | package libnetwork 2 | 3 | import ( 4 | "github.com/docker/libnetwork/drivers/null" 5 | "github.com/docker/libnetwork/drivers/solaris/bridge" 6 | "github.com/docker/libnetwork/drivers/solaris/overlay" 7 | ) 8 | 9 | func getInitializers(experimental bool) []initializer { 10 | return []initializer{ 11 | {overlay.Init, "overlay"}, 12 | {bridge.Init, "bridge"}, 13 | {null.Init, "null"}, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/google/certificate-transparency/go/x509/root_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 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,!cgo 6 | 7 | package x509 8 | 9 | func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate, err error) { 10 | return nil, nil 11 | } 12 | 13 | func initSystemRoots() { 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-shellwords/util_posix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package shellwords 4 | 5 | import ( 6 | "errors" 7 | "os" 8 | "os/exec" 9 | "strings" 10 | ) 11 | 12 | func shellRun(line string) (string, error) { 13 | shell := os.Getenv("SHELL") 14 | b, err := exec.Command(shell, "-c", line).Output() 15 | if err != nil { 16 | return "", errors.New(err.Error() + ":" + string(b)) 17 | } 18 | return strings.TrimSpace(string(b)), nil 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/health/grpc_health_v1/health.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package grpc.health.v1; 4 | 5 | message HealthCheckRequest { 6 | string service = 1; 7 | } 8 | 9 | message HealthCheckResponse { 10 | enum ServingStatus { 11 | UNKNOWN = 0; 12 | SERVING = 1; 13 | NOT_SERVING = 2; 14 | } 15 | ServingStatus status = 1; 16 | } 17 | 18 | service Health{ 19 | rpc Check(HealthCheckRequest) returns (HealthCheckResponse); 20 | } 21 | -------------------------------------------------------------------------------- /cli/command/node/opts.go: -------------------------------------------------------------------------------- 1 | package node 2 | 3 | import ( 4 | "github.com/docker/docker/opts" 5 | ) 6 | 7 | type nodeOptions struct { 8 | annotations 9 | role string 10 | availability string 11 | } 12 | 13 | type annotations struct { 14 | name string 15 | labels opts.ListOpts 16 | } 17 | 18 | func newNodeOptions() *nodeOptions { 19 | return &nodeOptions{ 20 | annotations: annotations{ 21 | labels: opts.NewListOpts(nil), 22 | }, 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /integration-cli/test_vars_windows_test.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 | // On Windows, the busybox image doesn't have the `top` command, so we rely 13 | // on `sleep` with a high duration. 14 | defaultSleepImage = "busybox" 15 | ) 16 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/google/appenginevm_hook.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The oauth2 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 appenginevm 6 | 7 | package google 8 | 9 | import "google.golang.org/appengine" 10 | 11 | func init() { 12 | appengineVM = true 13 | appengineTokenFunc = appengine.AccessToken 14 | appengineAppIDFunc = appengine.AppID 15 | } 16 | -------------------------------------------------------------------------------- /volume/volume_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package volume 4 | 5 | import ( 6 | "fmt" 7 | "runtime" 8 | 9 | mounttypes "github.com/docker/docker/api/types/mount" 10 | ) 11 | 12 | // ConvertTmpfsOptions converts *mounttypes.TmpfsOptions to the raw option string 13 | // for mount(2). 14 | func ConvertTmpfsOptions(opt *mounttypes.TmpfsOptions, readOnly bool) (string, error) { 15 | return "", fmt.Errorf("%s does not support tmpfs", runtime.GOOS) 16 | } 17 | -------------------------------------------------------------------------------- /hack/generate-authors.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env 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 | -------------------------------------------------------------------------------- /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/github.com/opencontainers/runc/libcontainer/apparmor/apparmor_disabled.go: -------------------------------------------------------------------------------- 1 | // +build !apparmor !linux 2 | 3 | package apparmor 4 | 5 | import ( 6 | "errors" 7 | ) 8 | 9 | var ErrApparmorNotEnabled = errors.New("apparmor: config provided but apparmor not supported") 10 | 11 | func IsEnabled() bool { 12 | return false 13 | } 14 | 15 | func ApplyProfile(name string) error { 16 | if name != "" { 17 | return ErrApparmorNotEnabled 18 | } 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 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 | // 6 | // System calls for 386, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-8 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-4 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /contrib/gitdm/generate_aliases.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # 4 | # This script generates a gitdm compatible email aliases file from a git 5 | # formatted .mailmap file. 6 | # 7 | # Usage: 8 | # $> ./generate_aliases > aliases 9 | # 10 | 11 | cat $1 | \ 12 | grep -v '^#' | \ 13 | sed 's/^[^<]*<\([^>]*\)>/\1/' | \ 14 | grep '<.*>' | sed -e 's/[<>]/ /g' | \ 15 | awk '{if ($3 != "") { print $3" "$1 } else {print $2" "$1}}' | \ 16 | sort | uniq 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 | -------------------------------------------------------------------------------- /pkg/parsers/kernel/uname_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!solaris 2 | 3 | package kernel 4 | 5 | import ( 6 | "errors" 7 | ) 8 | 9 | // Utsname represents the system name structure. 10 | // It is defined here to make it portable as it is available on linux but not 11 | // on windows. 12 | type Utsname struct { 13 | Release [65]byte 14 | } 15 | 16 | func uname() (*Utsname, error) { 17 | return nil, errors.New("Kernel version detection is available only on linux") 18 | } 19 | -------------------------------------------------------------------------------- /vendor/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("%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x-%02x", g[3], g[2], g[1], g[0], g[5], g[4], g[7], g[6], g[8:10], g[10:]) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 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 | // 6 | // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-32 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-8 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /cli/command/node/testdata/node-ps.with-errors.golden: -------------------------------------------------------------------------------- 1 | ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS 2 | taskID1 failure.1 myimage:mytag defaultNodeName Ready Ready 2 hours ago "a task error" 3 | taskID2 \_ failure.1 myimage:mytag defaultNodeName Ready Ready 3 hours ago "a task error" 4 | taskID3 \_ failure.1 myimage:mytag defaultNodeName Ready Ready 4 hours ago "a task error" 5 | -------------------------------------------------------------------------------- /pkg/devicemapper/devmapper_wrapper_no_deferred_remove.go: -------------------------------------------------------------------------------- 1 | // +build linux,cgo,libdm_no_deferred_remove 2 | 3 | package devicemapper 4 | 5 | // LibraryDeferredRemovalSupport is not supported when statically linked. 6 | const LibraryDeferredRemovalSupport = false 7 | 8 | func dmTaskDeferredRemoveFct(task *cdmTask) int { 9 | // Error. Nobody should be calling it. 10 | return -1 11 | } 12 | 13 | func dmTaskGetInfoWithDeferredFct(task *cdmTask, info *Info) int { 14 | return -1 15 | } 16 | -------------------------------------------------------------------------------- /pkg/ioutils/temp_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package ioutils 4 | 5 | import ( 6 | "io/ioutil" 7 | 8 | "github.com/docker/docker/pkg/longpath" 9 | ) 10 | 11 | // TempDir is the equivalent of ioutil.TempDir, except that the result is in Windows longpath format. 12 | func TempDir(dir, prefix string) (string, error) { 13 | tempDir, err := ioutil.TempDir(dir, prefix) 14 | if err != nil { 15 | return "", err 16 | } 17 | return longpath.AddPrefix(tempDir), nil 18 | } 19 | -------------------------------------------------------------------------------- /vendor/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 | -------------------------------------------------------------------------------- /api/server/httputils/httputils_write_json_go16.go: -------------------------------------------------------------------------------- 1 | // +build go1.6,!go1.7 2 | 3 | package httputils 4 | 5 | import ( 6 | "encoding/json" 7 | "net/http" 8 | ) 9 | 10 | // WriteJSON writes the value v to the http response stream as json with standard json encoding. 11 | func WriteJSON(w http.ResponseWriter, code int, v interface{}) error { 12 | w.Header().Set("Content-Type", "application/json") 13 | w.WriteHeader(code) 14 | enc := json.NewEncoder(w) 15 | return enc.Encode(v) 16 | } 17 | -------------------------------------------------------------------------------- /daemon/auth.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/docker/docker/api/types" 7 | "github.com/docker/docker/dockerversion" 8 | ) 9 | 10 | // AuthenticateToRegistry checks the validity of credentials in authConfig 11 | func (daemon *Daemon) AuthenticateToRegistry(ctx context.Context, authConfig *types.AuthConfig) (string, string, error) { 12 | return daemon.RegistryService.Auth(ctx, authConfig, dockerversion.DockerUserAgent(ctx)) 13 | } 14 | -------------------------------------------------------------------------------- /hack/vendor.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This file is just wrapper around vndr (github.com/LK4D4/vndr) tool. 4 | # For updating dependencies you should change `vendor.conf` file in root of the 5 | # project. Please refer to https://github.com/LK4D4/vndr/blob/master/README.md for 6 | # vndr usage. 7 | 8 | set -e 9 | 10 | if ! hash vndr; then 11 | echo "Please install vndr with \"go get github.com/LK4D4/vndr\" and put it in your \$GOPATH" 12 | exit 1 13 | fi 14 | 15 | vndr "$@" 16 | -------------------------------------------------------------------------------- /pkg/idtools/usergroupadd_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package idtools 4 | 5 | import "fmt" 6 | 7 | // AddNamespaceRangesUser takes a name and finds an unused uid, gid pair 8 | // and calls the appropriate helper function to add the group and then 9 | // the user to the group in /etc/group and /etc/passwd respectively. 10 | func AddNamespaceRangesUser(name string) (int, int, error) { 11 | return -1, -1, fmt.Errorf("No support for adding users or groups on this OS") 12 | } 13 | -------------------------------------------------------------------------------- /runconfig/hostconfig_windows_test.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package runconfig 4 | 5 | import ( 6 | "testing" 7 | 8 | "github.com/docker/docker/api/types/container" 9 | ) 10 | 11 | func TestValidatePrivileged(t *testing.T) { 12 | expected := "invalid --privileged: Windows does not support this feature" 13 | err := validatePrivileged(&container.HostConfig{Privileged: true}) 14 | if err == nil || err.Error() != expected { 15 | t.Fatalf("Expected %s", expected) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/notary/notary.go: -------------------------------------------------------------------------------- 1 | package notary 2 | 3 | // PassRetriever is a callback function that should retrieve a passphrase 4 | // for a given named key. If it should be treated as new passphrase (e.g. with 5 | // confirmation), createNew will be true. Attempts is passed in so that implementers 6 | // decide how many chances to give to a human, for example. 7 | type PassRetriever func(keyName, alias string, createNew bool, attempts int) (passphrase string, giveup bool, err error) 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/swarmkit/protobuf/ptypes/timestamp.go: -------------------------------------------------------------------------------- 1 | package ptypes 2 | 3 | import ( 4 | "time" 5 | 6 | gogotypes "github.com/gogo/protobuf/types" 7 | ) 8 | 9 | // MustTimestampProto converts time.Time to a google.protobuf.Timestamp proto. 10 | // It panics if input timestamp is invalid. 11 | func MustTimestampProto(t time.Time) *gogotypes.Timestamp { 12 | ts, err := gogotypes.TimestampProto(t) 13 | if err != nil { 14 | panic(err.Error()) 15 | } 16 | return ts 17 | } 18 | -------------------------------------------------------------------------------- /vendor/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 | --------------------------------------------------------------------------------