Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ linters:
min-occurrences: 2

gomoddirectives:
# Allow local `replace` directives. Default is false.
replace-local: false
# Allow local `replace` directives (e.g. dev-tools submodule in go.mod).
replace-local: true
gomodguard:
blocked:
# List of blocked modules.
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ WORKDIR /fleet-server

# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
COPY go.mod go.sum ./
COPY dev-tools/go.mod dev-tools/go.sum ./dev-tools/
RUN go mod download && go mod verify
RUN go install github.com/magefile/mage # Uses version from go.mod implicitly
ENV PATH="$PATH:/go/bin"
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ USER fleet-server
WORKDIR /fleet-server/
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
COPY go.mod go.sum ./
COPY dev-tools/go.mod dev-tools/go.sum ./dev-tools/
RUN go mod download && go mod verify
RUN go install github.com/magefile/mage # uses version in go.mod

Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.fips
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ WORKDIR /fleet-server/

# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
COPY go.mod go.sum ./
COPY dev-tools/go.mod dev-tools/go.sum ./dev-tools/
# GOFIPS140 must be set before go mod download so that the golang.org/fips140 module is cached during image build.
# Without this, the module would be fetched at build time by the host user who lacks write access to the module cache.
ENV GOFIPS140=certified
Expand All @@ -32,6 +33,7 @@ FROM docker.elastic.co/beats-dev/golang-crossbuild:${GO_VERSION}-${SUFFIX} AS bu
WORKDIR /fleet-server
ENV PATH="$PATH:/go/bin"
COPY go.mod go.sum ./
COPY dev-tools/go.mod dev-tools/go.sum ./dev-tools/
RUN go mod download && go mod verify
RUN go install github.com/magefile/mage # uses version in go.mod

Expand Down
Loading
Loading