Skip to content

Commit

Permalink
dockerfiles:bugfix - updating docker base image (#983)
Browse files Browse the repository at this point in the history
With the apk update && apk upgrade commands for some reason goreleaser
was't hable to build the images. This pr updates the dockerfiles to use
a diferent base image of the docker that doesn't contains the expat
vulnerabilities.

Signed-off-by: Nathan Martins <nathan.martins@zup.com.br>
  • Loading branch information
nathanmartinszup authored Feb 11, 2022
1 parent b6d92cd commit 1b9673d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions deployments/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

FROM golang:1.17-alpine AS builder

RUN apk update && apk add --no-cache git
RUN apk add --no-cache git

ADD . /horusec
WORKDIR /horusec
Expand All @@ -23,9 +23,9 @@ RUN go mod download

RUN env GOOS=linux go build -ldflags '-s -w' -o /bin/horusec ./cmd/app/main.go

FROM docker:20.10-git
FROM docker:20.10-dind

RUN apk update --no-cache && apk upgrade --no-cache
RUN apk add git --no-cache

COPY --from=builder /bin/horusec /usr/local/bin
RUN chmod +x /usr/local/bin/horusec
Expand Down
4 changes: 2 additions & 2 deletions deployments/Dockerfile-gorelease-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM docker:20.10-git
FROM docker:20.10-dind

RUN apk update --no-cache && apk upgrade --no-cache
RUN apk add git --no-cache

COPY /horusec_linux_amd64 /usr/local/bin/horusec

Expand Down
4 changes: 2 additions & 2 deletions deployments/Dockerfile-gorelease-arm64
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM docker:20.10-git
FROM docker:20.10-dind

RUN apk update --no-cache && apk upgrade --no-cache
RUN apk add git --no-cache

COPY /horusec_linux_arm64 /usr/local/bin/horusec

Expand Down

0 comments on commit 1b9673d

Please sign in to comment.