Skip to content

Commit

Permalink
fix: enable hadolint linter in super linter
Browse files Browse the repository at this point in the history
Signed-off-by: riya-singhal31 <[email protected]>
  • Loading branch information
riya-singhal31 authored and mergify[bot] committed Jul 12, 2023
1 parent ddd023a commit ef7ac6e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/lint-extras.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
env:
FILTER_REGEX_EXCLUDE: >
(.*vendor/.*)|(.*tools/vendor/.*)
VALIDATE_DOCKERFILE_HADOLINT: false
VALIDATE_GO: false
VALIDATE_JSCPD: false
VALIDATE_KUBERNETES_KUBECONFORM: false
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM golang:1.20 as builder

# Copy the contents of the repository
ADD . /workspace/go/src/github.com/csi-addons/kubernetes-csi-addons
COPY . /workspace/go/src/github.com/csi-addons/kubernetes-csi-addons

ENV GOPATH=/workspace/go CGO_ENABLED=0
WORKDIR /workspace/go/src/github.com/csi-addons/kubernetes-csi-addons
Expand Down
4 changes: 3 additions & 1 deletion build/Containerfile.sidecar
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM golang:1.20 as builder

# Copy the contents of the repository
ADD . /workspace/go/src/github.com/csi-addons/kubernetes-csi-addons
COPY . /workspace/go/src/github.com/csi-addons/kubernetes-csi-addons

ENV GOPATH=/workspace/go CGO_ENABLED=0
WORKDIR /workspace/go/src/github.com/csi-addons/kubernetes-csi-addons
Expand All @@ -12,6 +12,8 @@ RUN make build

# Use distroless as minimal base image to package the sidecar binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
# DL3007 ignored as it asks to pin the version explicitly to a release tag
# hadolint ignore=DL3007
FROM gcr.io/distroless/static:latest
WORKDIR /
COPY --from=builder /workspace/go/src/github.com/csi-addons/kubernetes-csi-addons/bin/csi-addons-sidecar /usr/sbin/
Expand Down
8 changes: 6 additions & 2 deletions build/Containerfile.tools
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# DL3007 ignored as it asks to pin the version explicitly to a release tag
# hadolint ignore=DL3007
FROM quay.io/fedora/fedora:latest

ENV GOPATH=/go \
PATH="${GOPATH}/bin:${PATH}"
ENV GOPATH=/go
ENV PATH="${GOPATH}/bin:${PATH}"

# DL3041 ignored as it asks to specify version with `dnf install -y <package>-<version>
# hadolint ignore=DL3041
RUN dnf -y install \
git \
make \
Expand Down

0 comments on commit ef7ac6e

Please sign in to comment.