Skip to content

Commit

Permalink
Use official shellcheck image
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
thaJeztah committed Feb 26, 2019
1 parent cdba45b commit 2cdf492
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
11 changes: 4 additions & 7 deletions dockerfiles/Dockerfile.shellcheck
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
FROM debian:stretch-slim

RUN apt-get update && \
apt-get -y install make shellcheck && \
apt-get clean

FROM koalaman/shellcheck-alpine:v0.4.6
RUN apk add --no-cache make
WORKDIR /go/src/github.com/docker/cli
ENV DISABLE_WARN_OUTSIDE_CONTAINER=1
CMD bash
ENTRYPOINT [""]
CMD ["/bin/sh"]
COPY . .
2 changes: 1 addition & 1 deletion scripts/validate/shellcheck
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
set -eo pipefail

shellcheck contrib/completion/bash/docker
Expand Down
4 changes: 2 additions & 2 deletions scripts/warn-outside-container
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
set -eu

target="${1:-}"

if [[ "$target" != "help" && -z "${DISABLE_WARN_OUTSIDE_CONTAINER:-}" ]]; then
if [ "$target" != "help" ] && [ -z "${DISABLE_WARN_OUTSIDE_CONTAINER:-}" ]; then
(
echo
echo
Expand Down

0 comments on commit 2cdf492

Please sign in to comment.