mirror of
https://github.com/crazy-max/diun.git
synced 2025-02-04 20:18:31 +00:00
1e3d436a75
* Bump github.com/containers/image/v5 from 5.9.0 to 5.10.1 Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.9.0 to 5.10.1. - [Release notes](https://github.com/containers/image/releases) - [Commits](https://github.com/containers/image/compare/v5.9.0...v5.10.1) Signed-off-by: dependabot[bot] <support@github.com> * Add linux-headers Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
20 lines
589 B
Docker
20 lines
589 B
Docker
# syntax=docker/dockerfile:1.2
|
|
ARG GO_VERSION=1.15
|
|
|
|
FROM golang:${GO_VERSION}-alpine AS base
|
|
RUN apk add --no-cache gcc linux-headers musl-dev
|
|
WORKDIR /src
|
|
|
|
FROM base AS gomod
|
|
RUN --mount=type=bind,target=.,rw \
|
|
--mount=type=cache,target=/go/pkg/mod \
|
|
go mod tidy && go mod download
|
|
|
|
FROM gomod AS test
|
|
RUN --mount=type=bind,target=. \
|
|
--mount=type=cache,target=/go/pkg/mod \
|
|
--mount=type=cache,target=/root/.cache/go-build \
|
|
go test -v -coverprofile=/tmp/coverage.txt -covermode=atomic -race ./...
|
|
|
|
FROM scratch AS test-coverage
|
|
COPY --from=test /tmp/coverage.txt /coverage.txt
|