Skip to content

Commit

Permalink
Dockerfile: remove GOMETALINTER_OPTS
Browse files Browse the repository at this point in the history
This `ENV` was added to the Dockerfile in b96093f,
when the repository used per-architecture Dockerfiles, and some architectures needed
a different configuration.

Now that we use a multi-arch Dockerfile, and CI uses a Jenkinsfile, we can remove
this `ENV` from the Dockerfile, and set it in CI instead if needed.

Also updated the wording and fixed linting issues in hack/validate/gometalinter

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Sep 11, 2019
1 parent bbf5c84 commit a464a3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,6 @@ COPY --from=djs55/vpnkit@sha256:e508a17cfacc8fd39261d5b4e397df2b953690da577e2c98

ENV PATH=/usr/local/cli:$PATH
ENV DOCKER_BUILDTAGS apparmor seccomp selinux
# Options for hack/validate/gometalinter
ENV GOMETALINTER_OPTS="--deadline=2m"
WORKDIR /go/src/github.com/docker/docker
VOLUME /var/lib/docker
# Wrap all commands in the "docker-in-docker" script to allow nested containers
Expand Down
7 changes: 4 additions & 3 deletions hack/validate/gometalinter
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ set -e -o pipefail
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# CI platforms differ, so per-platform GOMETALINTER_OPTS can be set
# from a platform-specific Dockerfile, otherwise let's just set
# in the Jenkinsfile, otherwise let's just set a
# (somewhat pessimistic) default of 10 minutes.
: ${GOMETALINTER_OPTS=--deadline=10m}
: "${GOMETALINTER_OPTS=--deadline=10m}"

# shellcheck disable=SC2086
gometalinter \
${GOMETALINTER_OPTS} \
--config ${SCRIPTDIR}/gometalinter.json ./...
--config "${SCRIPTDIR}/gometalinter.json" ./...

0 comments on commit a464a3d

Please sign in to comment.