update vendor

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-09-25 12:27:46 -04:00
parent 19a32db84d
commit 94d1cfbfbf
No known key found for this signature in database
GPG key ID: 18F3685C0022BFF3
10501 changed files with 2307943 additions and 29279 deletions

View file

@ -0,0 +1,26 @@
#!/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"

View file

@ -0,0 +1,14 @@
#!/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

View file

@ -0,0 +1,33 @@
#!/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}"

View file

@ -0,0 +1,14 @@
#!/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}" -buildmode=pie "${SOURCE}"
ln -sf "$(basename "${TARGET}")" build/docker

View file

@ -0,0 +1,21 @@
#!/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}"

View file

@ -0,0 +1,23 @@
#!/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}"

View file

@ -0,0 +1,15 @@
#!/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

View file

@ -0,0 +1,14 @@
#!/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

View file

@ -0,0 +1,8 @@
#!/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"

View file

@ -0,0 +1,44 @@
#!/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

View file

@ -0,0 +1,172 @@
<#
.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)"
}

View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -eu -o pipefail
if [[ -n "${REMOTE_DAEMON-}" ]]; then
# Run tests against a remote daemon.
./scripts/test/e2e/run fetch-images
./scripts/test/e2e/run test "${DOCKER_HOST-}"
else
# Run tests against dind.
./scripts/test/e2e/wrapper
fi

View file

@ -0,0 +1,53 @@
#!/usr/bin/env bash
# Fetch images used for e2e testing
set -eu -o pipefail
alpine_src=alpine@sha256:f006ecbb824d87947d0b51ab8488634bf69fe4094959d935c0c103f4820a417d
alpine_dest=registry:5000/alpine:3.6
busybox_src=busybox@sha256:3e8fa85ddfef1af9ca85a5cfb714148956984e02f00bec3f7f49d3925a91e0e7
busybox_dest=registry:5000/busybox:1.27.2
function fetch_tag_image {
local src=$1
local dest=$2
docker pull "$src"
docker tag "$src" "$dest"
}
function push_image {
local img=$1
docker push "$img"
}
cmd=${1-}
case "$cmd" in
alpine)
fetch_tag_image "$alpine_src" "$alpine_dest"
push_image "$alpine_dest"
exit
;;
busybox)
fetch_tag_image "$busybox_src" "$busybox_dest"
push_image "$busybox_dest"
exit
;;
all|"")
fetch_tag_image "$alpine_src" "$alpine_dest"
push_image "$alpine_dest"
fetch_tag_image "$busybox_src" "$busybox_dest"
push_image "$busybox_dest"
exit
;;
fetch-only)
fetch_tag_image "$alpine_src" "$alpine_dest"
fetch_tag_image "$busybox_src" "$busybox_dest"
exit
;;
*)
echo "Unknown command: $cmd"
echo "Usage:"
echo " $0 [alpine | busybox | all | fetch-only]"
exit 1
;;
esac

View file

