├── package.go ├── .dockerignore ├── version ├── version_test.go └── version.go ├── integration ├── assets │ ├── env │ │ └── .env │ ├── run │ │ └── docker-compose.yml │ ├── build │ │ ├── Dockerfile │ │ ├── one │ │ │ └── Dockerfile │ │ └── docker-compose.yml │ ├── simple-build │ │ ├── docker-compose.yml │ │ └── one │ │ │ └── Dockerfile │ ├── interpolation │ │ └── docker-compose.yml │ ├── validation │ │ ├── valid │ │ │ ├── docker-compose.v1.yml │ │ │ └── docker-compose.v2.yml │ │ └── invalid │ │ │ ├── docker-compose.v1.yml │ │ │ └── docker-compose.v2.yml │ ├── v2-full │ │ ├── Dockerfile │ │ └── docker-compose.yml │ ├── volumes │ │ └── relative-volumes.yml │ ├── v2-build-args │ │ ├── Dockerfile │ │ └── docker-compose.yml │ ├── multiple-composefiles-default │ │ ├── docker-compose.override.yml │ │ └── docker-compose.yml │ ├── multiple │ │ ├── two.yml │ │ └── one.yml │ ├── networks │ │ ├── bridge.yml │ │ ├── missing-network.yml │ │ ├── external-default.yml │ │ ├── network-aliases.yml │ │ ├── external-networks.yml │ │ ├── default-network-config.yml │ │ ├── docker-compose.yml │ │ ├── network-mode.yml │ │ └── network-static-addresses.yml │ ├── regression │ │ ├── 60-volume_from.yml │ │ └── volume_from_container_name.yml │ ├── v2-simple │ │ ├── docker-compose.yml │ │ └── links-invalid.yml │ └── v2-dependencies │ │ └── docker-compose.yml ├── pull_test.go ├── kill_test.go ├── stop_test.go ├── start_test.go └── restart_test.go ├── vendor ├── github.com │ ├── docker │ │ ├── go-connections │ │ │ ├── sockets │ │ │ │ ├── README.md │ │ │ │ ├── tcp_socket.go │ │ │ │ ├── sockets_windows.go │ │ │ │ └── unix_socket.go │ │ │ ├── tlsconfig │ │ │ │ ├── certpool_other.go │ │ │ │ ├── certpool_go17.go │ │ │ │ ├── config_legacy_client_ciphers.go │ │ │ │ └── config_client_ciphers.go │ │ │ └── README.md │ │ ├── docker │ │ │ ├── pkg │ │ │ │ ├── archive │ │ │ │ │ ├── README.md │ │ │ │ │ ├── archive_other.go │ │ │ │ │ ├── copy_windows.go │ │ │ │ │ ├── copy_unix.go │ │ │ │ │ ├── time_unsupported.go │ │ │ │ │ ├── time_linux.go │ │ │ │ │ └── changes_windows.go │ │ │ │ ├── stringid │ │ │ │ │ └── README.md │ │ │ │ ├── mount │ │ │ │ │ ├── mountinfo_windows.go │ │ │ │ │ ├── mounter_unsupported.go │ │ │ │ │ ├── mountinfo_unsupported.go │ │ │ │ │ └── flags_unsupported.go │ │ │ │ ├── system │ │ │ │ │ ├── init_unix.go │ │ │ │ │ ├── lcow_windows.go │ │ │ │ │ ├── lcow_unix.go │ │ │ │ │ ├── umask_windows.go │ │ │ │ │ ├── meminfo_unsupported.go │ │ │ │ │ ├── utimes_unsupported.go │ │ │ │ │ ├── umask.go │ │ │ │ │ ├── mknod_windows.go │ │ │ │ │ ├── init_windows.go │ │ │ │ │ ├── stat_openbsd.go │ │ │ │ │ ├── stat_solaris.go │ │ │ │ │ ├── chtimes_unix.go │ │ │ │ │ ├── lstat_windows.go │ │ │ │ │ ├── stat_darwin.go │ │ │ │ │ ├── stat_freebsd.go │ │ │ │ │ ├── process_windows.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── xattrs_unsupported.go │ │ │ │ │ ├── lstat_unix.go │ │ │ │ │ ├── meminfo.go │ │ │ │ │ ├── init.go │ │ │ │ │ ├── syscall_unix.go │ │ │ │ │ ├── process_unix.go │ │ │ │ │ ├── exitcode.go │ │ │ │ │ ├── stat_linux.go │ │ │ │ │ └── utimes_freebsd.go │ │ │ │ ├── fileutils │ │ │ │ │ ├── fileutils_windows.go │ │ │ │ │ ├── fileutils_unix.go │ │ │ │ │ └── fileutils_darwin.go │ │ │ │ ├── ioutils │ │ │ │ │ ├── temp_unix.go │ │ │ │ │ └── temp_windows.go │ │ │ │ ├── symlink │ │ │ │ │ ├── fs_unix.go │ │ │ │ │ └── README.md │ │ │ │ ├── homedir │ │ │ │ │ ├── homedir_others.go │ │ │ │ │ └── homedir_linux.go │ │ │ │ ├── tarsum │ │ │ │ │ ├── writercloser.go │ │ │ │ │ └── builder_context.go │ │ │ │ ├── idtools │ │ │ │ │ └── usergroupadd_unsupported.go │ │ │ │ └── term │ │ │ │ │ ├── tc.go │ │ │ │ │ └── winsize.go │ │ │ ├── api │ │ │ │ ├── common_unix.go │ │ │ │ ├── types │ │ │ │ │ ├── swarm │ │ │ │ │ │ ├── runtime │ │ │ │ │ │ │ ├── gen.go │ │ │ │ │ │ │ └── plugin.proto │ │ │ │ │ │ └── runtime.go │ │ │ │ │ ├── error_response.go │ │ │ │ │ ├── id_response.go │ │ │ │ │ ├── service_update_response.go │ │ │ │ │ ├── time │ │ │ │ │ │ └── duration_convert.go │ │ │ │ │ ├── graph_driver_data.go │ │ │ │ │ ├── image_delete_response_item.go │ │ │ │ │ ├── plugin_interface_type.go │ │ │ │ │ ├── port.go │ │ │ │ │ ├── container │ │ │ │ │ │ ├── container_update.go │ │ │ │ │ │ ├── container_changes.go │ │ │ │ │ │ ├── container_create.go │ │ │ │ │ │ └── container_top.go │ │ │ │ │ ├── plugin_env.go │ │ │ │ │ ├── plugin_device.go │ │ │ │ │ ├── blkiodev │ │ │ │ │ │ └── blkio.go │ │ │ │ │ └── registry │ │ │ │ │ │ └── authenticate.go │ │ │ │ ├── common.go │ │ │ │ └── common_windows.go │ │ │ ├── client │ │ │ │ ├── client_windows.go │ │ │ │ ├── client_unix.go │ │ │ │ ├── interface_stable.go │ │ │ │ ├── tlsconfig_clone.go │ │ │ │ ├── plugin_set.go │ │ │ │ ├── swarm_join.go │ │ │ │ ├── container_unpause.go │ │ │ │ ├── service_remove.go │ │ │ │ ├── container_pause.go │ │ │ │ ├── swarm_unlock.go │ │ │ │ ├── network_remove.go │ │ │ │ ├── transport.go │ │ │ │ ├── swarm_leave.go │ │ │ │ ├── config_remove.go │ │ │ │ ├── secret_remove.go │ │ │ │ ├── container_rename.go │ │ │ │ ├── checkpoint_create.go │ │ │ │ ├── plugin_push.go │ │ │ │ ├── container_kill.go │ │ │ │ ├── session.go │ │ │ │ ├── plugin_disable.go │ │ │ │ ├── plugin_enable.go │ │ │ │ ├── network_disconnect.go │ │ │ │ ├── node_update.go │ │ │ │ ├── node_remove.go │ │ │ │ ├── plugin_remove.go │ │ │ │ ├── swarm_inspect.go │ │ │ │ ├── container_export.go │ │ │ │ ├── swarm_init.go │ │ │ │ ├── image_save.go │ │ │ │ ├── version.go │ │ │ │ ├── volume_remove.go │ │ │ │ ├── network_connect.go │ │ │ │ ├── swarm_get_unlock_key.go │ │ │ │ ├── checkpoint_delete.go │ │ │ │ ├── volume_create.go │ │ │ │ ├── config_update.go │ │ │ │ ├── secret_update.go │ │ │ │ ├── interface_experimental.go │ │ │ │ ├── image_history.go │ │ │ │ ├── info.go │ │ │ │ ├── disk_usage.go │ │ │ │ ├── container_stop.go │ │ │ │ ├── plugin_create.go │ │ │ │ ├── container_update.go │ │ │ │ ├── container_diff.go │ │ │ │ ├── container_restart.go │ │ │ │ └── container_start.go │ │ │ ├── registry │ │ │ │ ├── config_unix.go │ │ │ │ ├── config_windows.go │ │ │ │ └── errors.go │ │ │ ├── errdefs │ │ │ │ └── doc.go │ │ │ └── NOTICE │ │ ├── cli │ │ │ ├── cli │ │ │ │ ├── config │ │ │ │ │ └── credentials │ │ │ │ │ │ ├── default_store_windows.go │ │ │ │ │ │ ├── default_store_darwin.go │ │ │ │ │ │ ├── default_store_unsupported.go │ │ │ │ │ │ ├── default_store_linux.go │ │ │ │ │ │ ├── default_store.go │ │ │ │ │ │ └── credentials.go │ │ │ │ └── command │ │ │ │ │ └── image │ │ │ │ │ └── build │ │ │ │ │ ├── context_unix.go │ │ │ │ │ └── context_windows.go │ │ │ ├── opts │ │ │ │ ├── hosts_windows.go │ │ │ │ ├── opts_unix.go │ │ │ │ └── hosts_unix.go │ │ │ └── NOTICE │ │ ├── docker-credential-helpers │ │ │ ├── credentials │ │ │ │ ├── version.go │ │ │ │ └── helper.go │ │ │ ├── osxkeychain │ │ │ │ ├── url_go18.go │ │ │ │ └── osxkeychain_darwin.h │ │ │ └── secretservice │ │ │ │ └── secretservice_linux.h │ │ ├── distribution │ │ │ ├── doc.go │ │ │ ├── registry │ │ │ │ └── api │ │ │ │ │ └── v2 │ │ │ │ │ └── doc.go │ │ │ └── context │ │ │ │ ├── version.go │ │ │ │ └── util.go │ │ └── go-units │ │ │ └── README.md │ ├── flynn │ │ └── go-shlex │ │ │ └── README.md │ ├── opencontainers │ │ ├── runc │ │ │ ├── libcontainer │ │ │ │ ├── nsenter │ │ │ │ │ ├── nsenter_unsupported.go │ │ │ │ │ ├── nsenter.go │ │ │ │ │ └── nsenter_gccgo.go │ │ │ │ ├── system │ │ │ │ │ ├── unsupported.go │ │ │ │ │ ├── sysconfig.go │ │ │ │ │ ├── sysconfig_notcgo.go │ │ │ │ │ ├── syscall_linux_386.go │ │ │ │ │ ├── syscall_linux_arm.go │ │ │ │ │ └── syscall_linux_64.go │ │ │ │ └── user │ │ │ │ │ ├── lookup_unsupported.go │ │ │ │ │ └── lookup_unix.go │ │ │ └── NOTICE │ │ └── go-digest │ │ │ └── digester.go │ ├── Azure │ │ └── go-ansiterm │ │ │ ├── context.go │ │ │ ├── winterm │ │ │ └── utilities.go │ │ │ ├── utilities.go │ │ │ ├── ground_state.go │ │ │ └── osc_string_state.go │ ├── kr │ │ └── pty │ │ │ ├── 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 │ │ │ ├── doc.go │ │ │ ├── README.md │ │ │ ├── run.go │ │ │ └── util.go │ ├── Microsoft │ │ └── go-winio │ │ │ └── syscall.go │ ├── sirupsen │ │ └── logrus │ │ │ ├── terminal_bsd.go │ │ │ ├── terminal_linux.go │ │ │ └── doc.go │ ├── Nvveen │ │ └── Gotty │ │ │ ├── README │ │ │ └── types.go │ ├── gorilla │ │ └── context │ │ │ └── README.md │ ├── xeipuuv │ │ ├── gojsonreference │ │ │ └── README.md │ │ └── gojsonpointer │ │ │ └── README.md │ ├── stretchr │ │ └── testify │ │ │ └── assert │ │ │ └── errors.go │ └── urfave │ │ └── cli │ │ └── cli.go ├── golang.org │ └── x │ │ ├── time │ │ └── README │ │ ├── net │ │ ├── README │ │ └── proxy │ │ │ └── direct.go │ │ ├── crypto │ │ ├── README │ │ └── ssh │ │ │ └── terminal │ │ │ ├── util_bsd.go │ │ │ └── util_linux.go │ │ └── sys │ │ ├── unix │ │ ├── endian_big.go │ │ ├── endian_little.go │ │ ├── constants.go │ │ ├── syscall_no_getwd.go │ │ ├── zsysnum_solaris_amd64.go │ │ ├── env_unset.go │ │ ├── syscall_linux_amd64_gc.go │ │ ├── pagesize_unix.go │ │ ├── flock_linux_32bit.go │ │ ├── asm_solaris_amd64.s │ │ ├── gccgo_linux_amd64.go │ │ ├── race0.go │ │ ├── env_unix.go │ │ ├── syscall_unix_gc.go │ │ ├── asm_linux_arm64.s │ │ ├── str.go │ │ ├── file_unix.go │ │ ├── race.go │ │ ├── asm_linux_s390x.s │ │ ├── asm_linux_ppc64x.s │ │ ├── asm_linux_arm.s │ │ ├── asm_linux_mips64x.s │ │ ├── flock.go │ │ ├── asm_freebsd_arm.s │ │ ├── asm_netbsd_arm.s │ │ ├── asm_openbsd_arm.s │ │ ├── asm_darwin_386.s │ │ ├── asm_freebsd_386.s │ │ ├── asm_netbsd_386.s │ │ ├── asm_openbsd_386.s │ │ ├── asm_darwin_amd64.s │ │ ├── asm_freebsd_amd64.s │ │ ├── asm_linux_amd64.s │ │ ├── asm_netbsd_amd64.s │ │ ├── asm_openbsd_amd64.s │ │ ├── asm_dragonfly_amd64.s │ │ ├── asm_darwin_arm.s │ │ └── bluetooth_linux.go │ │ ├── windows │ │ ├── mksyscall.go │ │ ├── env_unset.go │ │ ├── asm_windows_386.s │ │ ├── asm_windows_amd64.s │ │ ├── race0.go │ │ ├── types_windows_386.go │ │ ├── types_windows_amd64.go │ │ ├── str.go │ │ ├── env_windows.go │ │ └── race.go │ │ └── README.md └── gopkg.in │ ├── check.v1 │ └── README.md │ └── yaml.v2 │ └── LICENSE ├── config ├── testdata │ ├── .env │ ├── build.v1.yml │ ├── dns.v1.yml │ ├── build-image.v2.yml │ ├── ulimits.v1.yml │ ├── command.v1.yml │ ├── logging.v1.yml │ ├── ulimits.v2.yml │ ├── depends-on.v2.yml │ ├── logging.v2.yml │ ├── volumes-definition.v2.yml │ ├── volumes.v2.yml │ ├── entrypoint.v1.yml │ ├── entrypoint.v2.yml │ ├── volumes.v1.yml │ ├── network-mode.v2.yml │ ├── build.v2.yml │ ├── networks-definition.v2.yml │ └── networks.v2.yml └── merge_fixtures_test.go ├── samples └── compose.yml ├── hack ├── clean ├── schema_template.go ├── generate-sums ├── .integration-daemon-stop ├── dockerversion ├── binary ├── inline_schema.go └── validate-vet ├── .gitignore ├── CHANGELOG.md ├── project ├── container.go ├── project_pull.go ├── events │ └── events_test.go ├── project_log.go ├── project_start.go ├── project_pause.go ├── project_stop.go ├── project_kill.go ├── project_unpause.go ├── project_ps.go ├── project_restart.go ├── volume.go ├── network.go ├── project_delete.go ├── project_build.go ├── project_events.go ├── project_port.go └── options │ └── types_test.go ├── cli ├── app │ └── types.go ├── docker │ └── app │ │ └── factory.go └── logger │ └── colors.go ├── lookup ├── simple_env_test.go └── simple_env.go ├── example └── main.go ├── CONTRIBUTING.md └── docker ├── service └── service_factory.go └── network └── factory.go /package.go: -------------------------------------------------------------------------------- 1 | package libcompose 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | bundles/ 2 | **/*.test 3 | -------------------------------------------------------------------------------- /version/version_test.go: -------------------------------------------------------------------------------- 1 | package version 2 | -------------------------------------------------------------------------------- /integration/assets/env/.env: -------------------------------------------------------------------------------- 1 | FOO=bar 2 | 3 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/assets/run/docker-compose.yml: -------------------------------------------------------------------------------- 1 | hello: 2 | image: busybox 3 | -------------------------------------------------------------------------------- /config/testdata/.env: -------------------------------------------------------------------------------- 1 | # This is a comment line 2 | 3 | FOO=foo 4 | BAR=bar 5 | -------------------------------------------------------------------------------- /integration/assets/build/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | CMD ["echo", "two"] 3 | -------------------------------------------------------------------------------- /integration/assets/simple-build/docker-compose.yml: -------------------------------------------------------------------------------- 1 | one: 2 | build: one 3 | -------------------------------------------------------------------------------- /integration/assets/build/one/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | CMD ["echo", "one"] 3 | -------------------------------------------------------------------------------- /integration/assets/interpolation/docker-compose.yml: -------------------------------------------------------------------------------- 1 | base: 2 | image: $IMAGE 3 | -------------------------------------------------------------------------------- /integration/assets/simple-build/one/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | CMD ["echo", "one"] 3 | -------------------------------------------------------------------------------- /integration/assets/validation/valid/docker-compose.v1.yml: -------------------------------------------------------------------------------- 1 | base: 2 | image: busybox 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/time/README: -------------------------------------------------------------------------------- 1 | This repository provides supplementary Go time packages. 2 | -------------------------------------------------------------------------------- /integration/assets/v2-full/Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | FROM busybox:latest 3 | RUN echo something 4 | CMD top 5 | -------------------------------------------------------------------------------- /samples/compose.yml: -------------------------------------------------------------------------------- 1 | web: 2 | image: ubuntu 3 | links: 4 | - redis 5 | redis: 6 | image: redis -------------------------------------------------------------------------------- /config/testdata/build.v1.yml: -------------------------------------------------------------------------------- 1 | simple1: 2 | build: . 3 | simple2: 4 | build: . 5 | dockerfile: alternate 6 | -------------------------------------------------------------------------------- /hack/clean: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd $(dirname $0)/.. 5 | rm -rf bundles/libcompose-cli* || true 6 | -------------------------------------------------------------------------------- /integration/assets/validation/invalid/docker-compose.v1.yml: -------------------------------------------------------------------------------- 1 | base: 2 | image: busybox 3 | ports: invalid_type 4 | -------------------------------------------------------------------------------- /integration/assets/volumes/relative-volumes.yml: -------------------------------------------------------------------------------- 1 | server: 2 | image: busybox 3 | volumes: 4 | - .:/path 5 | -------------------------------------------------------------------------------- /config/testdata/dns.v1.yml: -------------------------------------------------------------------------------- 1 | simple: 2 | build: . 3 | dns: 8.8.8.8 4 | dns: 5 | - 8.8.8.8 6 | - 9.9.9.9 7 | -------------------------------------------------------------------------------- /integration/assets/v2-build-args/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox:latest 2 | ARG buildno=0 3 | RUN echo buildno is ${buildno} 4 | -------------------------------------------------------------------------------- /integration/assets/validation/valid/docker-compose.v2.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | base: 4 | image: busybox 5 | -------------------------------------------------------------------------------- /config/testdata/build-image.v2.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | simple: 5 | build: . 6 | image: myimage 7 | -------------------------------------------------------------------------------- /integration/assets/build/docker-compose.yml: -------------------------------------------------------------------------------- 1 | one: 2 | build: one 3 | two: 4 | build: . 5 | links: 6 | - one 7 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/archive/README.md: -------------------------------------------------------------------------------- 1 | This code provides helper functions for dealing with archive files. 2 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/stringid/README.md: -------------------------------------------------------------------------------- 1 | This package provides helper functions for dealing with string identifiers 2 | -------------------------------------------------------------------------------- /hack/schema_template.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | var schemaDataV1 = `{{.schemaV1}}` 4 | 5 | var servicesSchemaDataV2 = `{{.schemaV2}}` 6 | -------------------------------------------------------------------------------- /integration/assets/multiple-composefiles-default/docker-compose.override.yml: -------------------------------------------------------------------------------- 1 | yetanother: 2 | image: busybox:latest 3 | command: top 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /main/main 3 | /docker-compose* 4 | /libcompose-cli* 5 | *.log 6 | *.swp 7 | bundles 8 | .gopath 9 | .idea 10 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Changelog 2 | ========== 3 | 4 | # 0.0.0 (2015-07-09) 5 | 6 | ## Features 7 | - We started 8 | - No where to go but up from here 9 | -------------------------------------------------------------------------------- /vendor/github.com/flynn/go-shlex/README.md: -------------------------------------------------------------------------------- 1 | go-shlex is a simple lexer for go that supports shell-style quoting, 2 | commenting, and escaping. 3 | -------------------------------------------------------------------------------- /integration/assets/validation/invalid/docker-compose.v2.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | base: 4 | image: busybox 5 | ports: invalid_type 6 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/nsenter/nsenter_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux !cgo 2 | 3 | package nsenter 4 | 5 | import "C" 6 | -------------------------------------------------------------------------------- /config/testdata/ulimits.v1.yml: -------------------------------------------------------------------------------- 1 | simple1: 2 | image: myimage 3 | ulimits: 4 | nproc: 65535 5 | nofile: 6 | soft: 20000 7 | hard: 40000 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/docker/cli/cli/config/credentials/default_store_windows.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | func defaultCredentialsStore() string { 4 | return "wincred" 5 | } 6 | -------------------------------------------------------------------------------- /hack/generate-sums: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | for BINARY in docker-compose_*; do 5 | sha256sum $BINARY > $BINARY.sha256 6 | md5sum $BINARY >> $BINARY.md5 7 | done 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | func defaultCredentialsStore() string { 4 | return "osxkeychain" 5 | } 6 | -------------------------------------------------------------------------------- /config/testdata/command.v1.yml: -------------------------------------------------------------------------------- 1 | simple1: 2 | image: myimage 3 | command: bundle exec thi-p 3000 4 | simple2: 5 | image: myimage 6 | command: [bundle, exec, thin, -p, "3000"] 7 | -------------------------------------------------------------------------------- /integration/assets/multiple-composefiles-default/docker-compose.yml: -------------------------------------------------------------------------------- 1 | simple: 2 | image: busybox:latest 3 | command: top 4 | another: 5 | image: busybox:latest 6 | command: top 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /integration/assets/v2-build-args/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | version: "2" 3 | 4 | services: 5 | simple: 6 | build: 7 | context: . 8 | args: 9 | buildno: 1 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!darwin,!linux 2 | 3 | package credentials 4 | 5 | const defaultCredentialsStore = "" 6 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker-credential-helpers/credentials/version.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | // Version holds a string describing the current version 4 | const Version = "0.5.2" 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /integration/assets/multiple/two.yml: -------------------------------------------------------------------------------- 1 | multiple: 2 | image: busybox 3 | command: echo two 4 | environment: 5 | - KEY2=VAL2 6 | yetanother: 7 | image: busybox:latest 8 | command: top 9 | -------------------------------------------------------------------------------- /integration/assets/networks/bridge.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | web: 5 | image: busybox 6 | command: top 7 | networks: 8 | - bridge 9 | - default 10 | -------------------------------------------------------------------------------- /integration/assets/regression/60-volume_from.yml: -------------------------------------------------------------------------------- 1 | first: 2 | image: busybox 3 | volumes: 4 | - /bundle 5 | second: 6 | image: busybox 7 | volumes_from: 8 | - first 9 | 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /integration/assets/networks/missing-network.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | web: 5 | image: busybox 6 | command: top 7 | networks: ["foo"] 8 | 9 | networks: 10 | bar: {} 11 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /config/testdata/logging.v1.yml: -------------------------------------------------------------------------------- 1 | simple1: 2 | image: myimage 3 | log_driver: syslog 4 | log_opt: 5 | syslog-address: "tcp://192.168.0.42:123" 6 | simple2: 7 | image: myimage 8 | log_driver: "none" 9 | -------------------------------------------------------------------------------- /integration/assets/v2-simple/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | simple: 4 | image: busybox:latest 5 | command: top 6 | another: 7 | image: busybox:latest 8 | command: top 9 | -------------------------------------------------------------------------------- /config/testdata/ulimits.v2.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | simple1: 4 | image: myimage 5 | ulimits: 6 | nproc: 65535 7 | nofile: 8 | soft: 20000 9 | hard: 40000 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /config/testdata/depends-on.v2.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | web: 4 | build: . 5 | depends_on: 6 | - db 7 | - redis 8 | redis: 9 | image: redis 10 | db: 11 | image: postgres 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/mount/mountinfo_windows.go: -------------------------------------------------------------------------------- 1 | package mount // import "github.com/docker/docker/pkg/mount" 2 | 3 | func parseMountTable() ([]*Info, error) { 4 | // Do NOT return an error! 5 | return nil, nil 6 | } 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /integration/assets/multiple/one.yml: -------------------------------------------------------------------------------- 1 | multiple: 2 | image: tianon/true 3 | environment: 4 | - KEY1=VAL1 5 | simple: 6 | image: busybox:latest 7 | command: top 8 | another: 9 | image: busybox:latest 10 | command: top 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/common_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package api // import "github.com/docker/docker/api" 4 | 5 | // MinVersion represents Minimum REST API version supported 6 | const MinVersion string = "1.12" 7 | -------------------------------------------------------------------------------- /integration/assets/regression/volume_from_container_name.yml: -------------------------------------------------------------------------------- 1 | first: 2 | image: busybox 3 | container_name: first_container_name 4 | volumes: 5 | - /bundle 6 | second: 7 | image: busybox 8 | volumes_from: 9 | - first 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /integration/assets/v2-simple/links-invalid.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | simple: 4 | image: busybox:latest 5 | command: top 6 | links: 7 | - another 8 | another: 9 | image: busybox:latest 10 | command: top 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/archive/archive_other.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package archive // import "github.com/docker/docker/pkg/archive" 4 | 5 | func getWhiteoutConverter(format WhiteoutFormat) tarWhiteoutConverter { 6 | return nil 7 | } 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/init_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system // import "github.com/docker/docker/pkg/system" 4 | 5 | // InitLCOW does nothing since LCOW is a windows only feature 6 | func InitLCOW(experimental bool) { 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/runtime/gen.go: -------------------------------------------------------------------------------- 1 | //go:generate protoc -I . --gogofast_out=import_path=github.com/docker/docker/api/types/swarm/runtime:. plugin.proto 2 | 3 | package runtime // import "github.com/docker/docker/api/types/swarm/runtime" 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/archive/copy_windows.go: -------------------------------------------------------------------------------- 1 | package archive // import "github.com/docker/docker/pkg/archive" 2 | 3 | import ( 4 | "path/filepath" 5 | ) 6 | 7 | func normalizePath(path string) string { 8 | return filepath.FromSlash(path) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/lcow_windows.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/system" 2 | 3 | // LCOWSupported returns true if Linux containers on Windows are supported. 4 | func LCOWSupported() bool { 5 | return lcowSupported 6 | } 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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/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/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 | -------------------------------------------------------------------------------- /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 "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TIOCGETA 9 | 10 | type Termios unix.Termios 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/lcow_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system // import "github.com/docker/docker/pkg/system" 4 | 5 | // LCOWSupported returns true if Linux containers on Windows are supported. 6 | func LCOWSupported() bool { 7 | return false 8 | } 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/archive/copy_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package archive // import "github.com/docker/docker/pkg/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/docker/docker/pkg/fileutils/fileutils_windows.go: -------------------------------------------------------------------------------- 1 | package fileutils // import "github.com/docker/docker/pkg/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 | -------------------------------------------------------------------------------- /config/testdata/logging.v2.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | simple1: 4 | image: myimage 5 | logging: 6 | driver: syslog 7 | options: 8 | syslog-address: "tcp://192.168.0.42:123" 9 | simple2: 10 | image: myimage 11 | logging: 12 | driver: "none" 13 | -------------------------------------------------------------------------------- /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/docker/docker-credential-helpers/osxkeychain/url_go18.go: -------------------------------------------------------------------------------- 1 | //+build go1.8 2 | 3 | package osxkeychain 4 | 5 | import "net/url" 6 | 7 | func getHostname(u *url.URL) string { 8 | return u.Hostname() 9 | } 10 | 11 | func getPort(u *url.URL) string { 12 | return u.Port() 13 | } 14 | -------------------------------------------------------------------------------- /config/testdata/volumes-definition.v2.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | volumes: 3 | volume1: 4 | driver: foo 5 | volume2: 6 | driver: bar 7 | driver_opts: 8 | foo: "bar" 9 | baz: "" 10 | volume3: 11 | external: true 12 | volume4: 13 | external: 14 | name: name-of-volume 15 | -------------------------------------------------------------------------------- /integration/assets/networks/external-default.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | simple: 4 | image: busybox:latest 5 | command: top 6 | another: 7 | image: busybox:latest 8 | command: top 9 | networks: 10 | default: 11 | external: 12 | name: composetest_external_network 13 | -------------------------------------------------------------------------------- /config/testdata/volumes.v2.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | simple1: 4 | image: myimage 5 | volumes: 6 | - /var/lib/mysql 7 | - /opt/data:/var/lib/mysql 8 | - ./cache:/tmp/cache 9 | - ~configs:/etc/configs/:ro 10 | - datavolume:/var/lib/mysql 11 | volume_driver: mydriver 12 | -------------------------------------------------------------------------------- /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/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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 ppc64 s390x mips mips64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /integration/assets/networks/network-aliases.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | web: 5 | image: busybox 6 | command: top 7 | networks: 8 | front: 9 | aliases: 10 | - forward_facing 11 | - ahead 12 | back: 13 | 14 | networks: 15 | front: {} 16 | back: {} 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/umask_windows.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/system" 2 | 3 | // Umask is not supported on the windows platform. 4 | func Umask(newmask int) (oldmask int, err error) { 5 | // should not be called on cli code path 6 | return 0, ErrNotSupportedPlatform 7 | } 8 | -------------------------------------------------------------------------------- /integration/assets/networks/external-networks.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | web: 5 | image: busybox 6 | command: top 7 | networks: 8 | - networks_foo 9 | - bar 10 | 11 | networks: 12 | networks_foo: 13 | external: true 14 | bar: 15 | external: 16 | name: networks_bar 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | import ( 4 | "github.com/docker/docker-credential-helpers/pass" 5 | ) 6 | 7 | func defaultCredentialsStore() string { 8 | if pass.PassInitialized { 9 | return "pass" 10 | } 11 | 12 | return "secretservice" 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/meminfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package system // import "github.com/docker/docker/pkg/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 | -------------------------------------------------------------------------------- /config/testdata/entrypoint.v1.yml: -------------------------------------------------------------------------------- 1 | simple1: 2 | build: . 3 | entrypoint: 4 | - php 5 | - -d 6 | - zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so 7 | - -d 8 | - memory_limit=-1 9 | - vendor/bin/phpunit 10 | simple2: 11 | build: . 12 | entrypoint: /code/entrypoint.sh 13 | -------------------------------------------------------------------------------- /integration/assets/v2-dependencies/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2.0" 2 | services: 3 | db: 4 | image: busybox:latest 5 | command: top 6 | web: 7 | image: busybox:latest 8 | command: top 9 | depends_on: 10 | - db 11 | console: 12 | image: busybox:latest 13 | command: top 14 | -------------------------------------------------------------------------------- /project/container.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | ) 6 | 7 | // Container defines what a libcompose container provides. 8 | type Container interface { 9 | ID() string 10 | Name() string 11 | Port(ctx context.Context, port string) (string, error) 12 | IsRunning(ctx context.Context) bool 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/client_windows.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | // DefaultDockerHost defines os specific default if DOCKER_HOST is unset 4 | const DefaultDockerHost = "npipe:////./pipe/docker_engine" 5 | 6 | const defaultProto = "npipe" 7 | const defaultAddr = "//./pipe/docker_engine" 8 | -------------------------------------------------------------------------------- /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/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /integration/assets/networks/default-network-config.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | simple: 4 | image: busybox:latest 5 | command: top 6 | another: 7 | image: busybox:latest 8 | command: top 9 | networks: 10 | default: 11 | driver: bridge 12 | driver_opts: 13 | "com.docker.network.bridge.enable_icc": "false" 14 | -------------------------------------------------------------------------------- /integration/pull_test.go: -------------------------------------------------------------------------------- 1 | package integration 2 | 3 | import ( 4 | . "gopkg.in/check.v1" 5 | ) 6 | 7 | func (s *CliSuite) TestPull(c *C) { 8 | //TODO: This doesn't test much 9 | s.ProjectFromText(c, "pull", ` 10 | hello: 11 | image: tianon/true 12 | stdin_open: true 13 | tty: true 14 | `) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/ioutils/temp_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ioutils // import "github.com/docker/docker/pkg/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/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 | -------------------------------------------------------------------------------- /hack/.integration-daemon-stop: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | trap - EXIT # reset EXIT trap applied in .integration-daemon-start 4 | 5 | for pidFile in $(find "$DEST" -name docker.pid); do 6 | pid=$(set -x; cat "$pidFile") 7 | ( set -x; kill "$pid" ) 8 | if ! wait "$pid"; then 9 | echo >&2 "warning: PID $pid from $pidFile had a nonzero exit code" 10 | fi 11 | done 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/utimes_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd 2 | 3 | package system // import "github.com/docker/docker/pkg/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/docker/distribution/doc.go: -------------------------------------------------------------------------------- 1 | // Package distribution will define the interfaces for the components of 2 | // docker distribution. The goal is to allow users to reliably package, ship 3 | // and store content related to docker images. 4 | // 5 | // This is currently a work in progress. More details are available in the 6 | // README.md. 7 | package distribution 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/tlsconfig/certpool_other.go: -------------------------------------------------------------------------------- 1 | // +build !go1.7 2 | 3 | package tlsconfig 4 | 5 | import ( 6 | "crypto/x509" 7 | 8 | ) 9 | 10 | // SystemCertPool returns an new empty cert pool, 11 | // accessing system cert pool is supported in go 1.7 12 | func SystemCertPool() (*x509.CertPool, error) { 13 | return x509.NewCertPool(), nil 14 | } 15 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /config/testdata/entrypoint.v2.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | simple1: 4 | build: . 5 | entrypoint: 6 | - php 7 | - -d 8 | - zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so 9 | - -d 10 | - memory_limit=-1 11 | - vendor/bin/phpunit 12 | simple2: 13 | build: . 14 | entrypoint: /code/entrypoint.sh 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/client_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd openbsd darwin 2 | 3 | package client // import "github.com/docker/docker/client" 4 | 5 | // DefaultDockerHost defines os specific default if DOCKER_HOST is unset 6 | const DefaultDockerHost = "unix:///var/run/docker.sock" 7 | 8 | const defaultProto = "unix" 9 | const defaultAddr = "/var/run/docker.sock" 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/mount/mounter_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount // import "github.com/docker/docker/pkg/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /config/testdata/volumes.v1.yml: -------------------------------------------------------------------------------- 1 | simple1: 2 | image: myimage 3 | volumes: 4 | - /var/lib/mysql 5 | - /opt/data:/var/lib/mysql 6 | - ./cache:/tmp/cache 7 | - ~configs:/etc/configs/:ro 8 | - datavolume:/var/lib/mysql 9 | volume_driver: mydriver 10 | volumes_from: 11 | - service_name 12 | - service_name:ro 13 | - container_name 14 | - container_name:rw 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/interface_stable.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/symlink/fs_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package symlink // import "github.com/docker/docker/pkg/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/umask.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system // import "github.com/docker/docker/pkg/system" 4 | 5 | import ( 6 | "golang.org/x/sys/unix" 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 unix.Umask(newmask), nil 13 | } 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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,linux 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /cli/app/types.go: -------------------------------------------------------------------------------- 1 | package app 2 | 3 | import ( 4 | "github.com/docker/libcompose/project" 5 | "github.com/urfave/cli" 6 | ) 7 | 8 | // ProjectFactory is an interface that helps creating libcompose project. 9 | type ProjectFactory interface { 10 | // Create creates a libcompose project from the command line options (urfave cli context). 11 | Create(c *cli.Context) (project.APIProject, error) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/mount/mountinfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!linux,!freebsd freebsd,!cgo 2 | 3 | package mount // import "github.com/docker/docker/pkg/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 | -------------------------------------------------------------------------------- /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/docker/cli/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/archive/time_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package archive // import "github.com/docker/docker/pkg/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /hack/dockerversion: -------------------------------------------------------------------------------- 1 | // AUTOGENERATED FILE; see /go/src/github.com/docker/docker/hack/make/.go-autogen 2 | package dockerversion 3 | 4 | var ( 5 | GITCOMMIT string = "libcompose-import" 6 | VERSION string = "libcompose-import" 7 | BUILDTIME string = "libcompose-import" 8 | 9 | IAMSTATIC string = "libcompose-import" 10 | INITSHA1 string = "libcompose-import" 11 | INITPATH string = "libcompose-import" 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/tlsconfig_clone.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package client // import "github.com/docker/docker/client" 4 | 5 | import "crypto/tls" 6 | 7 | // tlsConfigClone 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 tlsConfigClone(c *tls.Config) *tls.Config { 10 | return c.Clone() 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/common.go: -------------------------------------------------------------------------------- 1 | package api // import "github.com/docker/docker/api" 2 | 3 | // Common constants for daemon and client. 4 | const ( 5 | // DefaultVersion of Current REST API 6 | DefaultVersion string = "1.37" 7 | 8 | // NoBaseImageSpecifier is the symbol used by the FROM 9 | // command to specify that no base image is to be used. 10 | NoBaseImageSpecifier string = "scratch" 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/mknod_windows.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/system" 2 | 3 | // Mknod is not implemented on Windows. 4 | func Mknod(path string, mode uint32, dev int) error { 5 | return ErrNotSupportedPlatform 6 | } 7 | 8 | // Mkdev is not implemented on Windows. 9 | func Mkdev(major int64, minor int64) uint32 { 10 | panic("Mkdev not implemented on Windows.") 11 | } 12 | -------------------------------------------------------------------------------- /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 "golang.org/x/sys/unix" 11 | 12 | const ioctlReadTermios = unix.TCGETS 13 | 14 | type Termios unix.Termios 15 | -------------------------------------------------------------------------------- /config/testdata/network-mode.v2.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | simple1: 4 | image: myimage 5 | network_mode: bridge 6 | simple2: 7 | image: myimage 8 | network_mode: "service:bridge" 9 | simple3: 10 | image: myimage 11 | network_mode: "container:test_container" 12 | simple4: 13 | image: myimage 14 | network_mode: host 15 | simple5: 16 | image: myimage 17 | network_mode: none 18 | -------------------------------------------------------------------------------- /integration/assets/v2-full/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | version: "2" 3 | 4 | volumes: 5 | data: 6 | driver: local 7 | 8 | networks: 9 | front: {} 10 | 11 | services: 12 | web: 13 | build: 14 | context: . 15 | networks: 16 | - front 17 | - default 18 | volumes_from: 19 | - other 20 | 21 | other: 22 | image: busybox:latest 23 | command: top 24 | volumes: 25 | - /data 26 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /config/testdata/build.v2.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | simple1: 5 | build: . 6 | simple2: 7 | build: 8 | context: ./dir 9 | simple3: 10 | build: 11 | context: ./another 12 | dockerfile: alternate 13 | args: 14 | buildno: 1 15 | user: vincent 16 | simple4: 17 | build: 18 | context: ./another 19 | args: 20 | buildno: 2 21 | user: josh 22 | -------------------------------------------------------------------------------- /integration/assets/networks/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | web: 5 | image: busybox 6 | command: top 7 | networks: ["front"] 8 | app: 9 | image: busybox 10 | command: top 11 | networks: ["front", "back"] 12 | links: 13 | - "db:database" 14 | db: 15 | image: busybox 16 | command: top 17 | networks: ["back"] 18 | 19 | networks: 20 | front: {} 21 | back: {} 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/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 | -------------------------------------------------------------------------------- /vendor/gopkg.in/check.v1/README.md: -------------------------------------------------------------------------------- 1 | Instructions 2 | ============ 3 | 4 | Install the package with: 5 | 6 | go get gopkg.in/check.v1 7 | 8 | Import it with: 9 | 10 | import "gopkg.in/check.v1" 11 | 12 | and use _check_ as the package name inside the code. 13 | 14 | For more details, visit the project page: 15 | 16 | * http://labix.org/gocheck 17 | 18 | and the API documentation: 19 | 20 | * https://gopkg.in/check.v1 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/archive/time_linux.go: -------------------------------------------------------------------------------- 1 | package archive // import "github.com/docker/docker/pkg/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/init_windows.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/system" 2 | 3 | // lcowSupported determines if Linux Containers on Windows are supported. 4 | var lcowSupported = false 5 | 6 | // InitLCOW sets whether LCOW is supported or not 7 | func InitLCOW(experimental bool) { 8 | v := GetOSVersion() 9 | if experimental && v.Build >= 16299 { 10 | lcowSupported = true 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/stat_openbsd.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/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/docker/pkg/system/stat_solaris.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/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/docker/client/plugin_set.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/homedir/homedir_others.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package homedir // import "github.com/docker/docker/pkg/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/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/docker/docker/pkg/system/chtimes_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system // import "github.com/docker/docker/pkg/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/lstat_windows.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/stat_darwin.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/stat_freebsd.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/time/duration_convert.go: -------------------------------------------------------------------------------- 1 | package time // import "github.com/docker/docker/api/types/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_join.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/tarsum/writercloser.go: -------------------------------------------------------------------------------- 1 | package tarsum // import "github.com/docker/docker/pkg/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/docker/docker/client/container_unpause.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/service_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/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 wrapResponseError(err, resp, "service", serviceID) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_pause.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_unlock.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/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 wrapResponseError(err, resp, "network", networkID) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/transport.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "crypto/tls" 5 | "net/http" 6 | ) 7 | 8 | // resolveTLSConfig attempts to resolve the TLS configuration from the 9 | // RoundTripper. 10 | func resolveTLSConfig(transport http.RoundTripper) *tls.Config { 11 | switch tr := transport.(type) { 12 | case *http.Transport: 13 | return tr.TLSClientConfig 14 | default: 15 | return nil 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm linux,mips linux,mipsle 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/github.com/docker/docker/api/common_windows.go: -------------------------------------------------------------------------------- 1 | package api // import "github.com/docker/docker/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/process_windows.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/system" 2 | 3 | import "os" 4 | 5 | // IsProcessAlive returns true if process with a given pid is running. 6 | func IsProcessAlive(pid int) bool { 7 | _, err := os.FindProcess(pid) 8 | 9 | return err == nil 10 | } 11 | 12 | // KillProcess force-stops a process. 13 | func KillProcess(pid int) { 14 | p, err := os.FindProcess(pid) 15 | if err == nil { 16 | p.Kill() 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_leave.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/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 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/errors.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/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 | // ErrNotSupportedOperatingSystem means the operating system is not supported. 12 | ErrNotSupportedOperatingSystem = errors.New("operating system is not supported") 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/proxy/direct.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 | package proxy 6 | 7 | import ( 8 | "net" 9 | ) 10 | 11 | type direct struct{} 12 | 13 | // Direct is a direct proxy: one that makes network connections directly. 14 | var Direct = direct{} 15 | 16 | func (direct) Dial(network, addr string) (net.Conn, error) { 17 | return net.Dial(network, addr) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/config_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // ConfigRemove removes a Config. 6 | func (cli *Client) ConfigRemove(ctx context.Context, id string) error { 7 | if err := cli.NewVersionError("1.30", "config remove"); err != nil { 8 | return err 9 | } 10 | resp, err := cli.delete(ctx, "/configs/"+id, nil, nil) 11 | ensureReaderClosed(resp) 12 | return wrapResponseError(err, resp, "config", id) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/secret_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/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 | if err := cli.NewVersionError("1.25", "secret remove"); err != nil { 8 | return err 9 | } 10 | resp, err := cli.delete(ctx, "/secrets/"+id, nil, nil) 11 | ensureReaderClosed(resp) 12 | return wrapResponseError(err, resp, "secret", id) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/xattrs_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package system // import "github.com/docker/docker/pkg/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/docker/go-connections/tlsconfig/certpool_go17.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package tlsconfig 4 | 5 | import ( 6 | "crypto/x509" 7 | "runtime" 8 | ) 9 | 10 | // SystemCertPool returns a copy of the system cert pool, 11 | // returns an error if failed to load or empty pool on windows. 12 | func SystemCertPool() (*x509.CertPool, error) { 13 | certpool, err := x509.SystemCertPool() 14 | if err != nil && runtime.GOOS == "windows" { 15 | return x509.NewCertPool(), nil 16 | } 17 | return certpool, err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/tlsconfig/config_legacy_client_ciphers.go: -------------------------------------------------------------------------------- 1 | // +build !go1.5 2 | 3 | // Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers. 4 | // 5 | package tlsconfig 6 | 7 | import ( 8 | "crypto/tls" 9 | ) 10 | 11 | // Client TLS cipher suites (dropping CBC ciphers for client preferred suite set) 12 | var clientCipherSuites = []uint16{ 13 | tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, 14 | tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/graph_driver_data.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 | // GraphDriverData Information about a container's graph driver. 7 | // swagger:model GraphDriverData 8 | type GraphDriverData struct { 9 | 10 | // data 11 | // Required: true 12 | Data map[string]string `json:"Data"` 13 | 14 | // name 15 | // Required: true 16 | Name string `json:"Name"` 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/ioutils/temp_windows.go: -------------------------------------------------------------------------------- 1 | package ioutils // import "github.com/docker/docker/pkg/ioutils" 2 | 3 | import ( 4 | "io/ioutil" 5 | 6 | "github.com/docker/docker/pkg/longpath" 7 | ) 8 | 9 | // TempDir is the equivalent of ioutil.TempDir, except that the result is in Windows longpath format. 10 | func TempDir(dir, prefix string) (string, error) { 11 | tempDir, err := ioutil.TempDir(dir, prefix) 12 | if err != nil { 13 | return "", err 14 | } 15 | return longpath.AddPrefix(tempDir), nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/lstat_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system // import "github.com/docker/docker/pkg/system" 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Lstat takes a path to a file and returns 10 | // a system.StatT type pertaining to that file. 11 | // 12 | // Throws an error if the file does not exist 13 | func Lstat(path string) (*StatT, error) { 14 | s := &syscall.Stat_t{} 15 | if err := syscall.Lstat(path, s); err != nil { 16 | return nil, err 17 | } 18 | return fromStatT(s) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.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 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris 2 | 3 | package user 4 | 5 | import "io" 6 | 7 | func GetPasswdPath() (string, error) { 8 | return "", ErrUnsupported 9 | } 10 | 11 | func GetPasswd() (io.ReadCloser, error) { 12 | return nil, ErrUnsupported 13 | } 14 | 15 | func GetGroupPath() (string, error) { 16 | return "", ErrUnsupported 17 | } 18 | 19 | func GetGroup() (io.ReadCloser, error) { 20 | return nil, ErrUnsupported 21 | } 22 | -------------------------------------------------------------------------------- /hack/binary: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # Get rid of existing binary 5 | rm -f libcompose-cli 6 | 7 | go generate 8 | 9 | BUILDTIME=$(date --rfc-3339 ns | sed -e 's/ /T/') &> /dev/null 10 | GITCOMMIT=$(git rev-parse --short HEAD) 11 | 12 | # Build binaries 13 | go build \ 14 | -ldflags="-w -X github.com/docker/libcompose/version.GITCOMMIT=${GITCOMMIT} -X github.com/docker/libcompose/version.BUILDTIME=${BUILDTIME} -X github.com/docker/libcompose/version.SHOWWARNING=${SHOWWARNING}" \ 15 | -o bundles/libcompose-cli \ 16 | ./cli/main 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_linux.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 | package terminal 6 | 7 | // These constants are declared here, rather than importing 8 | // them from the syscall package as some syscall packages, even 9 | // on linux, for example gccgo, do not declare them. 10 | const ioctlReadTermios = 0x5401 // syscall.TCGETS 11 | const ioctlWriteTermios = 0x5402 // syscall.TCSETS 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/meminfo.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/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 | -------------------------------------------------------------------------------- /config/testdata/networks-definition.v2.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | networks: 3 | default: 4 | driver: custom-driver 5 | network1: 6 | driver: bridge 7 | driver_opts: 8 | com.docker.network.enable_ipv6: "true" 9 | ipam: 10 | driver: default 11 | config: 12 | - subnet: 172.16.238.0/24 13 | gateway: 172.16.238.1 14 | - subnet: 2001:3984:3989::/64 15 | gateway: 2001:3984:3989::1 16 | network2: 17 | external: true 18 | network3: 19 | external: 20 | name: name-of-network 21 | network3: {} 22 | -------------------------------------------------------------------------------- /integration/kill_test.go: -------------------------------------------------------------------------------- 1 | package integration 2 | 3 | import ( 4 | "fmt" 5 | 6 | . "gopkg.in/check.v1" 7 | ) 8 | 9 | func (s *CliSuite) TestKill(c *C) { 10 | p := s.ProjectFromText(c, "up", SimpleTemplate) 11 | 12 | name := fmt.Sprintf("%s_%s_1", p, "hello") 13 | 14 | cn := s.GetContainerByName(c, name) 15 | c.Assert(cn, NotNil) 16 | c.Assert(cn.State.Running, Equals, true) 17 | 18 | s.FromText(c, p, "kill", SimpleTemplate) 19 | 20 | cn = s.GetContainerByName(c, name) 21 | c.Assert(cn, NotNil) 22 | c.Assert(cn.State.Running, Equals, false) 23 | } 24 | -------------------------------------------------------------------------------- /integration/stop_test.go: -------------------------------------------------------------------------------- 1 | package integration 2 | 3 | import ( 4 | "fmt" 5 | 6 | . "gopkg.in/check.v1" 7 | ) 8 | 9 | func (s *CliSuite) TestStop(c *C) { 10 | p := s.ProjectFromText(c, "up", SimpleTemplate) 11 | 12 | name := fmt.Sprintf("%s_%s_1", p, "hello") 13 | 14 | cn := s.GetContainerByName(c, name) 15 | c.Assert(cn, NotNil) 16 | c.Assert(cn.State.Running, Equals, true) 17 | 18 | s.FromText(c, p, "stop", SimpleTemplate) 19 | 20 | cn = s.GetContainerByName(c, name) 21 | c.Assert(cn, NotNil) 22 | c.Assert(cn.State.Running, Equals, false) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/distribution/registry/api/v2/doc.go: -------------------------------------------------------------------------------- 1 | // Package v2 describes routes, urls and the error codes used in the Docker 2 | // Registry JSON HTTP API V2. In addition to declarations, descriptors are 3 | // provided for routes and error codes that can be used for implementation and 4 | // automatically generating documentation. 5 | // 6 | // Definitions here are considered to be locked down for the V2 registry api. 7 | // Any changes must be considered carefully and should not proceed without a 8 | // change proposal in docker core. 9 | package v2 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](https://godoc.org/github.com/docker/go-connections?status.svg)](https://godoc.org/github.com/docker/go-connections) 2 | 3 | # Introduction 4 | 5 | go-connections provides common package to work with network connections. 6 | 7 | ## Usage 8 | 9 | See the [docs in godoc](https://godoc.org/github.com/docker/go-connections) for examples and documentation. 10 | 11 | ## License 12 | 13 | go-connections is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full license text. 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.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 gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /project/project_pull.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/docker/libcompose/project/events" 7 | ) 8 | 9 | // Pull pulls the specified services (like docker pull). 10 | func (p *Project) Pull(ctx context.Context, services ...string) error { 11 | return p.forEach(services, wrapperAction(func(wrapper *serviceWrapper, wrappers map[string]*serviceWrapper) { 12 | wrapper.Do(nil, events.ServicePullStart, events.ServicePull, func(service Service) error { 13 | return service.Pull(ctx) 14 | }) 15 | }), nil) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/idtools/usergroupadd_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package idtools // import "github.com/docker/docker/pkg/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 | -------------------------------------------------------------------------------- /integration/start_test.go: -------------------------------------------------------------------------------- 1 | package integration 2 | 3 | import ( 4 | "fmt" 5 | 6 | . "gopkg.in/check.v1" 7 | ) 8 | 9 | func (s *CliSuite) TestStart(c *C) { 10 | p := s.ProjectFromText(c, "create", SimpleTemplate) 11 | 12 | name := fmt.Sprintf("%s_%s_1", p, "hello") 13 | 14 | cn := s.GetContainerByName(c, name) 15 | c.Assert(cn, NotNil) 16 | c.Assert(cn.State.Running, Equals, false) 17 | 18 | s.FromText(c, p, "start", SimpleTemplate) 19 | 20 | cn = s.GetContainerByName(c, name) 21 | c.Assert(cn, NotNil) 22 | c.Assert(cn.State.Running, Equals, true) 23 | } 24 | -------------------------------------------------------------------------------- /project/events/events_test.go: -------------------------------------------------------------------------------- 1 | package events 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | ) 7 | 8 | func TestEventEquality(t *testing.T) { 9 | if fmt.Sprintf("%s", ServiceStart) != "Started" || 10 | fmt.Sprintf("%v", ServiceStart) != "Started" { 11 | t.Fatalf("EventServiceStart String() doesn't work: %s %v", ServiceStart, ServiceStart) 12 | } 13 | 14 | if fmt.Sprintf("%s", ServiceStart) != fmt.Sprintf("%s", ServiceUp) { 15 | t.Fatal("Event messages do not match") 16 | } 17 | 18 | if ServiceStart == ServiceUp { 19 | t.Fatal("Events match") 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/init.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/system" 2 | 3 | import ( 4 | "syscall" 5 | "time" 6 | "unsafe" 7 | ) 8 | 9 | // Used by chtimes 10 | var maxTime time.Time 11 | 12 | func init() { 13 | // chtimes initialization 14 | if unsafe.Sizeof(syscall.Timespec{}.Nsec) == 8 { 15 | // This is a 64 bit timespec 16 | // os.Chtimes limits time to the following 17 | maxTime = time.Unix(0, 1<<63-1) 18 | } else { 19 | // This is a 32 bit timespec 20 | maxTime = time.Unix(1<<31-1, 0) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_rename.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // ContainerRename changes the name of a given container. 10 | func (cli *Client) ContainerRename(ctx context.Context, containerID, newContainerName string) error { 11 | query := url.Values{} 12 | query.Set("name", newContainerName) 13 | resp, err := cli.post(ctx, "/containers/"+containerID+"/rename", query, nil, nil) 14 | ensureReaderClosed(resp) 15 | return err 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/Azure/go-ansiterm/ground_state.go: -------------------------------------------------------------------------------- 1 | package ansiterm 2 | 3 | type groundState struct { 4 | baseState 5 | } 6 | 7 | func (gs groundState) Handle(b byte) (s state, e error) { 8 | gs.parser.context.currentChar = b 9 | 10 | nextState, err := gs.baseState.Handle(b) 11 | if nextState != nil || err != nil { 12 | return nextState, err 13 | } 14 | 15 | switch { 16 | case sliceContains(printables, b): 17 | return gs, gs.parser.print() 18 | 19 | case sliceContains(executors, b): 20 | return gs, gs.parser.execute() 21 | } 22 | 23 | return gs, nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/checkpoint_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "github.com/docker/docker/api/types" 5 | "golang.org/x/net/context" 6 | ) 7 | 8 | // CheckpointCreate creates a checkpoint from the given container with the given name 9 | func (cli *Client) CheckpointCreate(ctx context.Context, container string, options types.CheckpointCreateOptions) error { 10 | resp, err := cli.post(ctx, "/containers/"+container+"/checkpoints", nil, options, nil) 11 | ensureReaderClosed(resp) 12 | return err 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_push.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "io" 5 | 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // PluginPush pushes a plugin to a registry 10 | func (cli *Client) PluginPush(ctx context.Context, name string, registryAuth string) (io.ReadCloser, error) { 11 | headers := map[string][]string{"X-Registry-Auth": {registryAuth}} 12 | resp, err := cli.post(ctx, "/plugins/"+name+"/push", nil, nil, headers) 13 | if err != nil { 14 | return nil, err 15 | } 16 | return resp.body, nil 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/term/tc.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package term // import "github.com/docker/docker/pkg/term" 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | 9 | "golang.org/x/sys/unix" 10 | ) 11 | 12 | func tcget(fd uintptr, p *Termios) syscall.Errno { 13 | _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, uintptr(getTermios), uintptr(unsafe.Pointer(p))) 14 | return err 15 | } 16 | 17 | func tcset(fd uintptr, p *Termios) syscall.Errno { 18 | _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, setTermios, uintptr(unsafe.Pointer(p))) 19 | return err 20 | } 21 | -------------------------------------------------------------------------------- /project/project_log.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/docker/libcompose/project/events" 7 | ) 8 | 9 | // Log aggregates and prints out the logs for the specified services. 10 | func (p *Project) Log(ctx context.Context, follow bool, services ...string) error { 11 | return p.forEach(services, wrapperAction(func(wrapper *serviceWrapper, wrappers map[string]*serviceWrapper) { 12 | wrapper.Do(nil, events.NoEvent, events.NoEvent, func(service Service) error { 13 | return service.Log(ctx, follow) 14 | }) 15 | }), nil) 16 | } 17 | -------------------------------------------------------------------------------- /integration/assets/networks/network-mode.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | bridge: 5 | image: busybox 6 | command: top 7 | network_mode: bridge 8 | 9 | service: 10 | image: busybox 11 | command: top 12 | network_mode: "service:bridge" 13 | 14 | container: 15 | image: busybox 16 | command: top 17 | network_mode: "container:composetest_network_mode_container" 18 | 19 | host: 20 | image: busybox 21 | command: top 22 | network_mode: host 23 | 24 | none: 25 | image: busybox 26 | command: top 27 | network_mode: none 28 | -------------------------------------------------------------------------------- /integration/assets/networks/network-static-addresses.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | web: 5 | image: busybox 6 | command: top 7 | networks: 8 | static_test: 9 | ipv4_address: 172.16.100.100 10 | ipv6_address: fe80::1001:100 11 | 12 | networks: 13 | static_test: 14 | driver: bridge 15 | driver_opts: 16 | com.docker.network.enable_ipv6: "true" 17 | ipam: 18 | driver: default 19 | config: 20 | - subnet: 172.16.100.0/24 21 | gateway: 172.16.100.1 22 | - subnet: fe80::/64 23 | gateway: fe80::1001:1 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/image_delete_response_item.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 | // ImageDeleteResponseItem image delete response item 7 | // swagger:model ImageDeleteResponseItem 8 | type ImageDeleteResponseItem struct { 9 | 10 | // The image ID of an image that was deleted 11 | Deleted string `json:"Deleted,omitempty"` 12 | 13 | // The image ID of an image that was untagged 14 | Untagged string `json:"Untagged,omitempty"` 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,!race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/system/sysconfig_notcgo.go: -------------------------------------------------------------------------------- 1 | // +build !cgo windows 2 | 3 | package system 4 | 5 | func GetClockTicks() int { 6 | // TODO figure out a better alternative for platforms where we're missing cgo 7 | // 8 | // TODO Windows. This could be implemented using Win32 QueryPerformanceFrequency(). 9 | // https://msdn.microsoft.com/en-us/library/windows/desktop/ms644905(v=vs.85).aspx 10 | // 11 | // An example of its usage can be found here. 12 | // https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx 13 | 14 | return 100 15 | } 16 | -------------------------------------------------------------------------------- /version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | var ( 4 | // VERSION should be updated by hand at each release 5 | VERSION = "0.4.0" 6 | 7 | // GITCOMMIT will be overwritten automatically by the build system 8 | GITCOMMIT = "HEAD" 9 | 10 | // BUILDTIME will be overwritten automatically by the build system 11 | BUILDTIME = "" 12 | 13 | // SHOWWARNING might be overwritten by the build system to not show the warning 14 | SHOWWARNING = "true" 15 | ) 16 | 17 | // ShowWarning returns wether the warning should be printed or not 18 | func ShowWarning() bool { 19 | return SHOWWARNING != "false" 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_kill.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // ContainerKill terminates the container process but does not remove the container from the docker host. 10 | func (cli *Client) ContainerKill(ctx context.Context, containerID, signal string) error { 11 | query := url.Values{} 12 | query.Set("signal", signal) 13 | 14 | resp, err := cli.post(ctx, "/containers/"+containerID+"/kill", query, nil, nil) 15 | ensureReaderClosed(resp) 16 | return err 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/session.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net" 5 | "net/http" 6 | 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // DialSession returns a connection that can be used communication with daemon 11 | func (cli *Client) DialSession(ctx context.Context, proto string, meta map[string][]string) (net.Conn, error) { 12 | req, err := http.NewRequest("POST", "/session", nil) 13 | if err != nil { 14 | return nil, err 15 | } 16 | req = cli.addHeaders(req, meta) 17 | 18 | return cli.setupHijackConn(req, proto) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_disable.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // PluginDisable disables a plugin 11 | func (cli *Client) PluginDisable(ctx context.Context, name string, options types.PluginDisableOptions) error { 12 | query := url.Values{} 13 | if options.Force { 14 | query.Set("force", "1") 15 | } 16 | resp, err := cli.post(ctx, "/plugins/"+name+"/disable", query, nil, nil) 17 | ensureReaderClosed(resp) 18 | return err 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](https://godoc.org/github.com/docker/go-units?status.svg)](https://godoc.org/github.com/docker/go-units) 2 | 3 | # Introduction 4 | 5 | go-units is a library to transform human friendly measurements into machine friendly values. 6 | 7 | ## Usage 8 | 9 | See the [docs in godoc](https://godoc.org/github.com/docker/go-units) for examples and documentation. 10 | 11 | ## Copyright and license 12 | 13 | Copyright © 2015 Docker, Inc. 14 | 15 | go-units is licensed under the Apache License, Version 2.0. 16 | See [LICENSE](LICENSE) for the full text of the license. 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/plugin_interface_type.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 | // PluginInterfaceType plugin interface type 7 | // swagger:model PluginInterfaceType 8 | type PluginInterfaceType struct { 9 | 10 | // capability 11 | // Required: true 12 | Capability string `json:"Capability"` 13 | 14 | // prefix 15 | // Required: true 16 | Prefix string `json:"Prefix"` 17 | 18 | // version 19 | // Required: true 20 | Version string `json:"Version"` 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/syscall_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd 2 | 3 | package system // import "github.com/docker/docker/pkg/system" 4 | 5 | import "golang.org/x/sys/unix" 6 | 7 | // Unmount is a platform-specific helper function to call 8 | // the unmount syscall. 9 | func Unmount(dest string) error { 10 | return unix.Unmount(dest, 0) 11 | } 12 | 13 | // CommandLineToArgv should not be used on Unix. 14 | // It simply returns commandLine in the only element in the returned array. 15 | func CommandLineToArgv(commandLine string) ([]string, error) { 16 | return []string{commandLine}, nil 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/tlsconfig/config_client_ciphers.go: -------------------------------------------------------------------------------- 1 | // +build go1.5 2 | 3 | // Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers. 4 | // 5 | package tlsconfig 6 | 7 | import ( 8 | "crypto/tls" 9 | ) 10 | 11 | // Client TLS cipher suites (dropping CBC ciphers for client preferred suite set) 12 | var clientCipherSuites = []uint16{ 13 | tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, 14 | tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, 15 | tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, 16 | tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.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 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.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 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | -------------------------------------------------------------------------------- /lookup/simple_env_test.go: -------------------------------------------------------------------------------- 1 | package lookup 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestOsEnvLookup(t *testing.T) { 8 | osEnvLookup := &OsEnvLookup{} 9 | 10 | envs := osEnvLookup.Lookup("PATH", nil) 11 | if len(envs) != 1 { 12 | t.Fatalf("Expected envs to contains one element, but was %v", envs) 13 | } 14 | 15 | envs = osEnvLookup.Lookup("path", nil) 16 | if len(envs) != 0 { 17 | t.Fatalf("Expected envs to be empty, but was %v", envs) 18 | } 19 | 20 | envs = osEnvLookup.Lookup("DOES_NOT_EXIST", nil) 21 | if len(envs) != 0 { 22 | t.Fatalf("Expected envs to be empty, but was %v", envs) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_enable.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | "strconv" 6 | 7 | "github.com/docker/docker/api/types" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // PluginEnable enables a plugin 12 | func (cli *Client) PluginEnable(ctx context.Context, name string, options types.PluginEnableOptions) error { 13 | query := url.Values{} 14 | query.Set("timeout", strconv.Itoa(options.Timeout)) 15 | 16 | resp, err := cli.post(ctx, "/plugins/"+name+"/enable", query, nil, nil) 17 | ensureReaderClosed(resp) 18 | return err 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/process_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd darwin 2 | 3 | package system // import "github.com/docker/docker/pkg/system" 4 | 5 | import ( 6 | "syscall" 7 | 8 | "golang.org/x/sys/unix" 9 | ) 10 | 11 | // IsProcessAlive returns true if process with a given pid is running. 12 | func IsProcessAlive(pid int) bool { 13 | err := unix.Kill(pid, syscall.Signal(0)) 14 | if err == nil || err == unix.EPERM { 15 | return true 16 | } 17 | 18 | return false 19 | } 20 | 21 | // KillProcess force-stops a process. 22 | func KillProcess(pid int) { 23 | unix.Kill(pid, unix.SIGKILL) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/registry/config_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package registry // import "github.com/docker/docker/registry" 4 | 5 | var ( 6 | // CertsDir is the directory where certificates are stored 7 | CertsDir = "/etc/docker/certs.d" 8 | ) 9 | 10 | // cleanPath is used to ensure that a directory name is valid on the target 11 | // platform. It will be passed in something *similar* to a URL such as 12 | // https:/index.docker.io/v1. Not all platforms support directory names 13 | // which contain those characters (such as : on Windows) 14 | func cleanPath(s string) string { 15 | return s 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/NOTICE: -------------------------------------------------------------------------------- 1 | runc 2 | 3 | Copyright 2012-2015 Docker, Inc. 4 | 5 | This product includes software developed at Docker, Inc. (http://www.docker.com). 6 | 7 | The following is courtesy of our legal counsel: 8 | 9 | 10 | Use and transfer of Docker may be subject to certain restrictions by the 11 | United States and other governments. 12 | It is your responsibility to ensure that your use and/or transfer does not 13 | violate applicable laws. 14 | 15 | For more information, please see http://www.bis.doc.gov 16 | 17 | See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. 18 | -------------------------------------------------------------------------------- /project/project_start.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/docker/libcompose/project/events" 7 | ) 8 | 9 | // Start starts the specified services (like docker start). 10 | func (p *Project) Start(ctx context.Context, services ...string) error { 11 | return p.perform(events.ProjectStartStart, events.ProjectStartDone, services, wrapperAction(func(wrapper *serviceWrapper, wrappers map[string]*serviceWrapper) { 12 | wrapper.Do(wrappers, events.ServiceStartStart, events.ServiceStart, func(service Service) error { 13 | return service.Start(ctx) 14 | }) 15 | }), nil) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker-credential-helpers/credentials/helper.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | // Helper is the interface a credentials store helper must implement. 4 | type Helper interface { 5 | // Add appends credentials to the store. 6 | Add(*Credentials) error 7 | // Delete removes credentials from the store. 8 | Delete(serverURL string) error 9 | // Get retrieves credentials from the store. 10 | // It returns username and secret as strings. 11 | Get(serverURL string) (string, string, error) 12 | // List returns the stored serverURLs and their associated usernames. 13 | List() (map[string]string, error) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker-credential-helpers/secretservice/secretservice_linux.h: -------------------------------------------------------------------------------- 1 | #define SECRET_WITH_UNSTABLE 1 2 | #define SECRET_API_SUBJECT_TO_CHANGE 1 3 | #include 4 | 5 | const SecretSchema *docker_get_schema(void) G_GNUC_CONST; 6 | 7 | #define DOCKER_SCHEMA docker_get_schema() 8 | 9 | GError *add(char *label, char *server, char *username, char *secret); 10 | GError *delete(char *server); 11 | GError *get(char *server, char **username, char **secret); 12 | GError *list(char *label, char *** paths, char *** accts, unsigned int *list_l); 13 | void freeListData(char *** data, unsigned int length); 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/exitcode.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/system" 2 | 3 | import ( 4 | "fmt" 5 | "os/exec" 6 | "syscall" 7 | ) 8 | 9 | // GetExitCode returns the ExitStatus of the specified error if its type is 10 | // exec.ExitError, returns 0 and an error otherwise. 11 | func GetExitCode(err error) (int, error) { 12 | exitCode := 0 13 | if exiterr, ok := err.(*exec.ExitError); ok { 14 | if procExit, ok := exiterr.Sys().(syscall.WaitStatus); ok { 15 | return procExit.ExitStatus(), nil 16 | } 17 | } 18 | return exitCode, fmt.Errorf("failed to get exit code") 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.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 | // +build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /project/project_pause.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/docker/libcompose/project/events" 7 | ) 8 | 9 | // Pause pauses the specified services containers (like docker pause). 10 | func (p *Project) Pause(ctx context.Context, services ...string) error { 11 | return p.perform(events.ProjectPauseStart, events.ProjectPauseDone, services, wrapperAction(func(wrapper *serviceWrapper, wrappers map[string]*serviceWrapper) { 12 | wrapper.Do(nil, events.ServicePauseStart, events.ServicePause, func(service Service) error { 13 | return service.Pause(ctx) 14 | }) 15 | }), nil) 16 | } 17 | -------------------------------------------------------------------------------- /project/project_stop.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/docker/libcompose/project/events" 7 | ) 8 | 9 | // Stop stops the specified services (like docker stop). 10 | func (p *Project) Stop(ctx context.Context, timeout int, services ...string) error { 11 | return p.perform(events.ProjectStopStart, events.ProjectStopDone, services, wrapperAction(func(wrapper *serviceWrapper, wrappers map[string]*serviceWrapper) { 12 | wrapper.Do(nil, events.ServiceStopStart, events.ServiceStop, func(service Service) error { 13 | return service.Stop(ctx, timeout) 14 | }) 15 | }), nil) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/Nvveen/Gotty/types.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 Neal van Veen. All rights reserved. 2 | // Usage of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | package gotty 6 | 7 | type TermInfo struct { 8 | boolAttributes map[string]bool 9 | numAttributes map[string]int16 10 | strAttributes map[string]string 11 | // The various names of the TermInfo file. 12 | Names []string 13 | } 14 | 15 | type stacker interface { 16 | } 17 | type stack []stacker 18 | 19 | type parser struct { 20 | st stack 21 | parameters []stacker 22 | dynamicVar map[byte]stacker 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/port.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 | // Port An open port on a container 7 | // swagger:model Port 8 | type Port struct { 9 | 10 | // IP 11 | IP string `json:"IP,omitempty"` 12 | 13 | // Port on the container 14 | // Required: true 15 | PrivatePort uint16 `json:"PrivatePort"` 16 | 17 | // Port exposed on the host 18 | PublicPort uint16 `json:"PublicPort,omitempty"` 19 | 20 | // type 21 | // Required: true 22 | Type string `json:"Type"` 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_disconnect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "github.com/docker/docker/api/types" 5 | "golang.org/x/net/context" 6 | ) 7 | 8 | // NetworkDisconnect disconnects a container from an existent network in the docker host. 9 | func (cli *Client) NetworkDisconnect(ctx context.Context, networkID, containerID string, force bool) error { 10 | nd := types.NetworkDisconnect{Container: containerID, Force: force} 11 | resp, err := cli.post(ctx, "/networks/"+networkID+"/disconnect", nil, nd, nil) 12 | ensureReaderClosed(resp) 13 | return err 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/node_update.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | "strconv" 6 | 7 | "github.com/docker/docker/api/types/swarm" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // NodeUpdate updates a Node. 12 | func (cli *Client) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error { 13 | query := url.Values{} 14 | query.Set("version", strconv.FormatUint(version.Index, 10)) 15 | resp, err := cli.post(ctx, "/nodes/"+nodeID+"/update", query, node, nil) 16 | ensureReaderClosed(resp) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /project/project_kill.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/docker/libcompose/project/events" 7 | ) 8 | 9 | // Kill kills the specified services (like docker kill). 10 | func (p *Project) Kill(ctx context.Context, signal string, services ...string) error { 11 | return p.perform(events.ProjectKillStart, events.ProjectKillDone, services, wrapperAction(func(wrapper *serviceWrapper, wrappers map[string]*serviceWrapper) { 12 | wrapper.Do(nil, events.ServiceKillStart, events.ServiceKill, func(service Service) error { 13 | return service.Kill(ctx, signal) 14 | }) 15 | }), nil) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/cli/config/credentials/default_store.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | import ( 4 | "os/exec" 5 | ) 6 | 7 | // DetectDefaultStore return the default credentials store for the platform if 8 | // the store executable is available. 9 | func DetectDefaultStore(store string) string { 10 | platformDefault := defaultCredentialsStore() 11 | 12 | // user defined or no default for platform 13 | if store != "" || platformDefault == "" { 14 | return store 15 | } 16 | 17 | if _, err := exec.LookPath(remoteCredentialsPrefix + platformDefault); err == nil { 18 | return platformDefault 19 | } 20 | return "" 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/node_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types" 7 | 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // NodeRemove removes a Node. 12 | func (cli *Client) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error { 13 | query := url.Values{} 14 | if options.Force { 15 | query.Set("force", "1") 16 | } 17 | 18 | resp, err := cli.delete(ctx, "/nodes/"+nodeID, query, nil) 19 | ensureReaderClosed(resp) 20 | return wrapResponseError(err, resp, "node", nodeID) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // PluginRemove removes a plugin 11 | func (cli *Client) PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error { 12 | query := url.Values{} 13 | if options.Force { 14 | query.Set("force", "1") 15 | } 16 | 17 | resp, err := cli.delete(ctx, "/plugins/"+name, query, nil) 18 | ensureReaderClosed(resp) 19 | return wrapResponseError(err, resp, "plugin", name) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/env_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 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 | // Windows environment variables. 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | func Getenv(key string) (value string, found bool) { 12 | return syscall.Getenv(key) 13 | } 14 | 15 | func Setenv(key, value string) error { 16 | return syscall.Setenv(key, value) 17 | } 18 | 19 | func Clearenv() { 20 | syscall.Clearenv() 21 | } 22 | 23 | func Environ() []string { 24 | return syscall.Environ() 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/fileutils/fileutils_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd 2 | 3 | package fileutils // import "github.com/docker/docker/pkg/fileutils" 4 | 5 | import ( 6 | "fmt" 7 | "io/ioutil" 8 | "os" 9 | 10 | "github.com/sirupsen/logrus" 11 | ) 12 | 13 | // GetTotalUsedFds Returns the number of used File Descriptors by 14 | // reading it via /proc filesystem. 15 | func GetTotalUsedFds() int { 16 | if fds, err := ioutil.ReadDir(fmt.Sprintf("/proc/%d/fd", os.Getpid())); err != nil { 17 | logrus.Errorf("Error opening /proc/%d/fd: %s", os.Getpid(), err) 18 | } else { 19 | return len(fds) 20 | } 21 | return -1 22 | } 23 | -------------------------------------------------------------------------------- /project/project_unpause.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/docker/libcompose/project/events" 7 | ) 8 | 9 | // Unpause pauses the specified services containers (like docker pause). 10 | func (p *Project) Unpause(ctx context.Context, services ...string) error { 11 | return p.perform(events.ProjectUnpauseStart, events.ProjectUnpauseDone, services, wrapperAction(func(wrapper *serviceWrapper, wrappers map[string]*serviceWrapper) { 12 | wrapper.Do(nil, events.ServiceUnpauseStart, events.ServiceUnpause, func(service Service) error { 13 | return service.Unpause(ctx) 14 | }) 15 | }), nil) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/container_update.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerUpdateOKBody OK response to ContainerUpdate operation 11 | // swagger:model ContainerUpdateOKBody 12 | type ContainerUpdateOKBody struct { 13 | 14 | // warnings 15 | // Required: true 16 | Warnings []string `json:"Warnings"` 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/plugin_env.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 | // PluginEnv plugin env 7 | // swagger:model PluginEnv 8 | type PluginEnv struct { 9 | 10 | // description 11 | // Required: true 12 | Description string `json:"Description"` 13 | 14 | // name 15 | // Required: true 16 | Name string `json:"Name"` 17 | 18 | // settable 19 | // Required: true 20 | Settable []string `json:"Settable"` 21 | 22 | // value 23 | // Required: true 24 | Value *string `json:"Value"` 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/stat_linux.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/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: s.Mode, 9 | uid: s.Uid, 10 | gid: s.Gid, 11 | rdev: s.Rdev, 12 | mtim: s.Mtim}, nil 13 | } 14 | 15 | // FromStatT converts a syscall.Stat_t type to a system.Stat_t type 16 | // This is exposed on Linux as pkg/archive/changes uses it. 17 | func FromStatT(s *syscall.Stat_t) (*StatT, error) { 18 | return fromStatT(s) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker-credential-helpers/osxkeychain/osxkeychain_darwin.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | struct Server { 4 | SecProtocolType proto; 5 | char *host; 6 | char *path; 7 | unsigned int port; 8 | }; 9 | 10 | char *keychain_add(struct Server *server, char *label, char *username, char *secret); 11 | char *keychain_get(struct Server *server, unsigned int *username_l, char **username, unsigned int *secret_l, char **secret); 12 | char *keychain_delete(struct Server *server); 13 | char *keychain_list(char *credsLabel, char *** data, char *** accts, unsigned int *list_l); 14 | void freeListData(char *** data, unsigned int length); -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types/swarm" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // SwarmInspect inspects the swarm. 11 | func (cli *Client) SwarmInspect(ctx context.Context) (swarm.Swarm, error) { 12 | serverResp, err := cli.get(ctx, "/swarm", nil, nil) 13 | if err != nil { 14 | return swarm.Swarm{}, err 15 | } 16 | 17 | var response swarm.Swarm 18 | err = json.NewDecoder(serverResp.body).Decode(&response) 19 | ensureReaderClosed(serverResp) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/plugin_device.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 | // PluginDevice plugin device 7 | // swagger:model PluginDevice 8 | type PluginDevice struct { 9 | 10 | // description 11 | // Required: true 12 | Description string `json:"Description"` 13 | 14 | // name 15 | // Required: true 16 | Name string `json:"Name"` 17 | 18 | // path 19 | // Required: true 20 | Path *string `json:"Path"` 21 | 22 | // settable 23 | // Required: true 24 | Settable []string `json:"Settable"` 25 | } 26 | -------------------------------------------------------------------------------- /integration/restart_test.go: -------------------------------------------------------------------------------- 1 | package integration 2 | 3 | import ( 4 | "fmt" 5 | 6 | . "gopkg.in/check.v1" 7 | ) 8 | 9 | func (s *CliSuite) TestRestart(c *C) { 10 | p := s.ProjectFromText(c, "up", SimpleTemplate) 11 | 12 | name := fmt.Sprintf("%s_%s_1", p, "hello") 13 | cn := s.GetContainerByName(c, name) 14 | c.Assert(cn, NotNil) 15 | 16 | c.Assert(cn.State.Running, Equals, true) 17 | time := cn.State.StartedAt 18 | 19 | s.FromText(c, p, "restart", SimpleTemplate) 20 | 21 | cn = s.GetContainerByName(c, name) 22 | c.Assert(cn, NotNil) 23 | c.Assert(cn.State.Running, Equals, true) 24 | 25 | c.Assert(time, Not(Equals), cn.State.StartedAt) 26 | } 27 | -------------------------------------------------------------------------------- /project/project_ps.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // Ps list containers for the specified services. 6 | func (p *Project) Ps(ctx context.Context, services ...string) (InfoSet, error) { 7 | allInfo := InfoSet{} 8 | 9 | if len(services) == 0 { 10 | services = p.ServiceConfigs.Keys() 11 | } 12 | 13 | for _, name := range services { 14 | 15 | service, err := p.CreateService(name) 16 | if err != nil { 17 | return nil, err 18 | } 19 | 20 | info, err := service.Info(ctx) 21 | if err != nil { 22 | return nil, err 23 | } 24 | 25 | allInfo = append(allInfo, info...) 26 | } 27 | return allInfo, nil 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_export.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "io" 5 | "net/url" 6 | 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ContainerExport retrieves the raw contents of a container 11 | // and returns them as an io.ReadCloser. It's up to the caller 12 | // to close the stream. 13 | func (cli *Client) ContainerExport(ctx context.Context, containerID string) (io.ReadCloser, error) { 14 | serverResp, err := cli.get(ctx, "/containers/"+containerID+"/export", url.Values{}, nil) 15 | if err != nil { 16 | return nil, err 17 | } 18 | 19 | return serverResp.body, nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_init.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types/swarm" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // SwarmInit initializes the swarm. 11 | func (cli *Client) SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error) { 12 | serverResp, err := cli.post(ctx, "/swarm/init", nil, req, nil) 13 | if err != nil { 14 | return "", err 15 | } 16 | 17 | var response string 18 | err = json.NewDecoder(serverResp.body).Decode(&response) 19 | ensureReaderClosed(serverResp) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/kr/pty/README.md: -------------------------------------------------------------------------------- 1 | # pty 2 | 3 | Pty is a Go package for using unix pseudo-terminals. 4 | 5 | ## Install 6 | 7 | go get github.com/kr/pty 8 | 9 | ## Example 10 | 11 | ```go 12 | package main 13 | 14 | import ( 15 | "github.com/kr/pty" 16 | "io" 17 | "os" 18 | "os/exec" 19 | ) 20 | 21 | func main() { 22 | c := exec.Command("grep", "--color=auto", "bar") 23 | f, err := pty.Start(c) 24 | if err != nil { 25 | panic(err) 26 | } 27 | 28 | go func() { 29 | f.Write([]byte("foo\n")) 30 | f.Write([]byte("bar\n")) 31 | f.Write([]byte("baz\n")) 32 | f.Write([]byte{4}) // EOT 33 | }() 34 | io.Copy(os.Stdout, f) 35 | } 36 | ``` 37 | -------------------------------------------------------------------------------- /project/project_restart.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/docker/libcompose/project/events" 7 | ) 8 | 9 | // Restart restarts the specified services (like docker restart). 10 | func (p *Project) Restart(ctx context.Context, timeout int, services ...string) error { 11 | return p.perform(events.ProjectRestartStart, events.ProjectRestartDone, services, wrapperAction(func(wrapper *serviceWrapper, wrappers map[string]*serviceWrapper) { 12 | wrapper.Do(wrappers, events.ServiceRestartStart, events.ServiceRestart, func(service Service) error { 13 | return service.Restart(ctx, timeout) 14 | }) 15 | }), nil) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_save.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "io" 5 | "net/url" 6 | 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ImageSave retrieves one or more images from the docker host as an io.ReadCloser. 11 | // It's up to the caller to store the images and close the stream. 12 | func (cli *Client) ImageSave(ctx context.Context, imageIDs []string) (io.ReadCloser, error) { 13 | query := url.Values{ 14 | "names": imageIDs, 15 | } 16 | 17 | resp, err := cli.get(ctx, "/images/get", query, nil) 18 | if err != nil { 19 | return nil, err 20 | } 21 | return resp.body, nil 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/version.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ServerVersion returns information of the docker client and server host. 11 | func (cli *Client) ServerVersion(ctx context.Context) (types.Version, error) { 12 | resp, err := cli.get(ctx, "/version", nil, nil) 13 | if err != nil { 14 | return types.Version{}, err 15 | } 16 | 17 | var server types.Version 18 | err = json.NewDecoder(resp.body).Decode(&server) 19 | ensureReaderClosed(resp) 20 | return server, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_386.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Setuid sets the uid of the calling thread to the specified uid. 10 | func Setuid(uid int) (err error) { 11 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETUID32, uintptr(uid), 0, 0) 12 | if e1 != 0 { 13 | err = e1 14 | } 15 | return 16 | } 17 | 18 | // Setgid sets the gid of the calling thread to the specified gid. 19 | func Setgid(gid int) (err error) { 20 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETGID32, uintptr(gid), 0, 0) 21 | if e1 != 0 { 22 | err = e1 23 | } 24 | return 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_arm.go: -------------------------------------------------------------------------------- 1 | // +build linux,arm 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Setuid sets the uid of the calling thread to the specified uid. 10 | func Setuid(uid int) (err error) { 11 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETUID32, uintptr(uid), 0, 0) 12 | if e1 != 0 { 13 | err = e1 14 | } 15 | return 16 | } 17 | 18 | // Setgid sets the gid of the calling thread to the specified gid. 19 | func Setgid(gid int) (err error) { 20 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETGID32, uintptr(gid), 0, 0) 21 | if e1 != 0 { 22 | err = e1 23 | } 24 | return 25 | } 26 | -------------------------------------------------------------------------------- /project/volume.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/docker/libcompose/config" 7 | ) 8 | 9 | // Volumes defines the methods a libcompose volume aggregate should define. 10 | type Volumes interface { 11 | Initialize(ctx context.Context) error 12 | Remove(ctx context.Context) error 13 | } 14 | 15 | // VolumesFactory is an interface factory to create Volumes object for the specified 16 | // configurations (service, volumes, …) 17 | type VolumesFactory interface { 18 | Create(projectName string, volumeConfigs map[string]*config.VolumeConfig, serviceConfigs *config.ServiceConfigs, volumeEnabled bool) (Volumes, error) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/blkiodev/blkio.go: -------------------------------------------------------------------------------- 1 | package blkiodev // import "github.com/docker/docker/api/types/blkiodev" 2 | 3 | import "fmt" 4 | 5 | // WeightDevice is a structure that holds device:weight pair 6 | type WeightDevice struct { 7 | Path string 8 | Weight uint16 9 | } 10 | 11 | func (w *WeightDevice) String() string { 12 | return fmt.Sprintf("%s:%d", w.Path, w.Weight) 13 | } 14 | 15 | // ThrottleDevice is a structure that holds device:rate_per_second pair 16 | type ThrottleDevice struct { 17 | Path string 18 | Rate uint64 19 | } 20 | 21 | func (t *ThrottleDevice) String() string { 22 | return fmt.Sprintf("%s:%d", t.Path, t.Rate) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option go_package = "github.com/docker/docker/api/types/swarm/runtime;runtime"; 4 | 5 | // PluginSpec defines the base payload which clients can specify for creating 6 | // a service with the plugin runtime. 7 | message PluginSpec { 8 | string name = 1; 9 | string remote = 2; 10 | repeated PluginPrivilege privileges = 3; 11 | bool disabled = 4; 12 | } 13 | 14 | // PluginPrivilege describes a permission the user has to accept 15 | // upon installing a plugin. 16 | message PluginPrivilege { 17 | string name = 1; 18 | string description = 2; 19 | repeated string value = 3; 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/fileutils/fileutils_darwin.go: -------------------------------------------------------------------------------- 1 | package fileutils // import "github.com/docker/docker/pkg/fileutils" 2 | 3 | import ( 4 | "os" 5 | "os/exec" 6 | "strconv" 7 | "strings" 8 | ) 9 | 10 | // GetTotalUsedFds returns the number of used File Descriptors by 11 | // executing `lsof -p PID` 12 | func GetTotalUsedFds() int { 13 | pid := os.Getpid() 14 | 15 | cmd := exec.Command("lsof", "-p", strconv.Itoa(pid)) 16 | 17 | output, err := cmd.CombinedOutput() 18 | if err != nil { 19 | return -1 20 | } 21 | 22 | outputStr := strings.TrimSpace(string(output)) 23 | 24 | fds := strings.Split(outputStr, "\n") 25 | 26 | return len(fds) - 1 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/nsenter/nsenter_gccgo.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 | 14 | // AlwaysFalse is here to stay false 15 | // (and be exported so the compiler doesn't optimize out its reference) 16 | var AlwaysFalse bool 17 | 18 | func init() { 19 | if AlwaysFalse { 20 | // by referencing this C init() in a noop test, it will ensure the compiler 21 | // links in the C function. 22 | // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65134 23 | C.init() 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /config/testdata/networks.v2.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | simple1: 4 | image: myimage 5 | networks: 6 | - network1 7 | - network2 8 | simple2: 9 | image: myimage 10 | networks: 11 | network1: 12 | aliases: 13 | - alias1 14 | - alias3 15 | network2: 16 | aliases: 17 | - alias2 18 | simple3: 19 | image: myimage 20 | networks: 21 | network1: 22 | ipv4_address: 172.16.238.10 23 | ipv6_address: 2001:3984:3989::10 24 | simple4: 25 | image: myimage 26 | networks: ["network1"] 27 | simple5: 28 | image: myimage 29 | networks: ["network1", "network2"] 30 | -------------------------------------------------------------------------------- /project/network.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/docker/libcompose/config" 7 | ) 8 | 9 | // Networks defines the methods a libcompose network aggregate should define. 10 | type Networks interface { 11 | Initialize(ctx context.Context) error 12 | Remove(ctx context.Context) error 13 | } 14 | 15 | // NetworksFactory is an interface factory to create Networks object for the specified 16 | // configurations (service, networks, …) 17 | type NetworksFactory interface { 18 | Create(projectName string, networkConfigs map[string]*config.NetworkConfig, serviceConfigs *config.ServiceConfigs, networkEnabled bool) (Networks, error) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/kr/pty/run.go: -------------------------------------------------------------------------------- 1 | package pty 2 | 3 | import ( 4 | "os" 5 | "os/exec" 6 | "syscall" 7 | ) 8 | 9 | // Start assigns a pseudo-terminal tty os.File to c.Stdin, c.Stdout, 10 | // and c.Stderr, calls c.Start, and returns the File of the tty's 11 | // corresponding pty. 12 | func Start(c *exec.Cmd) (pty *os.File, err error) { 13 | pty, tty, err := Open() 14 | if err != nil { 15 | return nil, err 16 | } 17 | defer tty.Close() 18 | c.Stdout = tty 19 | c.Stdin = tty 20 | c.Stderr = tty 21 | c.SysProcAttr = &syscall.SysProcAttr{Setctty: true, Setsid: true} 22 | err = c.Start() 23 | if err != nil { 24 | pty.Close() 25 | return nil, err 26 | } 27 | return pty, err 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/cli/config/credentials/credentials.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | import ( 4 | "github.com/docker/docker/api/types" 5 | ) 6 | 7 | // Store is the interface that any credentials store must implement. 8 | type Store interface { 9 | // Erase removes credentials from the store for a given server. 10 | Erase(serverAddress string) error 11 | // Get retrieves credentials from the store for a given server. 12 | Get(serverAddress string) (types.AuthConfig, error) 13 | // GetAll retrieves all the credentials from the store. 14 | GetAll() (map[string]types.AuthConfig, error) 15 | // Store saves credentials in the store. 16 | Store(authConfig types.AuthConfig) error 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/distribution/context/version.go: -------------------------------------------------------------------------------- 1 | package context 2 | 3 | // WithVersion stores the application version in the context. The new context 4 | // gets a logger to ensure log messages are marked with the application 5 | // version. 6 | func WithVersion(ctx Context, version string) Context { 7 | ctx = WithValue(ctx, "version", version) 8 | // push a new logger onto the stack 9 | return WithLogger(ctx, GetLogger(ctx, "version")) 10 | } 11 | 12 | // GetVersion returns the application version from the context. An empty 13 | // string may returned if the version was not set on the context. 14 | func GetVersion(ctx Context) string { 15 | return GetStringValue(ctx, "version") 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 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 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | -------------------------------------------------------------------------------- /example/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | 6 | "golang.org/x/net/context" 7 | 8 | "github.com/docker/libcompose/docker" 9 | "github.com/docker/libcompose/docker/ctx" 10 | "github.com/docker/libcompose/project" 11 | "github.com/docker/libcompose/project/options" 12 | ) 13 | 14 | func main() { 15 | project, err := docker.NewProject(&ctx.Context{ 16 | Context: project.Context{ 17 | ComposeFiles: []string{"docker-compose.yml"}, 18 | ProjectName: "yeah-compose", 19 | }, 20 | }, nil) 21 | 22 | if err != nil { 23 | log.Fatal(err) 24 | } 25 | 26 | err = project.Up(context.Background(), options.Up{}) 27 | 28 | if err != nil { 29 | log.Fatal(err) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/errdefs/doc.go: -------------------------------------------------------------------------------- 1 | // Package errdefs defines a set of error interfaces that packages should use for communicating classes of errors. 2 | // Errors that cross the package boundary should implement one (and only one) of these interfaces. 3 | // 4 | // Packages should not reference these interfaces directly, only implement them. 5 | // To check if a particular error implements one of these interfaces, there are helper 6 | // functions provided (e.g. `Is`) which can be used rather than asserting the interfaces directly. 7 | // If you must assert on these interfaces, be sure to check the causal chain (`err.Cause()`). 8 | package errdefs // import "github.com/docker/docker/errdefs" 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | -------------------------------------------------------------------------------- /project/project_delete.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/docker/libcompose/project/events" 7 | "github.com/docker/libcompose/project/options" 8 | ) 9 | 10 | // Delete removes the specified services (like docker rm). 11 | func (p *Project) Delete(ctx context.Context, options options.Delete, services ...string) error { 12 | return p.perform(events.ProjectDeleteStart, events.ProjectDeleteDone, services, wrapperAction(func(wrapper *serviceWrapper, wrappers map[string]*serviceWrapper) { 13 | wrapper.Do(nil, events.ServiceDeleteStart, events.ServiceDelete, func(service Service) error { 14 | return service.Delete(ctx, options) 15 | }) 16 | }), nil) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/volume_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types/versions" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // VolumeRemove removes a volume from the docker host. 11 | func (cli *Client) VolumeRemove(ctx context.Context, volumeID string, force bool) error { 12 | query := url.Values{} 13 | if versions.GreaterThanOrEqualTo(cli.version, "1.25") { 14 | if force { 15 | query.Set("force", "1") 16 | } 17 | } 18 | resp, err := cli.delete(ctx, "/volumes/"+volumeID, query, nil) 19 | ensureReaderClosed(resp) 20 | return wrapResponseError(err, resp, "volume", volumeID) 21 | } 22 | -------------------------------------------------------------------------------- /cli/docker/app/factory.go: -------------------------------------------------------------------------------- 1 | package app 2 | 3 | import ( 4 | "github.com/docker/libcompose/cli/logger" 5 | "github.com/docker/libcompose/docker" 6 | "github.com/docker/libcompose/docker/ctx" 7 | "github.com/docker/libcompose/project" 8 | "github.com/urfave/cli" 9 | ) 10 | 11 | // ProjectFactory is a struct that holds the app.ProjectFactory implementation. 12 | type ProjectFactory struct { 13 | } 14 | 15 | // Create implements ProjectFactory.Create using docker client. 16 | func (p *ProjectFactory) Create(c *cli.Context) (project.APIProject, error) { 17 | context := &ctx.Context{} 18 | context.LoggerFactory = logger.NewColorLoggerFactory() 19 | Populate(context, c) 20 | return docker.NewProject(context, nil) 21 | } 22 | -------------------------------------------------------------------------------- /cli/logger/colors.go: -------------------------------------------------------------------------------- 1 | package logger 2 | 3 | import "fmt" 4 | 5 | var ( 6 | colorPrefix = make(chan string) 7 | ) 8 | 9 | func generateColors() { 10 | i := 0 11 | colorOrder := []string{ 12 | "36", // cyan 13 | "33", // yellow 14 | "32", // green 15 | "35", // magenta 16 | "31", // red 17 | "34", // blue 18 | "36;1", // intense cyan 19 | "33;1", // intense yellow 20 | "32;1", // intense green 21 | "35;1", // intense magenta 22 | "31;1", // intense red 23 | "34;1", // intense blue 24 | } 25 | 26 | for { 27 | colorPrefix <- fmt.Sprintf("\033[%sm%%s |\033[0m", colorOrder[i]) 28 | i = (i + 1) % len(colorOrder) 29 | } 30 | } 31 | 32 | func init() { 33 | go generateColors() 34 | } 35 | -------------------------------------------------------------------------------- /project/project_build.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/docker/libcompose/project/events" 7 | "github.com/docker/libcompose/project/options" 8 | ) 9 | 10 | // Build builds the specified services (like docker build). 11 | func (p *Project) Build(ctx context.Context, buildOptions options.Build, services ...string) error { 12 | return p.perform(events.ProjectBuildStart, events.ProjectBuildDone, services, wrapperAction(func(wrapper *serviceWrapper, wrappers map[string]*serviceWrapper) { 13 | wrapper.Do(wrappers, events.ServiceBuildStart, events.ServiceBuild, func(service Service) error { 14 | return service.Build(ctx, buildOptions) 15 | }) 16 | }), nil) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_connect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "github.com/docker/docker/api/types" 5 | "github.com/docker/docker/api/types/network" 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // NetworkConnect connects a container to an existent network in the docker host. 10 | func (cli *Client) NetworkConnect(ctx context.Context, networkID, containerID string, config *network.EndpointSettings) error { 11 | nc := types.NetworkConnect{ 12 | Container: containerID, 13 | EndpointConfig: config, 14 | } 15 | resp, err := cli.post(ctx, "/networks/"+networkID+"/connect", nil, nc, nil) 16 | ensureReaderClosed(resp) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/cli.go: -------------------------------------------------------------------------------- 1 | // Package cli provides a minimal framework for creating and organizing command line 2 | // Go applications. cli is designed to be easy to understand and write, the most simple 3 | // cli application can be written as follows: 4 | // func main() { 5 | // cli.NewApp().Run(os.Args) 6 | // } 7 | // 8 | // Of course this application does not do much, so let's make this an actual application: 9 | // func main() { 10 | // app := cli.NewApp() 11 | // app.Name = "greet" 12 | // app.Usage = "say a greeting" 13 | // app.Action = func(c *cli.Context) error { 14 | // println("Greetings") 15 | // } 16 | // 17 | // app.Run(os.Args) 18 | // } 19 | package cli 20 | -------------------------------------------------------------------------------- /project/project_events.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/docker/libcompose/project/events" 7 | ) 8 | 9 | // Events listen for real time events from containers (of the project). 10 | func (p *Project) Events(ctx context.Context, services ...string) (chan events.ContainerEvent, error) { 11 | events := make(chan events.ContainerEvent) 12 | if len(services) == 0 { 13 | services = p.ServiceConfigs.Keys() 14 | } 15 | // FIXME(vdemeester) handle errors (chan) here 16 | for _, service := range services { 17 | s, err := p.CreateService(service) 18 | if err != nil { 19 | return nil, err 20 | } 21 | go s.Events(ctx, events) 22 | } 23 | return events, nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/registry/config_windows.go: -------------------------------------------------------------------------------- 1 | package registry // import "github.com/docker/docker/registry" 2 | 3 | import ( 4 | "os" 5 | "path/filepath" 6 | "strings" 7 | ) 8 | 9 | // CertsDir is the directory where certificates are stored 10 | var CertsDir = os.Getenv("programdata") + `\docker\certs.d` 11 | 12 | // cleanPath is used to ensure that a directory name is valid on the target 13 | // platform. It will be passed in something *similar* to a URL such as 14 | // https:\index.docker.io\v1. Not all platforms support directory names 15 | // which contain those characters (such as : on Windows) 16 | func cleanPath(s string) string { 17 | return filepath.FromSlash(strings.Replace(s, ":", "", -1)) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go: -------------------------------------------------------------------------------- 1 | // +build linux,arm64 linux,amd64 linux,ppc linux,ppc64 linux,ppc64le linux,s390x 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // Setuid sets the uid of the calling thread to the specified uid. 10 | func Setuid(uid int) (err error) { 11 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETUID, uintptr(uid), 0, 0) 12 | if e1 != 0 { 13 | err = e1 14 | } 15 | return 16 | } 17 | 18 | // Setgid sets the gid of the calling thread to the specified gid. 19 | func Setgid(gid int) (err error) { 20 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETGID, uintptr(gid), 0, 0) 21 | if e1 != 0 { 22 | err = e1 23 | } 24 | return 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 2 | 3 | package user 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | // Unix-specific path to the passwd and group formatted files. 11 | const ( 12 | unixPasswdPath = "/etc/passwd" 13 | unixGroupPath = "/etc/group" 14 | ) 15 | 16 | func GetPasswdPath() (string, error) { 17 | return unixPasswdPath, nil 18 | } 19 | 20 | func GetPasswd() (io.ReadCloser, error) { 21 | return os.Open(unixPasswdPath) 22 | } 23 | 24 | func GetGroupPath() (string, error) { 25 | return unixGroupPath, nil 26 | } 27 | 28 | func GetGroup() (io.ReadCloser, error) { 29 | return os.Open(unixGroupPath) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/README.md: -------------------------------------------------------------------------------- 1 | # sys 2 | 3 | This repository holds supplemental Go packages for low-level interactions with 4 | the operating system. 5 | 6 | ## Download/Install 7 | 8 | The easiest way to install is to run `go get -u golang.org/x/sys`. You can 9 | also manually git clone the repository to `$GOPATH/src/golang.org/x/sys`. 10 | 11 | ## Report Issues / Send Patches 12 | 13 | This repository uses Gerrit for code changes. To learn how to submit changes to 14 | this repository, see https://golang.org/doc/contribute.html. 15 | 16 | The main issue tracker for the sys repository is located at 17 | https://github.com/golang/go/issues. Prefix your issue with "x/sys:" in the 18 | subject line, so it is easy to find. 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm64.s: -------------------------------------------------------------------------------- 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 linux 6 | // +build arm64 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | B syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | B syscall·RawSyscall6(SB) 25 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /project/project_port.go: -------------------------------------------------------------------------------- 1 | package project 2 | 3 | import ( 4 | "fmt" 5 | 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // Port returns the public port for a port binding of the specified service. 10 | func (p *Project) Port(ctx context.Context, index int, protocol, serviceName, privatePort string) (string, error) { 11 | service, err := p.CreateService(serviceName) 12 | if err != nil { 13 | return "", err 14 | } 15 | 16 | containers, err := service.Containers(ctx) 17 | if err != nil { 18 | return "", err 19 | } 20 | 21 | if index < 1 || index > len(containers) { 22 | return "", fmt.Errorf("Invalid index %d", index) 23 | } 24 | 25 | return containers[index-1].Port(ctx, fmt.Sprintf("%s/%s", privatePort, protocol)) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_get_unlock_key.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // SwarmGetUnlockKey retrieves the swarm's unlock key. 11 | func (cli *Client) SwarmGetUnlockKey(ctx context.Context) (types.SwarmUnlockKeyResponse, error) { 12 | serverResp, err := cli.get(ctx, "/swarm/unlockkey", nil, nil) 13 | if err != nil { 14 | return types.SwarmUnlockKeyResponse{}, err 15 | } 16 | 17 | var response types.SwarmUnlockKeyResponse 18 | err = json.NewDecoder(serverResp.body).Decode(&response) 19 | ensureReaderClosed(serverResp) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/go-digest/digester.go: -------------------------------------------------------------------------------- 1 | package digest 2 | 3 | import "hash" 4 | 5 | // Digester calculates the digest of written data. Writes should go directly 6 | // to the return value of Hash, while calling Digest will return the current 7 | // value of the digest. 8 | type Digester interface { 9 | Hash() hash.Hash // provides direct access to underlying hash instance. 10 | Digest() Digest 11 | } 12 | 13 | // digester provides a simple digester definition that embeds a hasher. 14 | type digester struct { 15 | alg Algorithm 16 | hash hash.Hash 17 | } 18 | 19 | func (d *digester) Hash() hash.Hash { 20 | return d.hash 21 | } 22 | 23 | func (d *digester) Digest() Digest { 24 | return NewDigest(d.alg, d.hash) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/cli/NOTICE: -------------------------------------------------------------------------------- 1 | Docker 2 | Copyright 2012-2017 Docker, Inc. 3 | 4 | This product includes software developed at Docker, Inc. (https://www.docker.com). 5 | 6 | This product contains software (https://github.com/kr/pty) developed 7 | by Keith Rarick, licensed under the MIT License. 8 | 9 | The following is courtesy of our legal counsel: 10 | 11 | 12 | Use and transfer of Docker may be subject to certain restrictions by the 13 | United States and other governments. 14 | It is your responsibility to ensure that your use and/or transfer does not 15 | violate applicable laws. 16 | 17 | For more information, please see https://www.bis.doc.gov 18 | 19 | See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/NOTICE: -------------------------------------------------------------------------------- 1 | Docker 2 | Copyright 2012-2017 Docker, Inc. 3 | 4 | This product includes software developed at Docker, Inc. (https://www.docker.com). 5 | 6 | This product contains software (https://github.com/kr/pty) developed 7 | by Keith Rarick, licensed under the MIT License. 8 | 9 | The following is courtesy of our legal counsel: 10 | 11 | 12 | Use and transfer of Docker may be subject to certain restrictions by the 13 | United States and other governments. 14 | It is your responsibility to ensure that your use and/or transfer does not 15 | violate applicable laws. 16 | 17 | For more information, please see https://www.bis.doc.gov 18 | 19 | See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/checkpoint_delete.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // CheckpointDelete deletes the checkpoint with the given name from the given container 11 | func (cli *Client) CheckpointDelete(ctx context.Context, containerID string, options types.CheckpointDeleteOptions) error { 12 | query := url.Values{} 13 | if options.CheckpointDir != "" { 14 | query.Set("dir", options.CheckpointDir) 15 | } 16 | 17 | resp, err := cli.delete(ctx, "/containers/"+containerID+"/checkpoints/"+options.CheckpointID, query, nil) 18 | ensureReaderClosed(resp) 19 | return err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/volume_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types" 7 | volumetypes "github.com/docker/docker/api/types/volume" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // VolumeCreate creates a volume in the docker host. 12 | func (cli *Client) VolumeCreate(ctx context.Context, options volumetypes.VolumesCreateBody) (types.Volume, error) { 13 | var volume types.Volume 14 | resp, err := cli.post(ctx, "/volumes/create", nil, options, nil) 15 | if err != nil { 16 | return volume, err 17 | } 18 | err = json.NewDecoder(resp.body).Decode(&volume) 19 | ensureReaderClosed(resp) 20 | return volume, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/mount/flags_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount // import "github.com/docker/docker/pkg/mount" 4 | 5 | // These flags are unsupported. 6 | const ( 7 | BIND = 0 8 | DIRSYNC = 0 9 | MANDLOCK = 0 10 | NOATIME = 0 11 | NODEV = 0 12 | NODIRATIME = 0 13 | NOEXEC = 0 14 | NOSUID = 0 15 | UNBINDABLE = 0 16 | RUNBINDABLE = 0 17 | PRIVATE = 0 18 | RPRIVATE = 0 19 | SHARED = 0 20 | RSHARED = 0 21 | SLAVE = 0 22 | RSLAVE = 0 23 | RBIND = 0 24 | RELATIME = 0 25 | RELATIVE = 0 26 | REMOUNT = 0 27 | STRICTATIME = 0 28 | SYNCHRONOUS = 0 29 | RDONLY = 0 30 | mntDetach = 0 31 | ) 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/registry/errors.go: -------------------------------------------------------------------------------- 1 | package registry // import "github.com/docker/docker/registry" 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/distribution/registry/api/errcode" 7 | "github.com/docker/docker/errdefs" 8 | ) 9 | 10 | type notFoundError string 11 | 12 | func (e notFoundError) Error() string { 13 | return string(e) 14 | } 15 | 16 | func (notFoundError) NotFound() {} 17 | 18 | func translateV2AuthError(err error) error { 19 | switch e := err.(type) { 20 | case *url.Error: 21 | switch e2 := e.Err.(type) { 22 | case errcode.Error: 23 | switch e2.Code { 24 | case errcode.ErrorCodeUnauthorized: 25 | return errdefs.Unauthorized(err) 26 | } 27 | } 28 | } 29 | 30 | return err 31 | } 32 | -------------------------------------------------------------------------------- /project/options/types_test.go: -------------------------------------------------------------------------------- 1 | package options 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestImageType(t *testing.T) { 8 | cases := []struct { 9 | imageType string 10 | valid bool 11 | }{ 12 | { 13 | imageType: "", 14 | valid: true, 15 | }, 16 | { 17 | imageType: " ", 18 | valid: false, 19 | }, 20 | { 21 | imageType: "hello", 22 | valid: false, 23 | }, 24 | { 25 | imageType: "local", 26 | valid: true, 27 | }, 28 | { 29 | imageType: "all", 30 | valid: true, 31 | }, 32 | } 33 | for _, c := range cases { 34 | i := ImageType(c.imageType) 35 | if i.Valid() != c.valid { 36 | t.Errorf("expected %v, got %v, for %v", c.valid, i.Valid(), c) 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/config_update.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | "strconv" 6 | 7 | "github.com/docker/docker/api/types/swarm" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ConfigUpdate attempts to update a Config 12 | func (cli *Client) ConfigUpdate(ctx context.Context, id string, version swarm.Version, config swarm.ConfigSpec) error { 13 | if err := cli.NewVersionError("1.30", "config update"); err != nil { 14 | return err 15 | } 16 | query := url.Values{} 17 | query.Set("version", strconv.FormatUint(version.Index, 10)) 18 | resp, err := cli.post(ctx, "/configs/"+id+"/update", query, config, nil) 19 | ensureReaderClosed(resp) 20 | return err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/secret_update.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | "strconv" 6 | 7 | "github.com/docker/docker/api/types/swarm" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // SecretUpdate attempts to update a Secret 12 | func (cli *Client) SecretUpdate(ctx context.Context, id string, version swarm.Version, secret swarm.SecretSpec) error { 13 | if err := cli.NewVersionError("1.25", "secret update"); err != nil { 14 | return err 15 | } 16 | query := url.Values{} 17 | query.Set("version", strconv.FormatUint(version.Index, 10)) 18 | resp, err := cli.post(ctx, "/secrets/"+id+"/update", query, secret, nil) 19 | ensureReaderClosed(resp) 20 | return err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/tcp_socket.go: -------------------------------------------------------------------------------- 1 | // Package sockets provides helper functions to create and configure Unix or TCP sockets. 2 | package sockets 3 | 4 | import ( 5 | "crypto/tls" 6 | "net" 7 | ) 8 | 9 | // NewTCPSocket creates a TCP socket listener with the specified address and 10 | // the specified tls configuration. If TLSConfig is set, will encapsulate the 11 | // TCP listener inside a TLS one. 12 | func NewTCPSocket(addr string, tlsConfig *tls.Config) (net.Listener, error) { 13 | l, err := net.Listen("tcp", addr) 14 | if err != nil { 15 | return nil, err 16 | } 17 | if tlsConfig != nil { 18 | tlsConfig.NextProtos = []string{"http/1.1"} 19 | l = tls.NewListener(l, tlsConfig) 20 | } 21 | return l, nil 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/str.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 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + uitoa(uint(-val)) 12 | } 13 | return uitoa(uint(val)) 14 | } 15 | 16 | func uitoa(val uint) string { 17 | var buf [32]byte // big enough for int64 18 | i := len(buf) - 1 19 | for val >= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/interface_experimental.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "github.com/docker/docker/api/types" 5 | "golang.org/x/net/context" 6 | ) 7 | 8 | type apiClientExperimental interface { 9 | CheckpointAPIClient 10 | } 11 | 12 | // CheckpointAPIClient defines API client methods for the checkpoints 13 | type CheckpointAPIClient interface { 14 | CheckpointCreate(ctx context.Context, container string, options types.CheckpointCreateOptions) error 15 | CheckpointDelete(ctx context.Context, container string, options types.CheckpointDeleteOptions) error 16 | CheckpointList(ctx context.Context, container string, options types.CheckpointListOptions) ([]types.Checkpoint, error) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_history.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types/image" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ImageHistory returns the changes in an image in history format. 12 | func (cli *Client) ImageHistory(ctx context.Context, imageID string) ([]image.HistoryResponseItem, error) { 13 | var history []image.HistoryResponseItem 14 | serverResp, err := cli.get(ctx, "/images/"+imageID+"/history", url.Values{}, nil) 15 | if err != nil { 16 | return history, err 17 | } 18 | 19 | err = json.NewDecoder(serverResp.body).Decode(&history) 20 | ensureReaderClosed(serverResp) 21 | return history, err 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/info.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // Info returns information about the docker server. 13 | func (cli *Client) Info(ctx context.Context) (types.Info, error) { 14 | var info types.Info 15 | serverResp, err := cli.get(ctx, "/info", url.Values{}, nil) 16 | if err != nil { 17 | return info, err 18 | } 19 | defer ensureReaderClosed(serverResp) 20 | 21 | if err := json.NewDecoder(serverResp.body).Decode(&info); err != nil { 22 | return info, fmt.Errorf("Error reading remote info: %v", err) 23 | } 24 | 25 | return info, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/file_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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 unix 6 | 7 | import ( 8 | "os" 9 | "syscall" 10 | ) 11 | 12 | // FIXME: unexported function from os 13 | // syscallMode returns the syscall-specific mode bits from Go's portable mode bits. 14 | func syscallMode(i os.FileMode) (o uint32) { 15 | o |= uint32(i.Perm()) 16 | if i&os.ModeSetuid != 0 { 17 | o |= syscall.S_ISUID 18 | } 19 | if i&os.ModeSetgid != 0 { 20 | o |= syscall.S_ISGID 21 | } 22 | if i&os.ModeSticky != 0 { 23 | o |= syscall.S_ISVTX 24 | } 25 | // No mapping for Go's ModeTemporary (plan9 only). 26 | return 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/disk_usage.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | 7 | "github.com/docker/docker/api/types" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // DiskUsage requests the current data usage from the daemon 12 | func (cli *Client) DiskUsage(ctx context.Context) (types.DiskUsage, error) { 13 | var du types.DiskUsage 14 | 15 | serverResp, err := cli.get(ctx, "/system/df", nil, nil) 16 | if err != nil { 17 | return du, err 18 | } 19 | defer ensureReaderClosed(serverResp) 20 | 21 | if err := json.NewDecoder(serverResp.body).Decode(&du); err != nil { 22 | return du, fmt.Errorf("Error retrieving disk usage: %v", err) 23 | } 24 | 25 | return du, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,race linux,race freebsd,race 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/container_changes.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerChangeResponseItem change item in response to ContainerChanges operation 11 | // swagger:model ContainerChangeResponseItem 12 | type ContainerChangeResponseItem struct { 13 | 14 | // Kind of change 15 | // Required: true 16 | Kind uint8 `json:"Kind"` 17 | 18 | // Path to file that has changed 19 | // Required: true 20 | Path string `json:"Path"` 21 | } 22 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to libcompose 2 | 3 | Want to hack on Libcompose? Awesome! Here are instructions to get you 4 | started. 5 | 6 | Libcompose is part of the [Docker](https://www.docker.com) project, and 7 | follows the same rules and principles. If you're already familiar with 8 | the way Docker does things, you'll feel right at home. 9 | 10 | Otherwise, go read Docker's 11 | [contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md), 12 | [issue triaging](https://github.com/docker/docker/blob/master/project/ISSUE-TRIAGE.md), 13 | [review process](https://github.com/docker/docker/blob/master/project/REVIEWING.md) and 14 | [branches and tags](https://github.com/docker/docker/blob/master/project/BRANCHES-AND-TAGS.md). 15 | 16 | Happy hacking! 17 | -------------------------------------------------------------------------------- /config/merge_fixtures_test.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "io/ioutil" 5 | "path/filepath" 6 | "strings" 7 | "testing" 8 | ) 9 | 10 | func TestMergeOnValidFixtures(t *testing.T) { 11 | files, err := ioutil.ReadDir("testdata/") 12 | if err != nil { 13 | t.Fatal(err) 14 | } 15 | for _, file := range files { 16 | if file.IsDir() || !strings.HasSuffix(file.Name(), ".yml") { 17 | continue 18 | } 19 | data, err := ioutil.ReadFile(filepath.Join("testdata", file.Name())) 20 | if err != nil { 21 | t.Fatalf("error reading %q: %v", file.Name(), err) 22 | } 23 | _, _, _, _, err = Merge(NewServiceConfigs(), nil, nil, file.Name(), data, nil) 24 | if err != nil { 25 | t.Errorf("error loading %q: %v\n %v", file.Name(), string(data), err) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/runtime.go: -------------------------------------------------------------------------------- 1 | package swarm // import "github.com/docker/docker/api/types/swarm" 2 | 3 | // RuntimeType is the type of runtime used for the TaskSpec 4 | type RuntimeType string 5 | 6 | // RuntimeURL is the proto type url 7 | type RuntimeURL string 8 | 9 | const ( 10 | // RuntimeContainer is the container based runtime 11 | RuntimeContainer RuntimeType = "container" 12 | // RuntimePlugin is the plugin based runtime 13 | RuntimePlugin RuntimeType = "plugin" 14 | 15 | // RuntimeURLContainer is the proto url for the container type 16 | RuntimeURLContainer RuntimeURL = "types.docker.com/RuntimeContainer" 17 | // RuntimeURLPlugin is the proto url for the plugin type 18 | RuntimeURLPlugin RuntimeURL = "types.docker.com/RuntimePlugin" 19 | ) 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_stop.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | "time" 6 | 7 | timetypes "github.com/docker/docker/api/types/time" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ContainerStop stops a container without terminating the process. 12 | // The process is blocked until the container stops or the timeout expires. 13 | func (cli *Client) ContainerStop(ctx context.Context, containerID string, timeout *time.Duration) error { 14 | query := url.Values{} 15 | if timeout != nil { 16 | query.Set("t", timetypes.DurationToSecondsString(*timeout)) 17 | } 18 | resp, err := cli.post(ctx, "/containers/"+containerID+"/stop", query, nil, nil) 19 | ensureReaderClosed(resp) 20 | return err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_s390x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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 s390x 6 | // +build linux 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for s390x, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/utimes_freebsd.go: -------------------------------------------------------------------------------- 1 | package system // import "github.com/docker/docker/pkg/system" 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // LUtimesNano is used to change access and modification time of the specified path. 11 | // It's used for symbol link file because unix.UtimesNano doesn't support a NOFOLLOW flag atm. 12 | func LUtimesNano(path string, ts []syscall.Timespec) error { 13 | var _path *byte 14 | _path, err := unix.BytePtrFromString(path) 15 | if err != nil { 16 | return err 17 | } 18 | 19 | if _, _, err := unix.Syscall(unix.SYS_LUTIMES, uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), 0); err != 0 && err != unix.ENOSYS { 20 | return err 21 | } 22 | 23 | return nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_ppc64x.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 linux 6 | // +build ppc64 ppc64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for ppc64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/container_create.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerCreateCreatedBody OK response to ContainerCreate operation 11 | // swagger:model ContainerCreateCreatedBody 12 | type ContainerCreateCreatedBody struct { 13 | 14 | // The ID of the created container 15 | // Required: true 16 | ID string `json:"Id"` 17 | 18 | // Warnings encountered when creating the container 19 | // Required: true 20 | Warnings []string `json:"Warnings"` 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go: -------------------------------------------------------------------------------- 1 | package homedir // import "github.com/docker/docker/pkg/homedir" 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/docker/docker/pkg/idtools" 7 | ) 8 | 9 | // GetStatic returns the home directory for the current user without calling 10 | // os/user.Current(). This is useful for static-linked binary on glibc-based 11 | // system, because a call to os/user.Current() in a static binary leads to 12 | // segfault due to a glibc issue that won't be fixed in a short term. 13 | // (#29344, golang/go#13470, https://sourceware.org/bugzilla/show_bug.cgi?id=19341) 14 | func GetStatic() (string, error) { 15 | uid := os.Getuid() 16 | usr, err := idtools.LookupUID(uid) 17 | if err != nil { 18 | return "", err 19 | } 20 | return usr.Home, nil 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/sockets_windows.go: -------------------------------------------------------------------------------- 1 | package sockets 2 | 3 | import ( 4 | "net" 5 | "net/http" 6 | "time" 7 | 8 | "github.com/Microsoft/go-winio" 9 | ) 10 | 11 | func configureUnixTransport(tr *http.Transport, proto, addr string) error { 12 | return ErrProtocolNotAvailable 13 | } 14 | 15 | func configureNpipeTransport(tr *http.Transport, proto, addr string) error { 16 | // No need for compression in local communications. 17 | tr.DisableCompression = true 18 | tr.Dial = func(_, _ string) (net.Conn, error) { 19 | return DialPipe(addr, defaultTimeout) 20 | } 21 | return nil 22 | } 23 | 24 | // DialPipe connects to a Windows named pipe. 25 | func DialPipe(addr string, timeout time.Duration) (net.Conn, error) { 26 | return winio.DialPipe(addr, &timeout) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/Azure/go-ansiterm/osc_string_state.go: -------------------------------------------------------------------------------- 1 | package ansiterm 2 | 3 | type oscStringState struct { 4 | baseState 5 | } 6 | 7 | func (oscState oscStringState) Handle(b byte) (s state, e error) { 8 | oscState.parser.logf("OscString::Handle %#x", b) 9 | nextState, err := oscState.baseState.Handle(b) 10 | if nextState != nil || err != nil { 11 | return nextState, err 12 | } 13 | 14 | switch { 15 | case isOscStringTerminator(b): 16 | return oscState.parser.ground, nil 17 | } 18 | 19 | return oscState, nil 20 | } 21 | 22 | // See below for OSC string terminators for linux 23 | // http://man7.org/linux/man-pages/man4/console_codes.4.html 24 | func isOscStringTerminator(b byte) bool { 25 | 26 | if b == ANSI_BEL || b == 0x5C { 27 | return true 28 | } 29 | 30 | return false 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/term/winsize.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package term // import "github.com/docker/docker/pkg/term" 4 | 5 | import ( 6 | "golang.org/x/sys/unix" 7 | ) 8 | 9 | // GetWinsize returns the window size based on the specified file descriptor. 10 | func GetWinsize(fd uintptr) (*Winsize, error) { 11 | uws, err := unix.IoctlGetWinsize(int(fd), unix.TIOCGWINSZ) 12 | ws := &Winsize{Height: uws.Row, Width: uws.Col, x: uws.Xpixel, y: uws.Ypixel} 13 | return ws, err 14 | } 15 | 16 | // SetWinsize tries to set the specified window size for the specified file descriptor. 17 | func SetWinsize(fd uintptr, ws *Winsize) error { 18 | uws := &unix.Winsize{Row: ws.Height, Col: ws.Width, Xpixel: ws.x, Ypixel: ws.y} 19 | return unix.IoctlSetWinsize(int(fd), unix.TIOCSWINSZ, uws) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/unix_socket.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package sockets 4 | 5 | import ( 6 | "net" 7 | "os" 8 | "syscall" 9 | ) 10 | 11 | // NewUnixSocket creates a unix socket with the specified path and group. 12 | func NewUnixSocket(path string, gid int) (net.Listener, error) { 13 | if err := syscall.Unlink(path); err != nil && !os.IsNotExist(err) { 14 | return nil, err 15 | } 16 | mask := syscall.Umask(0777) 17 | defer syscall.Umask(mask) 18 | 19 | l, err := net.Listen("unix", path) 20 | if err != nil { 21 | return nil, err 22 | } 23 | if err := os.Chown(path, 0, gid); err != nil { 24 | l.Close() 25 | return nil, err 26 | } 27 | if err := os.Chmod(path, 0660); err != nil { 28 | l.Close() 29 | return nil, err 30 | } 31 | return l, nil 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/kr/pty/util.go: -------------------------------------------------------------------------------- 1 | package pty 2 | 3 | import ( 4 | "os" 5 | "syscall" 6 | "unsafe" 7 | ) 8 | 9 | // Getsize returns the number of rows (lines) and cols (positions 10 | // in each line) in terminal t. 11 | func Getsize(t *os.File) (rows, cols int, err error) { 12 | var ws winsize 13 | err = windowrect(&ws, t.Fd()) 14 | return int(ws.ws_row), int(ws.ws_col), err 15 | } 16 | 17 | type winsize struct { 18 | ws_row uint16 19 | ws_col uint16 20 | ws_xpixel uint16 21 | ws_ypixel uint16 22 | } 23 | 24 | func windowrect(ws *winsize, fd uintptr) error { 25 | _, _, errno := syscall.Syscall( 26 | syscall.SYS_IOCTL, 27 | fd, 28 | syscall.TIOCGWINSZ, 29 | uintptr(unsafe.Pointer(ws)), 30 | ) 31 | if errno != 0 { 32 | return syscall.Errno(errno) 33 | } 34 | return nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm.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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for arm, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 23 | B syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | B syscall·RawSyscall6(SB) 27 | 28 | TEXT ·seek(SB),NOSPLIT,$0-32 29 | B syscall·seek(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_mips64x.s: -------------------------------------------------------------------------------- 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 linux 6 | // +build mips64 mips64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for mips64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | JMP syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | JMP syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | JMP syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | JMP syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "io" 5 | "net/http" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // PluginCreate creates a plugin 13 | func (cli *Client) PluginCreate(ctx context.Context, createContext io.Reader, createOptions types.PluginCreateOptions) error { 14 | headers := http.Header(make(map[string][]string)) 15 | headers.Set("Content-Type", "application/x-tar") 16 | 17 | query := url.Values{} 18 | query.Set("name", createOptions.RepoName) 19 | 20 | resp, err := cli.postRaw(ctx, "/plugins/create", query, createContext, headers) 21 | if err != nil { 22 | return err 23 | } 24 | ensureReaderClosed(resp) 25 | return err 26 | } 27 | -------------------------------------------------------------------------------- /hack/inline_schema.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io/ioutil" 5 | "os" 6 | "text/template" 7 | ) 8 | 9 | func main() { 10 | t, err := template.New("schema_template.go").ParseFiles("./hack/schema_template.go") 11 | if err != nil { 12 | panic(err) 13 | } 14 | 15 | schemaV1, err := ioutil.ReadFile("./hack/config_schema_v1.json") 16 | if err != nil { 17 | panic(err) 18 | } 19 | schemaV2, err := ioutil.ReadFile("./hack/config_schema_v2.0.json") 20 | if err != nil { 21 | panic(err) 22 | } 23 | 24 | inlinedFile, err := os.Create("config/schema.go") 25 | if err != nil { 26 | panic(err) 27 | } 28 | 29 | err = t.Execute(inlinedFile, map[string]string{ 30 | "schemaV1": string(schemaV1), 31 | "schemaV2": string(schemaV2), 32 | }) 33 | 34 | if err != nil { 35 | panic(err) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock.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 darwin dragonfly freebsd linux netbsd openbsd 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 16 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 17 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 18 | if errno == 0 { 19 | return nil 20 | } 21 | return errno 22 | } 23 | -------------------------------------------------------------------------------- /docker/service/service_factory.go: -------------------------------------------------------------------------------- 1 | package service 2 | 3 | import ( 4 | "github.com/docker/libcompose/config" 5 | "github.com/docker/libcompose/docker/ctx" 6 | "github.com/docker/libcompose/project" 7 | ) 8 | 9 | // Factory is an implementation of project.ServiceFactory. 10 | type Factory struct { 11 | context *ctx.Context 12 | } 13 | 14 | // NewFactory creates a new service factory for the given context 15 | func NewFactory(context *ctx.Context) *Factory { 16 | return &Factory{ 17 | context: context, 18 | } 19 | } 20 | 21 | // Create creates a Service based on the specified project, name and service configuration. 22 | func (s *Factory) Create(project *project.Project, name string, serviceConfig *config.ServiceConfig) (project.Service, error) { 23 | return NewService(name, serviceConfig, s.context), nil 24 | } 25 | -------------------------------------------------------------------------------- /lookup/simple_env.go: -------------------------------------------------------------------------------- 1 | package lookup 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | 7 | "github.com/docker/libcompose/config" 8 | ) 9 | 10 | // OsEnvLookup is a "bare" structure that implements the project.EnvironmentLookup interface 11 | type OsEnvLookup struct { 12 | } 13 | 14 | // Lookup creates a string slice of string containing a "docker-friendly" environment string 15 | // in the form of 'key=value'. It gets environment values using os.Getenv. 16 | // If the os environment variable does not exists, the slice is empty. serviceName and config 17 | // are not used at all in this implementation. 18 | func (o *OsEnvLookup) Lookup(key string, config *config.ServiceConfig) []string { 19 | ret := os.Getenv(key) 20 | if ret == "" { 21 | return []string{} 22 | } 23 | return []string{fmt.Sprintf("%s=%s", key, ret)} 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_update.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types/container" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ContainerUpdate updates resources of a container 11 | func (cli *Client) ContainerUpdate(ctx context.Context, containerID string, updateConfig container.UpdateConfig) (container.ContainerUpdateOKBody, error) { 12 | var response container.ContainerUpdateOKBody 13 | serverResp, err := cli.post(ctx, "/containers/"+containerID+"/update", nil, updateConfig, nil) 14 | if err != nil { 15 | return response, err 16 | } 17 | 18 | err = json.NewDecoder(serverResp.body).Decode(&response) 19 | 20 | ensureReaderClosed(serverResp) 21 | return response, err 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2017 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 | // 10 | // System call support for ARM, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_diff.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types/container" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ContainerDiff shows differences in a container filesystem since it was started. 12 | func (cli *Client) ContainerDiff(ctx context.Context, containerID string) ([]container.ContainerChangeResponseItem, error) { 13 | var changes []container.ContainerChangeResponseItem 14 | 15 | serverResp, err := cli.get(ctx, "/containers/"+containerID+"/changes", url.Values{}, nil) 16 | if err != nil { 17 | return changes, err 18 | } 19 | 20 | err = json.NewDecoder(serverResp.body).Decode(&changes) 21 | ensureReaderClosed(serverResp) 22 | return changes, err 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_restart.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | "time" 6 | 7 | timetypes "github.com/docker/docker/api/types/time" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ContainerRestart stops and starts a container again. 12 | // It makes the daemon to wait for the container to be up again for 13 | // a specific amount of time, given the timeout. 14 | func (cli *Client) ContainerRestart(ctx context.Context, containerID string, timeout *time.Duration) error { 15 | query := url.Values{} 16 | if timeout != nil { 17 | query.Set("t", timetypes.DurationToSecondsString(*timeout)) 18 | } 19 | resp, err := cli.post(ctx, "/containers/"+containerID+"/restart", query, nil, nil) 20 | ensureReaderClosed(resp) 21 | return err 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_start.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | 6 | "golang.org/x/net/context" 7 | 8 | "github.com/docker/docker/api/types" 9 | ) 10 | 11 | // ContainerStart sends a request to the docker daemon to start a container. 12 | func (cli *Client) ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error { 13 | query := url.Values{} 14 | if len(options.CheckpointID) != 0 { 15 | query.Set("checkpoint", options.CheckpointID) 16 | } 17 | if len(options.CheckpointDir) != 0 { 18 | query.Set("checkpoint-dir", options.CheckpointDir) 19 | } 20 | 21 | resp, err := cli.post(ctx, "/containers/"+containerID+"/start", query, nil, nil) 22 | ensureReaderClosed(resp) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/distribution/context/util.go: -------------------------------------------------------------------------------- 1 | package context 2 | 3 | import ( 4 | "time" 5 | ) 6 | 7 | // Since looks up key, which should be a time.Time, and returns the duration 8 | // since that time. If the key is not found, the value returned will be zero. 9 | // This is helpful when inferring metrics related to context execution times. 10 | func Since(ctx Context, key interface{}) time.Duration { 11 | if startedAt, ok := ctx.Value(key).(time.Time); ok { 12 | return time.Since(startedAt) 13 | } 14 | return 0 15 | } 16 | 17 | // GetStringValue returns a string value from the context. The empty string 18 | // will be returned if not found. 19 | func GetStringValue(ctx Context, key interface{}) (value string) { 20 | if valuev, ok := ctx.Value(key).(string); ok { 21 | value = valuev 22 | } 23 | return value 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/container/container_top.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerTopOKBody OK response to ContainerTop operation 11 | // swagger:model ContainerTopOKBody 12 | type ContainerTopOKBody struct { 13 | 14 | // Each process running in the container, where each is process is an array of values corresponding to the titles 15 | // Required: true 16 | Processes [][]string `json:"Processes"` 17 | 18 | // The ps column titles 19 | // Required: true 20 | Titles []string `json:"Titles"` 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/archive/changes_windows.go: -------------------------------------------------------------------------------- 1 | package archive // import "github.com/docker/docker/pkg/archive" 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/docker/docker/pkg/system" 7 | ) 8 | 9 | func statDifferent(oldStat *system.StatT, newStat *system.StatT) bool { 10 | 11 | // Don't look at size for dirs, its not a good measure of change 12 | if oldStat.Mtim() != newStat.Mtim() || 13 | oldStat.Mode() != newStat.Mode() || 14 | oldStat.Size() != newStat.Size() && !oldStat.Mode().IsDir() { 15 | return true 16 | } 17 | return false 18 | } 19 | 20 | func (info *FileInfo) isDir() bool { 21 | return info.parent == nil || info.stat.Mode().IsDir() 22 | } 23 | 24 | func getIno(fi os.FileInfo) (inode uint64) { 25 | return 26 | } 27 | 28 | func hasHardlinks(fi os.FileInfo) bool { 29 | return false 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/tarsum/builder_context.go: -------------------------------------------------------------------------------- 1 | package tarsum // import "github.com/docker/docker/pkg/tarsum" 2 | 3 | // BuilderContext is an interface extending TarSum by adding the Remove method. 4 | // In general there was concern about adding this method to TarSum itself 5 | // so instead it is being added just to "BuilderContext" which will then 6 | // only be used during the .dockerignore file processing 7 | // - see builder/evaluator.go 8 | type BuilderContext interface { 9 | TarSum 10 | Remove(string) 11 | } 12 | 13 | func (bc *tarSum) Remove(filename string) { 14 | for i, fis := range bc.sums { 15 | if fis.Name() == filename { 16 | bc.sums = append(bc.sums[:i], bc.sums[i+1:]...) 17 | // Note, we don't just return because there could be 18 | // more than one with this name 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for AMD64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16 29 | JMP syscall·gettimeofday(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /hack/validate-vet: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source "$(dirname "$BASH_SOURCE")/.validate" 4 | 5 | IFS=$'\n' 6 | files=( $(validate_diff --diff-filter=ACMR --name-only -- '*.go' | grep -v '^vendor/' || true) ) 7 | unset IFS 8 | 9 | errors=() 10 | for f in "${files[@]}"; do 11 | # we use "git show" here to validate that what's committed passes go vet 12 | failedVet=$(go vet "$f") 13 | if [ "$failedVet" ]; then 14 | errors+=( "$failedVet" ) 15 | fi 16 | done 17 | 18 | 19 | if [ ${#errors[@]} -eq 0 ]; then 20 | echo 'Congratulations! All Go source files have been vetted.' 21 | else 22 | { 23 | echo "Errors from go vet:" 24 | for err in "${errors[@]}"; do 25 | echo " - $err" 26 | done 27 | echo 28 | echo 'Please fix the above errors. You can test via "go vet" and commit the result.' 29 | echo 30 | } >&2 31 | false 32 | fi 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-64 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-112 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-64 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/registry/authenticate.go: -------------------------------------------------------------------------------- 1 | package registry // import "github.com/docker/docker/api/types/registry" 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // AuthenticateOKBody authenticate o k body 11 | // swagger:model AuthenticateOKBody 12 | type AuthenticateOKBody struct { 13 | 14 | // An opaque token used to authenticate a user after a successful login 15 | // Required: true 16 | IdentityToken string `json:"IdentityToken"` 17 | 18 | // The status of the authentication 19 | // Required: true 20 | Status string `json:"Status"` 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 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 !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /docker/network/factory.go: -------------------------------------------------------------------------------- 1 | package network 2 | 3 | import ( 4 | "github.com/docker/libcompose/config" 5 | composeclient "github.com/docker/libcompose/docker/client" 6 | "github.com/docker/libcompose/project" 7 | ) 8 | 9 | // DockerFactory implements project.NetworksFactory 10 | type DockerFactory struct { 11 | ClientFactory composeclient.Factory 12 | } 13 | 14 | // Create implements project.NetworksFactory Create method. 15 | // It creates a Networks (that implements project.Networks) from specified configurations. 16 | func (f *DockerFactory) Create(projectName string, networkConfigs map[string]*config.NetworkConfig, serviceConfigs *config.ServiceConfigs, networkEnabled bool) (project.Networks, error) { 17 | cli := f.ClientFactory.Create(nil) 18 | return NetworksFromServices(cli, projectName, networkConfigs, serviceConfigs, networkEnabled) 19 | } 20 | --------------------------------------------------------------------------------