Files
docker-cli/components/cli/scripts/warn-outside-container
Sebastiaan van Stijn 6006ae7e52 Use official shellcheck image
This patch switches the shellcheck image to use the official image
from Docker Hub.

Note that this does not yet update shellcheck to the latest version (v0.5.x);
Shellcheck v0.4.7 added some new checks, which makes CI currently fail, so will
be done in a follow-up PR. Instead, the v0.4.6 version is used in this PR, which
is closest to the same version as was installed in the image before this change;

```
docker run --rm docker-cli-shell-validate shellcheck --version
ShellCheck - shell script analysis tool
version: 0.4.4
license: GNU General Public License, version 3
website: http://www.shellcheck.net
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 388646eab0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b59752479b
Component: cli
2019-03-26 14:26:45 +01:00

19 lines
438 B
Bash
Executable File

#!/usr/bin/env sh
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