@ -0,0 +1,107 @@
#!/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 fetch_images {
./scripts/test/e2e/load-image fetch-only
}
function setup {
local project=$1
local file=$2
test "${DOCKERD_EXPERIMENTAL:-}" -eq "1" && file="${file}:./e2e/compose-env.experimental.yaml"
COMPOSE_PROJECT_NAME=$project COMPOSE_FILE=$file docker-compose up --build -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 200 ./scripts/test/e2e/wait-on-daemon
./scripts/test/e2e/load-image
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 {
local project=$1
local network="${project}_default"
docker network disconnect "$network" "$(hostname)"
COMPOSE_PROJECT_NAME=$1 COMPOSE_FILE=$2 docker-compose down -v --rmi local >&2
}
function runtests {
local engine_host=$1
# shellcheck disable=SC2086
env -i \
TEST_DOCKER_HOST="$engine_host" \
TEST_DOCKER_CERT_PATH="${DOCKER_CERT_PATH-}" \
TEST_KUBECONFIG="${KUBECONFIG-}" \
TEST_REMOTE_DAEMON="${REMOTE_DAEMON-}" \
TEST_SKIP_PLUGIN_TESTS="${SKIP_PLUGIN_TESTS-}" \
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
;;
fetch-images)
fetch_images
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

View file

@ -0,0 +1,9 @@
#!/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

View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Setup, run and teardown e2e test suite in containers.
set -eu -o pipefail
engine_host=$(./scripts/test/e2e/run setup)
testexit=0
test_cmd="test"
if [[ -n "${TEST_DEBUG-}" ]]; then
test_cmd="shell"
fi
./scripts/test/e2e/run "$test_cmd" "$engine_host" || testexit="$?"
./scripts/test/e2e/run cleanup
exit "$testexit"

View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -eu -o pipefail
# TODO fetch images?
./scripts/test/engine/wrapper

View file

@ -0,0 +1,107 @@
#!/usr/bin/env bash
# Run engine specific integration tests against the latest containerd-in-docker
set -eu -o pipefail
function container_ip {
local cid=$1
local network=$2
docker inspect \
-f "{{.NetworkSettings.Networks.${network}.IPAddress}}" "$cid"
}
function fetch_images {
## TODO - not yet implemented
./scripts/test/engine/load-image fetch-only
}
function setup {
### start containerd and log to a file
echo "Starting containerd in the background"
containerd 2&> /tmp/containerd.err &
echo "Waiting for containerd to be responsive"
# shellcheck disable=SC2034
for i in $(seq 1 60); do
if ctr namespace ls > /dev/null; then
break
fi
sleep 1
done
ctr namespace ls > /dev/null
echo "containerd is ready"
# TODO Once https://github.com/moby/moby/pull/33355 or equivalent
# is merged, then this can be optimized to preload the image
# saved during the build phase
}
function cleanup {
#### if testexit is non-zero dump the containerd logs with a banner
if [ "${testexit}" -ne 0 ] ; then
echo "FAIL: dumping containerd logs"
echo ""
cat /tmp/containerd.err
if [ -f /var/log/engine.log ] ; then
echo ""
echo "FAIL: dumping engine log"
echo ""
else
echo ""
echo "FAIL: engine log missing"
echo ""
fi
echo "FAIL: remaining namespaces"
ctr namespace ls || /bin/tru
echo "FAIL: remaining containers"
ctr --namespace docker container ls || /bin/tru
echo "FAIL: remaining tasks"
ctr --namespace docker task ls || /bin/tru
echo "FAIL: remaining snapshots"
ctr --namespace docker snapshots ls || /bin/tru
echo "FAIL: remaining images"
ctr --namespace docker image ls || /bin/tru
fi
}
function runtests {
# shellcheck disable=SC2086
env -i \
GOPATH="$GOPATH" \
PATH="$PWD/build/:${PATH}" \
VERSION=${VERSION} \
"$(which go)" test -p 1 -parallel 1 -v ./e2eengine/... ${TESTFLAGS-}
}
cmd=${1-}
case "$cmd" in
setup)
setup
exit
;;
cleanup)
cleanup
exit
;;
fetch-images)
fetch_images
exit
;;
test)
runtests
;;
run|"")
testexit=0
runtests || testexit=$?
cleanup
exit $testexit
;;
shell)
$SHELL
;;
*)
echo "Unknown command: $cmd"
echo "Usage: "
echo " $0 [setup | cleanup | test | run]"
exit 1
;;
esac

View file

@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Setup, run and teardown engine test suite in containers.
set -eu -o pipefail
./scripts/test/engine/run setup
testexit=0
test_cmd="test"
if [[ -n "${TEST_DEBUG-}" ]]; then
test_cmd="shell"
fi
./scripts/test/engine/run "$test_cmd" || testexit="$?"
export testexit
./scripts/test/engine/run cleanup
exit "$testexit"

View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -eu -o pipefail
go test -v "$@"

View file

@ -0,0 +1,20 @@
#!/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 "$@"
echo "mode: atomic" > coverage.txt
for pkg in "$@"; do
./scripts/test/unit \
-cover \
-coverprofile=profile.out \
-covermode=atomic \
"${pkg}"
if test -f profile.out; then
grep -v "^mode:" < profile.out >> coverage.txt || true
rm profile.out
fi
done

View file

@ -0,0 +1,17 @@
#!/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;

View file

@ -0,0 +1,5 @@
#!/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

View file

@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -eu
target="${1:-}"
if [[ "$target" != "help" && -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

View file

@ -0,0 +1,38 @@
// 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

View file

@ -0,0 +1,18 @@
<?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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 KiB

View file

@ -0,0 +1,3 @@
#define DOCKER_NAME "Docker Client"
#include "common.rc"