From 7248c03dd79d945019642f44eeb79005ef702636 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Tue, 2 Jan 2024 13:47:02 +0100 Subject: [PATCH] cleanup dockerfile --- Dockerfile | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 739bc83..d571037 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,10 +5,6 @@ ENV GO111MODULE=on RUN apk update && \ apk add bash jq alpine-sdk sed gawk git ca-certificates curl mc && \ apk add --no-cache gcc musl-dev -RUN go install honnef.co/go/tools/cmd/staticcheck@v0.4.2 && \ - go install github.com/rakyll/statik@v0.1.7 && \ - go install github.com/golang/mock/mockgen@v1.6.0 && \ - go install github.com/go-swagger/go-swagger/cmd/swagger@v0.30.2 WORKDIR /app @@ -19,17 +15,10 @@ RUN go mod download # Copy project code COPY . /app -# lint and unit tests -RUN staticcheck ./... && \ - go vet ./... && \ - CGO_ENABLED=0 GOOS=linux go test ./... - RUN addgroup -S -g 1000 radix && adduser -S -u 1000 -G radix radix # Build -RUN swagger generate client -t ./generated-client -f https://api.radix.equinor.com/swaggerui/swagger.json -A radixapi && \ - go mod tidy && \ - CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w" -a -installsuffix cgo -o ./rootfs/rx +RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w" -a -installsuffix cgo -o ./rootfs/rx ## Run operator FROM scratch