mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
- [x] fix warnings about case of `as` to `AS` in Dockerfile - `FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)` - [x] shorten go version in go.mod - [x] update Dockerfile Go version from 1.17 to 1.22 to match go.mod - [x] upgrade alipine/git image version to latest, current was 4 years old - -from alpine/git:v2.24.3 (4 years old) to alpine/git:v2.45.2 - [x] fix warning with linting - `WARN [config_reader] The configuration option 'run.skip-files' is deprecated, please use 'issues.exclude-files'` - [x] add .tool-versions (asdf) to .gitignore Signed-off-by: jmeridth <jmeridth@gmail.com>
16 lines
315 B
Docker
16 lines
315 B
Docker
FROM golang:1.22 AS builder
|
|
|
|
WORKDIR /src
|
|
|
|
COPY go.mod /src/go.mod
|
|
COPY go.sum /src/go.sum
|
|
|
|
RUN go mod download
|
|
|
|
# Perform the build
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /dist/gitops ./agent
|
|
|
|
|
|
FROM alpine/git:v2.45.2
|
|
COPY --from=builder /dist/gitops /usr/local/bin/gitops
|