Skip to content

Commit

Permalink
all: pin version on all docker images (#369)
Browse files Browse the repository at this point in the history
Signed-off-by: Matheus Alcantara <[email protected]>
  • Loading branch information
matheusalcantarazup authored Oct 11, 2021
1 parent 7193873 commit a7bc2c3
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 18 deletions.
4 changes: 2 additions & 2 deletions analytic/deployments/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:alpine AS builder
FROM golang:1.17-alpine AS builder

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

Expand All @@ -25,7 +25,7 @@ RUN go get -t -v -d ./...
RUN GOOS=linux go build -a -o horusec-analytic-main ./cmd/app/main.go
RUN GOOS=linux go build -a -o horusec-analytic-v1-to-v2-migrate ./cmd/migration/v2/main.go

FROM alpine
FROM alpine:3.14.2

COPY --from=builder /analytic/horusec-analytic-main .
COPY --from=builder /analytic/horusec-analytic-v1-to-v2-migrate .
Expand Down
4 changes: 2 additions & 2 deletions api/deployments/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:alpine AS builder
FROM golang:1.17-alpine AS builder

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

Expand All @@ -25,7 +25,7 @@ RUN go get -t -v -d ./...
RUN GOOS=linux go build -a -o horusec-api-main ./cmd/app/main.go
RUN GOOS=linux go build -a -o horusec-api-v1-to-v2-migrate ./cmd/migration/v2/main.go

FROM alpine
FROM alpine:3.14.2

COPY --from=builder /api/horusec-api-main .
COPY --from=builder /api/horusec-api-v1-to-v2-migrate .
Expand Down
4 changes: 2 additions & 2 deletions auth/deployments/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:alpine AS builder
FROM golang:1.17-alpine AS builder

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

Expand All @@ -24,7 +24,7 @@ RUN go get -t -v -d ./...

RUN GOOS=linux go build -a -o horusec-auth-main ./cmd/app/main.go

FROM alpine
FROM alpine:3.14.2

COPY --from=builder /auth/horusec-auth-main .

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

FROM golang:alpine AS builder
FROM golang:1.17-alpine AS builder

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

Expand All @@ -24,7 +24,7 @@ RUN go get -t -v -d ./...

RUN GOOS=linux go build -a -o horusec-core-main ./cmd/app/main.go

FROM alpine
FROM alpine:3.14.2

COPY --from=builder /core/horusec-core-main .

Expand Down
18 changes: 16 additions & 2 deletions deployments/dockerfiles/all-in-one/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
FROM golang:alpine AS builder-backend
# Copyright 2021 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.17-alpine AS builder

RUN apk add build-base

Expand All @@ -22,7 +36,7 @@ RUN cd vulnerability && OOS=linux go build -a -o /bin/horusec-vulnerability-main
RUN cd webhook && go get -t -v -d ./...
RUN cd webhook && OOS=linux go build -a -o /bin/horusec-webhook-main ./cmd/app/main.go

FROM node:alpine AS builder-manager
FROM node:16.10.0-alpine3.14 AS builder-manager

WORKDIR /usr/src/app

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

FROM golang:alpine AS builder
FROM golang:1.17-alpine AS builder

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

Expand All @@ -24,7 +24,7 @@ RUN go get -t -v -d ./...

RUN GOOS=linux go build -a -o horusec-messages-main ./cmd/app/main.go

FROM alpine
FROM alpine:3.14.2

COPY --from=builder /messages/horusec-messages-main .

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

FROM golang:alpine as builder
FROM golang:1.17-alpine AS builder

RUN go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest

Expand All @@ -27,4 +27,4 @@ COPY ./scripts/migrate.sh /usr/local/bin
RUN chmod +x /usr/local/bin/migrate.sh
RUN chmod +x /usr/local/bin/migrate

ENTRYPOINT [ "migrate.sh" ]
ENTRYPOINT [ "migrate.sh" ]
4 changes: 2 additions & 2 deletions vulnerability/deployments/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:alpine AS builder
FROM golang:1.17-alpine AS builder

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

Expand All @@ -24,7 +24,7 @@ RUN go get -t -v -d ./...

RUN GOOS=linux go build -a -o horusec-vulnerability-main ./cmd/app/main.go

FROM alpine
FROM alpine:3.14.2

COPY --from=builder /vulnerability/horusec-vulnerability-main .

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

FROM golang:alpine AS builder
FROM golang:1.17-alpine AS builder

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

Expand All @@ -24,7 +24,7 @@ RUN go get -t -v -d ./...

RUN GOOS=linux go build -a -o horusec-webhook-main ./cmd/app/main.go

FROM alpine
FROM alpine:3.14.2

COPY --from=builder /webhook/horusec-webhook-main .

Expand Down

0 comments on commit a7bc2c3

Please sign in to comment.