File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,36 +2,17 @@ FROM golang:1.23-alpine AS builder
22
33WORKDIR /app
44
5- # Copy go mod files
65COPY go.mod go.sum ./
7-
8- # Download dependencies
96RUN go mod download
107
11- # Copy source code
128COPY main.go ./
13-
14- # Build application
159RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o agent main.go
1610
17- # Use elasticsearch base image to access elasticsearch-keystore command
18- FROM docker.io/elasticsearch:8.8.2
19-
20- # Install necessary tools
21- USER root
22- RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
11+ FROM alpine:3.21
2312
24- # Copy agent binary
2513COPY --from=builder /app/agent /usr/local/bin/agent
26-
27- # Make agent executable
2814RUN chmod +x /usr/local/bin/agent
2915
30- # Switch back to elasticsearch user
31- USER elasticsearch
32-
33- # Expose agent port
3416EXPOSE 8080
3517
36- # Start agent
3718CMD ["/usr/local/bin/agent" ]
Original file line number Diff line number Diff line change 22
33IMAGE_REGISTRY ?= apecloud-registry.cn-zhangjiakou.cr.aliyuncs.com
44IMAGE_REPOSITORY ?= apecloud/elasticsearch-agent
5- IMAGE_TAG ?= 0.1.0
5+ IMAGE_TAG ?= 0.1.1
66FULL_IMAGE_NAME = $(IMAGE_REGISTRY ) /$(IMAGE_REPOSITORY ) :$(IMAGE_TAG )
77PLATFORMS ?= linux/amd64,linux/arm64
88
Original file line number Diff line number Diff line change 3333 tag : " 8.8.2"
3434 agent :
3535 repository : apecloud/elasticsearch-agent
36- tag : " 0.1.0 "
36+ tag : " 0.1.1 "
3737 # elasticsearch-dump: https://github.com/elasticsearch-dump/elasticsearch-dump
3838 esDump :
3939 repository : elasticdump/elasticsearch-dump
You can’t perform that action at this time.
0 commit comments