fix chown and seccomp
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
60f032f6f5
commit
2569457739
8197 changed files with 30742 additions and 1596554 deletions
26
vendor/github.com/docker/cli/scripts/build/.variables
generated
vendored
26
vendor/github.com/docker/cli/scripts/build/.variables
generated
vendored
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
PLATFORM=${PLATFORM:-}
|
||||
VERSION=${VERSION:-"unknown-version"}
|
||||
GITCOMMIT=${GITCOMMIT:-$(git rev-parse --short HEAD 2> /dev/null || true)}
|
||||
BUILDTIME=${BUILDTIME:-$(date --utc --rfc-3339 ns 2> /dev/null | sed -e 's/ /T/')}
|
||||
|
||||
PLATFORM_LDFLAGS=
|
||||
if test -n "${PLATFORM}"; then
|
||||
PLATFORM_LDFLAGS="-X \"github.com/docker/cli/cli.PlatformName=${PLATFORM}\""
|
||||
fi
|
||||
|
||||
export LDFLAGS="\
|
||||
-w \
|
||||
${PLATFORM_LDFLAGS} \
|
||||
-X \"github.com/docker/cli/cli.GitCommit=${GITCOMMIT}\" \
|
||||
-X \"github.com/docker/cli/cli.BuildTime=${BUILDTIME}\" \
|
||||
-X \"github.com/docker/cli/cli.Version=${VERSION}\" \
|
||||
${LDFLAGS:-} \
|
||||
"
|
||||
|
||||
GOOS="${GOOS:-$(go env GOHOSTOS)}"
|
||||
GOARCH="${GOARCH:-$(go env GOHOSTARCH)}"
|
||||
export TARGET="build/docker-$GOOS-$GOARCH"
|
||||
export SOURCE="github.com/docker/cli/cmd/docker"
|
14
vendor/github.com/docker/cli/scripts/build/binary
generated
vendored
14
vendor/github.com/docker/cli/scripts/build/binary
generated
vendored
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Build a static binary for the host OS/ARCH
|
||||
#
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
source ./scripts/build/.variables
|
||||
|
||||
echo "Building statically linked $TARGET"
|
||||
export CGO_ENABLED=0
|
||||
go build -o "${TARGET}" --ldflags "${LDFLAGS}" "${SOURCE}"
|
||||
|
||||
ln -sf "$(basename "${TARGET}")" build/docker
|
33
vendor/github.com/docker/cli/scripts/build/cross
generated
vendored
33
vendor/github.com/docker/cli/scripts/build/cross
generated
vendored
|
@ -1,33 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Build a binary for all supported platforms
|
||||
#
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
export SHELL=bash
|
||||
|
||||
jobs=(
|
||||
"$BUILDDIR/windows" \
|
||||
"$BUILDDIR/osx" \
|
||||
"GOOS=linux GOARCH=amd64 $BUILDDIR/binary" \
|
||||
"GOOS=linux GOARCH=arm $BUILDDIR/binary" \
|
||||
"GOOS=linux GOARCH=ppc64le $BUILDDIR/binary" \
|
||||
"GOOS=linux GOARCH=s390x $BUILDDIR/binary" \
|
||||
)
|
||||
|
||||
# Outside of circleCI run all at once. On circleCI run two at a time because
|
||||
# each container has access to two cores.
|
||||
group=${CROSS_GROUP-"all"}
|
||||
|
||||
if [ "$group" == "all" ]; then
|
||||
|
||||
echo "Building binaries for all platforms"
|
||||
parallel ::: "${jobs[@]}"
|
||||
exit 0
|
||||
|
||||
fi
|
||||
|
||||
declare -i start="$group*2"
|
||||
parallel ::: "${jobs[@]:$start:2}"
|
14
vendor/github.com/docker/cli/scripts/build/dynbinary
generated
vendored
14
vendor/github.com/docker/cli/scripts/build/dynbinary
generated
vendored
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Build a dynamically linked binary for the host OS/ARCH
|
||||
#
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
source ./scripts/build/.variables
|
||||
|
||||
echo "Building dynamically linked $TARGET"
|
||||
export CGO_ENABLED=1
|
||||
go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" "${SOURCE}"
|
||||
|
||||
ln -sf "$(basename "${TARGET}")" build/docker
|
21
vendor/github.com/docker/cli/scripts/build/osx
generated
vendored
21
vendor/github.com/docker/cli/scripts/build/osx
generated
vendored
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Build an osx binary from linux
|
||||
#
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
source ./scripts/build/.variables
|
||||
|
||||
export CGO_ENABLED=1
|
||||
export GOOS=darwin
|
||||
export GOARCH=amd64
|
||||
export CC=o64-clang
|
||||
export LDFLAGS="$LDFLAGS -linkmode external -s"
|
||||
export LDFLAGS_STATIC_DOCKER='-extld='${CC}
|
||||
|
||||
# Override TARGET
|
||||
TARGET="build/docker-$GOOS-$GOARCH"
|
||||
|
||||
echo "Building $TARGET"
|
||||
go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" "${SOURCE}"
|
23
vendor/github.com/docker/cli/scripts/build/windows
generated
vendored
23
vendor/github.com/docker/cli/scripts/build/windows
generated
vendored
|
@ -1,23 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Build a windows binary from linux
|
||||
#
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
source ./scripts/build/.variables
|
||||
|
||||
export CC=x86_64-w64-mingw32-gcc
|
||||
export CGO_ENABLED=1
|
||||
export GOOS=windows
|
||||
export GOARCH=amd64
|
||||
|
||||
# Override TARGET
|
||||
TARGET="build/docker-$GOOS-$GOARCH"
|
||||
|
||||
echo "Generating windows resources"
|
||||
go generate ./cli/winresources
|
||||
|
||||
echo "Building $TARGET"
|
||||
# TODO: -tags pkcs11
|
||||
go build -o "${TARGET}" --ldflags "${LDFLAGS}" "${SOURCE}"
|
15
vendor/github.com/docker/cli/scripts/docs/generate-authors.sh
generated
vendored
15
vendor/github.com/docker/cli/scripts/docs/generate-authors.sh
generated
vendored
|
@ -1,15 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$(readlink -f "${BASH_SOURCE[*]}")")/../.."
|
||||
|
||||
# see also ".mailmap" for how email addresses and names are deduplicated
|
||||
|
||||
{
|
||||
cat <<-'EOH'
|
||||
# This file lists all individuals having contributed content to the repository.
|
||||
# For how it is generated, see `scripts/docs/generate-authors.sh`.
|
||||
EOH
|
||||
echo
|
||||
git log --format='%aN <%aE>' | LC_ALL=C.UTF-8 sort -uf
|
||||
} > AUTHORS
|
14
vendor/github.com/docker/cli/scripts/docs/generate-man.sh
generated
vendored
14
vendor/github.com/docker/cli/scripts/docs/generate-man.sh
generated
vendored
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Generate man pages for docker/cli
|
||||
set -eu -o pipefail
|
||||
|
||||
mkdir -p ./man/man1
|
||||
|
||||
go install ./vendor/github.com/cpuguy83/go-md2man
|
||||
|
||||
# Generate man pages from cobra commands
|
||||
go build -o /tmp/gen-manpages github.com/docker/cli/man
|
||||
/tmp/gen-manpages --root "$(pwd)" --target "$(pwd)/man/man1"
|
||||
|
||||
# Generate legacy pages from markdown
|
||||
./man/md2man-all.sh -q
|
8
vendor/github.com/docker/cli/scripts/docs/generate-yaml.sh
generated
vendored
8
vendor/github.com/docker/cli/scripts/docs/generate-yaml.sh
generated
vendored
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Generate yaml for docker/cli reference docs
|
||||
set -eu -o pipefail
|
||||
|
||||
mkdir -p docs/yaml/gen
|
||||
|
||||
go build -o build/yaml-docs-generator github.com/docker/cli/docs/yaml
|
||||
build/yaml-docs-generator --root "$(pwd)" --target "$(pwd)/docs/yaml/gen"
|
44
vendor/github.com/docker/cli/scripts/gen/windows-resources
generated
vendored
44
vendor/github.com/docker/cli/scripts/gen/windows-resources
generated
vendored
|
@ -1,44 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Compile the Windows resources into the sources
|
||||
#
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
# shellcheck source=/go/src/github.com/docker/cli/scripts/build/.variables
|
||||
source $SCRIPTDIR/../build/.variables
|
||||
|
||||
RESOURCES=$SCRIPTDIR/../winresources
|
||||
|
||||
TEMPDIR=$(mktemp -d)
|
||||
trap 'rm -rf $TEMPDIR' EXIT
|
||||
|
||||
if [ "$(go env GOHOSTOS)" == "windows" ]; then
|
||||
WINDRES=windres
|
||||
else
|
||||
# Cross compiling
|
||||
WINDRES=x86_64-w64-mingw32-windres
|
||||
fi
|
||||
|
||||
# Generate a Windows file version of the form major,minor,patch,build (with any part optional)
|
||||
VERSION_QUAD=$(echo -n "$VERSION" | sed -re 's/^([0-9.]*).*$/\1/' | tr . ,)
|
||||
|
||||
# Pass version and commit information into the resource compiler
|
||||
defs=
|
||||
[ ! -z "$VERSION" ] && defs+=( "-D DOCKER_VERSION=\"$VERSION\"")
|
||||
[ ! -z "$VERSION_QUAD" ] && defs+=( "-D DOCKER_VERSION_QUAD=$VERSION_QUAD")
|
||||
[ ! -z "$GITCOMMIT" ] && defs+=( "-D DOCKER_COMMIT=\"$GITCOMMIT\"")
|
||||
|
||||
function makeres {
|
||||
"$WINDRES" \
|
||||
-i "$RESOURCES/$1" \
|
||||
-o "$3" \
|
||||
-F "$2" \
|
||||
--use-temp-file \
|
||||
-I "$TEMPDIR" \
|
||||
${defs[*]}
|
||||
}
|
||||
|
||||
makeres docker.rc pe-x86-64 rsrc_amd64.syso
|
||||
makeres docker.rc pe-i386 rsrc_386.syso
|
172
vendor/github.com/docker/cli/scripts/make.ps1
generated
vendored
172
vendor/github.com/docker/cli/scripts/make.ps1
generated
vendored
|
@ -1,172 +0,0 @@
|
|||
<#
|
||||
.NOTES
|
||||
Summary: Windows native build script.
|
||||
|
||||
It does however provided the minimum necessary to support parts of local Windows
|
||||
development and Windows to Windows CI.
|
||||
|
||||
Usage Examples (run from repo root):
|
||||
"scripts/make.ps1 -Client" to build docker.exe client 64-bit binary (remote repo)
|
||||
"scripts/make.ps1 -TestUnit" to run unit tests
|
||||
"scripts/make.ps1 -Daemon -TestUnit" to build the daemon and run unit tests
|
||||
"scripts/make.ps1 -All" to run everything this script knows about that can run in a container
|
||||
"scripts/make.ps1" to build the daemon binary (same as -Daemon)
|
||||
"scripts/make.ps1 -Binary" shortcut to -Client and -Daemon
|
||||
|
||||
.PARAMETER Binary
|
||||
Builds the client and daemon binaries. A convenient shortcut to `make.ps1 -Client -Daemon`.
|
||||
|
||||
.PARAMETER Race
|
||||
Use -race in go build and go test.
|
||||
|
||||
.PARAMETER Noisy
|
||||
Use -v in go build.
|
||||
|
||||
.PARAMETER ForceBuildAll
|
||||
Use -a in go build.
|
||||
|
||||
.PARAMETER NoOpt
|
||||
Use -gcflags -N -l in go build to disable optimisation (can aide debugging).
|
||||
|
||||
.PARAMETER CommitSuffix
|
||||
Adds a custom string to be appended to the commit ID (spaces are stripped).
|
||||
|
||||
.PARAMETER TestUnit
|
||||
Runs unit tests.
|
||||
|
||||
.PARAMETER All
|
||||
Runs everything this script knows about that can run in a container.
|
||||
|
||||
|
||||
TODO
|
||||
- Unify the head commit
|
||||
- Add golint and other checks (swagger maybe?)
|
||||
|
||||
#>
|
||||
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory=$False)][switch]$Binary,
|
||||
[Parameter(Mandatory=$False)][switch]$Race,
|
||||
[Parameter(Mandatory=$False)][switch]$Noisy,
|
||||
[Parameter(Mandatory=$False)][switch]$ForceBuildAll,
|
||||
[Parameter(Mandatory=$False)][switch]$NoOpt,
|
||||
[Parameter(Mandatory=$False)][switch]$TestUnit,
|
||||
[Parameter(Mandatory=$False)][switch]$All
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ProgressPreference = "SilentlyContinue"
|
||||
$pushed=$False # To restore the directory if we have temporarily pushed to one.
|
||||
|
||||
# Build a binary (client or daemon)
|
||||
Function Execute-Build($additionalBuildTags, $directory) {
|
||||
# Generate the build flags
|
||||
$buildTags = "autogen"
|
||||
if ($Noisy) { $verboseParm=" -v" }
|
||||
if ($Race) { Write-Warning "Using race detector"; $raceParm=" -race"}
|
||||
if ($ForceBuildAll) { $allParm=" -a" }
|
||||
if ($NoOpt) { $optParm=" -gcflags "+""""+"-N -l"+"""" }
|
||||
if ($additionalBuildTags -ne "") { $buildTags += $(" " + $additionalBuildTags) }
|
||||
|
||||
# Do the go build in the appropriate directory
|
||||
# Note -linkmode=internal is required to be able to debug on Windows.
|
||||
# https://github.com/golang/go/issues/14319#issuecomment-189576638
|
||||
Write-Host "INFO: Building..."
|
||||
Push-Location $root\cmd\$directory; $global:pushed=$True
|
||||
$buildCommand = "go build" + `
|
||||
$raceParm + `
|
||||
$verboseParm + `
|
||||
$allParm + `
|
||||
$optParm + `
|
||||
" -tags """ + $buildTags + """" + `
|
||||
" -ldflags """ + "-linkmode=internal" + """" + `
|
||||
" -o $root\build\"+$directory+".exe"
|
||||
Invoke-Expression $buildCommand
|
||||
if ($LASTEXITCODE -ne 0) { Throw "Failed to compile" }
|
||||
Pop-Location; $global:pushed=$False
|
||||
}
|
||||
|
||||
# Run the unit tests
|
||||
Function Run-UnitTests() {
|
||||
Write-Host "INFO: Running unit tests..."
|
||||
$testPath="./..."
|
||||
$goListCommand = "go list -e -f '{{if ne .Name """ + '\"github.com/docker/cli\"' + """}}{{.ImportPath}}{{end}}' $testPath"
|
||||
$pkgList = $(Invoke-Expression $goListCommand)
|
||||
if ($LASTEXITCODE -ne 0) { Throw "go list for unit tests failed" }
|
||||
$pkgList = $pkgList | Select-String -Pattern "github.com/docker/cli"
|
||||
$pkgList = $pkgList | Select-String -NotMatch "github.com/docker/cli/vendor"
|
||||
$pkgList = $pkgList | Select-String -NotMatch "github.com/docker/cli/man"
|
||||
$pkgList = $pkgList | Select-String -NotMatch "github.com/docker/cli/e2e"
|
||||
$pkgList = $pkgList -replace "`r`n", " "
|
||||
$goTestCommand = "go test" + $raceParm + " -cover -ldflags -w -tags """ + "autogen" + """ -a """ + "-test.timeout=10m" + """ $pkgList"
|
||||
Invoke-Expression $goTestCommand
|
||||
if ($LASTEXITCODE -ne 0) { Throw "Unit tests failed" }
|
||||
}
|
||||
|
||||
# Start of main code.
|
||||
Try {
|
||||
Write-Host -ForegroundColor Cyan "INFO: make.ps1 starting at $(Get-Date)"
|
||||
|
||||
# Get to the root of the repo
|
||||
$root = $(Split-Path $MyInvocation.MyCommand.Definition -Parent | Split-Path -Parent)
|
||||
Push-Location $root
|
||||
|
||||
# Handle the "-All" shortcut to turn on all things we can handle.
|
||||
# Note we expressly only include the items which can run in a container - the validations tests cannot
|
||||
# as they require the .git directory which is excluded from the image by .dockerignore
|
||||
if ($All) { $Client=$True; $TestUnit=$True }
|
||||
|
||||
# Handle the "-Binary" shortcut to build both client and daemon.
|
||||
if ($Binary) { $Client = $True; }
|
||||
|
||||
# Verify git is installed
|
||||
if ($(Get-Command git -ErrorAction SilentlyContinue) -eq $nil) { Throw "Git does not appear to be installed" }
|
||||
|
||||
# Verify go is installed
|
||||
if ($(Get-Command go -ErrorAction SilentlyContinue) -eq $nil) { Throw "GoLang does not appear to be installed" }
|
||||
|
||||
# Build the binaries
|
||||
if ($Client) {
|
||||
# Create the build directory if it doesn't exist
|
||||
if (-not (Test-Path ".\build")) { New-Item ".\build" -ItemType Directory | Out-Null }
|
||||
|
||||
# Perform the actual build
|
||||
Execute-Build "" "docker"
|
||||
}
|
||||
|
||||
# Run unit tests
|
||||
if ($TestUnit) { Run-UnitTests }
|
||||
|
||||
# Gratuitous ASCII art.
|
||||
if ($Client) {
|
||||
Write-Host
|
||||
Write-Host -ForegroundColor Green " ________ ____ __."
|
||||
Write-Host -ForegroundColor Green " \_____ \ `| `|/ _`|"
|
||||
Write-Host -ForegroundColor Green " / `| \`| `<"
|
||||
Write-Host -ForegroundColor Green " / `| \ `| \"
|
||||
Write-Host -ForegroundColor Green " \_______ /____`|__ \"
|
||||
Write-Host -ForegroundColor Green " \/ \/"
|
||||
Write-Host
|
||||
}
|
||||
}
|
||||
Catch [Exception] {
|
||||
Write-Host -ForegroundColor Red ("`nERROR: make.ps1 failed:`n$_")
|
||||
|
||||
# More gratuitous ASCII art.
|
||||
Write-Host
|
||||
Write-Host -ForegroundColor Red "___________ .__.__ .___"
|
||||
Write-Host -ForegroundColor Red "\_ _____/____ `|__`| `| ____ __`| _/"
|
||||
Write-Host -ForegroundColor Red " `| __) \__ \ `| `| `| _/ __ \ / __ `| "
|
||||
Write-Host -ForegroundColor Red " `| \ / __ \`| `| `|_\ ___// /_/ `| "
|
||||
Write-Host -ForegroundColor Red " \___ / (____ /__`|____/\___ `>____ `| "
|
||||
Write-Host -ForegroundColor Red " \/ \/ \/ \/ "
|
||||
Write-Host
|
||||
|
||||
Throw $_
|
||||
}
|
||||
Finally {
|
||||
Pop-Location # As we pushed to the root of the repo as the very first thing
|
||||
if ($global:pushed) { Pop-Location }
|
||||
Write-Host -ForegroundColor Cyan "INFO: make.ps1 ended at $(Get-Date)"
|
||||
}
|
8
vendor/github.com/docker/cli/scripts/test/e2e/load-alpine
generated
vendored
8
vendor/github.com/docker/cli/scripts/test/e2e/load-alpine
generated
vendored
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
|
||||
src=alpine@sha256:f006ecbb824d87947d0b51ab8488634bf69fe4094959d935c0c103f4820a417d
|
||||
dest=registry:5000/alpine:3.6
|
||||
docker pull $src
|
||||
docker tag $src $dest
|
||||
docker push $dest
|
8
vendor/github.com/docker/cli/scripts/test/e2e/load-busybox
generated
vendored
8
vendor/github.com/docker/cli/scripts/test/e2e/load-busybox
generated
vendored
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
|
||||
src=busybox@sha256:3e8fa85ddfef1af9ca85a5cfb714148956984e02f00bec3f7f49d3925a91e0e7
|
||||
dest=registry:5000/busybox:1.27.2
|
||||
docker pull $src
|
||||
docker tag $src $dest
|
||||
docker push $dest
|
92
vendor/github.com/docker/cli/scripts/test/e2e/run
generated
vendored
92
vendor/github.com/docker/cli/scripts/test/e2e/run
generated
vendored
|
@ -1,92 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Run integration tests against the latest docker-ce dind
|
||||
set -eu -o pipefail
|
||||
|
||||
function container_ip {
|
||||
local cid=$1
|
||||
local network=$2
|
||||
docker inspect \
|
||||
-f "{{.NetworkSettings.Networks.${network}.IPAddress}}" "$cid"
|
||||
}
|
||||
|
||||
function setup {
|
||||
local project=$1
|
||||
COMPOSE_PROJECT_NAME=$1 COMPOSE_FILE=$2 docker-compose up -d >&2
|
||||
|
||||
local network="${project}_default"
|
||||
# TODO: only run if inside a container
|
||||
docker network connect "$network" "$(hostname)"
|
||||
|
||||
engine_ip="$(container_ip "${project}_engine_1" "$network")"
|
||||
engine_host="tcp://$engine_ip:2375"
|
||||
(
|
||||
export DOCKER_HOST="$engine_host"
|
||||
timeout -t 200 ./scripts/test/e2e/wait-on-daemon
|
||||
./scripts/test/e2e/load-alpine
|
||||
./scripts/test/e2e/load-busybox
|
||||
is_swarm_enabled || docker swarm init
|
||||
) >&2
|
||||
echo "$engine_host"
|
||||
}
|
||||
|
||||
function is_swarm_enabled {
|
||||
docker info 2> /dev/null | grep -q 'Swarm: active'
|
||||
}
|
||||
|
||||
function cleanup {
|
||||
COMPOSE_PROJECT_NAME=$1 COMPOSE_FILE=$2 docker-compose down -v >&2
|
||||
}
|
||||
|
||||
function runtests {
|
||||
local engine_host=$1
|
||||
|
||||
# TODO: only run if inside a container
|
||||
update-ca-certificates
|
||||
# shellcheck disable=SC2086
|
||||
env -i \
|
||||
TEST_DOCKER_HOST="$engine_host" \
|
||||
GOPATH="$GOPATH" \
|
||||
PATH="$PWD/build/" \
|
||||
"$(which go)" test -v ./e2e/... ${TESTFLAGS-}
|
||||
}
|
||||
|
||||
export unique_id="${E2E_UNIQUE_ID:-cliendtoendsuite}"
|
||||
compose_env_file=./e2e/compose-env.yaml
|
||||
|
||||
cmd=${1-}
|
||||
|
||||
case "$cmd" in
|
||||
setup)
|
||||
setup "$unique_id" "$compose_env_file"
|
||||
exit
|
||||
;;
|
||||
cleanup)
|
||||
cleanup "$unique_id" "$compose_env_file"
|
||||
exit
|
||||
;;
|
||||
test)
|
||||
engine_host=${2-}
|
||||
if [[ -z "${engine_host}" ]]; then
|
||||
echo "missing parameter docker engine host"
|
||||
echo "Usage: $0 test ENGINE_HOST"
|
||||
exit 3
|
||||
fi
|
||||
runtests "$engine_host"
|
||||
;;
|
||||
run|"")
|
||||
engine_host="$(setup "$unique_id" "$compose_env_file")"
|
||||
testexit=0
|
||||
runtests "$engine_host" || testexit=$?
|
||||
cleanup "$unique_id" "$compose_env_file"
|
||||
exit $testexit
|
||||
;;
|
||||
shell)
|
||||
$SHELL
|
||||
;;
|
||||
*)
|
||||
echo "Unknown command: $cmd"
|
||||
echo "Usage: "
|
||||
echo " $0 [setup | cleanup | test | run] [engine_host]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
9
vendor/github.com/docker/cli/scripts/test/e2e/wait-on-daemon
generated
vendored
9
vendor/github.com/docker/cli/scripts/test/e2e/wait-on-daemon
generated
vendored
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
|
||||
echo "Waiting for docker daemon to become available at $DOCKER_HOST"
|
||||
while ! docker version > /dev/null; do
|
||||
sleep 0.3
|
||||
done
|
||||
|
||||
docker version
|
52
vendor/github.com/docker/cli/scripts/test/e2e/wrapper
generated
vendored
52
vendor/github.com/docker/cli/scripts/test/e2e/wrapper
generated
vendored
|
@ -1,52 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Setup, run and teardown e2e test suite in containers.
|
||||
set -eu -o pipefail
|
||||
|
||||
unique_id="${E2E_UNIQUE_ID:-cliendtoendsuite}"
|
||||
e2e_env_image=docker-cli-e2e-env:$unique_id
|
||||
dev_image=docker-cli-dev:$unique_id
|
||||
|
||||
function run_in_env {
|
||||
local cmd=$1
|
||||
docker run -i --rm \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-e E2E_UNIQUE_ID \
|
||||
"$e2e_env_image" "$cmd"
|
||||
}
|
||||
|
||||
docker build \
|
||||
-t "$e2e_env_image" \
|
||||
-f dockerfiles/Dockerfile.test-e2e-env .
|
||||
|
||||
docker build \
|
||||
-t "$dev_image" \
|
||||
-f dockerfiles/Dockerfile.dev .
|
||||
|
||||
notary_volume="${unique_id}_notary-fixtures"
|
||||
docker volume create --name "$notary_volume"
|
||||
docker run --rm \
|
||||
-v "$PWD:/go/src/github.com/docker/cli" \
|
||||
-v "$notary_volume:/data" \
|
||||
"$dev_image" \
|
||||
cp -r ./e2e/testdata/notary/* /data/
|
||||
|
||||
engine_host=$(run_in_env setup)
|
||||
testexit=0
|
||||
|
||||
|
||||
test_cmd="test"
|
||||
if [[ -n "${TEST_DEBUG-}" ]]; then
|
||||
test_cmd="shell"
|
||||
fi
|
||||
|
||||
docker run -i --rm \
|
||||
-v "$PWD:/go/src/github.com/docker/cli" \
|
||||
-v "$PWD/e2e/testdata/notary/root-ca.cert:/usr/local/share/ca-certificates/notary.cert" \
|
||||
--network "${unique_id}_default" \
|
||||
-e TESTFLAGS \
|
||||
-e ENGINE_HOST="$engine_host" \
|
||||
"$dev_image" \
|
||||
./scripts/test/e2e/run "$test_cmd" "$engine_host" || testexit="$?"
|
||||
|
||||
run_in_env cleanup
|
||||
exit "$testexit"
|
4
vendor/github.com/docker/cli/scripts/test/unit
generated
vendored
4
vendor/github.com/docker/cli/scripts/test/unit
generated
vendored
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
|
||||
go test -v "$@"
|
19
vendor/github.com/docker/cli/scripts/test/unit-with-coverage
generated
vendored
19
vendor/github.com/docker/cli/scripts/test/unit-with-coverage
generated
vendored
|
@ -1,19 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu -o pipefail
|
||||
|
||||
# install test dependencies once before running tests for each package. This
|
||||
# reduces the runtime from 200s down to 23s
|
||||
go test -i "$@"
|
||||
|
||||
for pkg in "$@"; do
|
||||
./scripts/test/unit \
|
||||
-cover \
|
||||
-coverprofile=profile.out \
|
||||
-covermode=atomic \
|
||||
"${pkg}"
|
||||
|
||||
if test -f profile.out; then
|
||||
cat profile.out >> coverage.txt
|
||||
rm profile.out
|
||||
fi
|
||||
done
|
3
vendor/github.com/docker/cli/scripts/test/watch
generated
vendored
3
vendor/github.com/docker/cli/scripts/test/watch
generated
vendored
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
# shellcheck disable=SC2016
|
||||
exec filewatcher -L 6 -x build -x script go test -timeout 30s -v './${dir}'
|
17
vendor/github.com/docker/cli/scripts/validate/check-git-diff
generated
vendored
17
vendor/github.com/docker/cli/scripts/validate/check-git-diff
generated
vendored
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
DIFF_PATH=$1
|
||||
DIFF=$(git status --porcelain -- "$DIFF_PATH")
|
||||
|
||||
if [ "$DIFF" ]; then
|
||||
echo
|
||||
echo "These files were changed:"
|
||||
echo
|
||||
echo "$DIFF"
|
||||
echo
|
||||
exit 1
|
||||
else
|
||||
echo "$DIFF_PATH is correct"
|
||||
fi;
|
5
vendor/github.com/docker/cli/scripts/validate/shellcheck
generated
vendored
5
vendor/github.com/docker/cli/scripts/validate/shellcheck
generated
vendored
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
shellcheck contrib/completion/bash/docker
|
||||
find scripts/ -type f | grep -v scripts/winresources | grep -v '.*.ps1' | xargs shellcheck
|
18
vendor/github.com/docker/cli/scripts/warn-outside-container
generated
vendored
18
vendor/github.com/docker/cli/scripts/warn-outside-container
generated
vendored
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
target="${1:-}"
|
||||
|
||||
if [[ -z "${DISABLE_WARN_OUTSIDE_CONTAINER:-}" ]]; then
|
||||
(
|
||||
echo
|
||||
echo
|
||||
echo "WARNING: you are not in a container."
|
||||
echo "Use \"make -f docker.Makefile $target\" or set"
|
||||
echo "DISABLE_WARN_OUTSIDE_CONTAINER=1 to disable this warning."
|
||||
echo
|
||||
echo "Press Ctrl+C now to abort."
|
||||
echo
|
||||
) >&2
|
||||
sleep 10
|
||||
fi
|
38
vendor/github.com/docker/cli/scripts/winresources/common.rc
generated
vendored
38
vendor/github.com/docker/cli/scripts/winresources/common.rc
generated
vendored
|
@ -1,38 +0,0 @@
|
|||
// Application icon
|
||||
1 ICON "docker.ico"
|
||||
|
||||
// Windows executable manifest
|
||||
1 24 /* RT_MANIFEST */ "docker.exe.manifest"
|
||||
|
||||
// Version information
|
||||
1 VERSIONINFO
|
||||
|
||||
#ifdef DOCKER_VERSION_QUAD
|
||||
FILEVERSION DOCKER_VERSION_QUAD
|
||||
PRODUCTVERSION DOCKER_VERSION_QUAD
|
||||
#endif
|
||||
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "000004B0"
|
||||
BEGIN
|
||||
VALUE "ProductName", DOCKER_NAME
|
||||
|
||||
#ifdef DOCKER_VERSION
|
||||
VALUE "FileVersion", DOCKER_VERSION
|
||||
VALUE "ProductVersion", DOCKER_VERSION
|
||||
#endif
|
||||
|
||||
#ifdef DOCKER_COMMIT
|
||||
VALUE "OriginalFileName", DOCKER_COMMIT
|
||||
#endif
|
||||
|
||||
END
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0000, 0x04B0
|
||||
END
|
||||
END
|
18
vendor/github.com/docker/cli/scripts/winresources/docker.exe.manifest
generated
vendored
18
vendor/github.com/docker/cli/scripts/winresources/docker.exe.manifest
generated
vendored
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<description>Docker</description>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
<!-- Windows 8.1 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||
<!-- Windows Vista -->
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||
<!-- Windows 7 -->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
<!-- Windows 8 -->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
</assembly>
|
BIN
vendor/github.com/docker/cli/scripts/winresources/docker.ico
generated
vendored
BIN
vendor/github.com/docker/cli/scripts/winresources/docker.ico
generated
vendored
Binary file not shown.
Before Width: | Height: | Size: 361 KiB |
BIN
vendor/github.com/docker/cli/scripts/winresources/docker.png
generated
vendored
BIN
vendor/github.com/docker/cli/scripts/winresources/docker.png
generated
vendored
Binary file not shown.
Before Width: | Height: | Size: 643 KiB |
3
vendor/github.com/docker/cli/scripts/winresources/docker.rc
generated
vendored
3
vendor/github.com/docker/cli/scripts/winresources/docker.rc
generated
vendored
|
@ -1,3 +0,0 @@
|
|||
#define DOCKER_NAME "Docker Client"
|
||||
|
||||
#include "common.rc"
|
Loading…
Add table
Add a link
Reference in a new issue