2020-11-12 21:26:38 +03:00
|
|
|
# Copyright 2020 Security Scorecard Authors
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2021-08-12 19:54:32 +03:00
|
|
|
FROM golang@sha256:3c4de86eec9cbc619cdd72424abd88326ffcf5d813a8338a7743c55e5898734f AS base
|
2021-01-05 16:45:15 +03:00
|
|
|
WORKDIR /src
|
|
|
|
ENV CGO_ENABLED=0
|
2021-02-09 00:33:59 +03:00
|
|
|
COPY go.* ./
|
2021-01-05 16:45:15 +03:00
|
|
|
RUN go mod download
|
2021-02-09 00:33:59 +03:00
|
|
|
COPY . ./
|
2021-01-05 16:45:15 +03:00
|
|
|
|
|
|
|
FROM base AS build
|
|
|
|
ARG TARGETOS
|
|
|
|
ARG TARGETARCH
|
2021-05-15 23:58:01 +03:00
|
|
|
RUN CGO_ENABLED=0 make build-scorecard
|
2021-01-05 16:45:15 +03:00
|
|
|
|
2021-07-26 20:00:10 +03:00
|
|
|
FROM gcr.io/distroless/base:nonroot@sha256:ccbc79c4fc35b92709d3987315cdb9e20b6e742546af7a7db10024641aa60572
|
2021-03-29 04:18:34 +03:00
|
|
|
COPY --from=build /src/scorecard /
|
2021-01-05 16:45:15 +03:00
|
|
|
ENTRYPOINT [ "/scorecard" ]
|