-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (21 loc) · 883 Bytes
/
Copy pathDockerfile
File metadata and controls
35 lines (21 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM golang:1.24.7-alpine AS proxy
WORKDIR /app
COPY ./go.* ./
RUN go mod download
COPY ./ .
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X 'main.Version=${APP_VERSION}' -X 'main.BuildDate=${BUILD_TIME}'" -o /go/bin/proxy /app/cmd/main.go
##############
## Base Image
##############
FROM alpine:3.20
WORKDIR /app
RUN wget -O vector.tar.gz https://github.com/vectordotdev/vector/releases/download/v0.55.0/vector-0.55.0-x86_64-unknown-linux-musl.tar.gz && \
tar -xvf vector.tar.gz && \
cp vector-x86_64-unknown-linux-musl/bin/vector /usr/bin/vector && \
cp -R vector-x86_64-unknown-linux-musl/etc/systemd /etc/systemd && \
rm vector.tar.gz
COPY vector.toml /etc/vector/vector.toml
COPY --from=proxy /go/bin/proxy /go/bin/proxy
COPY entrypoint.sh /app/entrypoint.sh
LABEL org.swarm-deploy.service.type=monitoring
ENTRYPOINT ["/app/entrypoint.sh"]