mirror of
https://github.com/hanzoai/vector-go.git
synced 2026-10-30 18:18:35 +00:00
Both modules declare go 1.27.1 and the example image follows. go fix applied the modernizers; omitzero is not applied, since it changes what the JSON says. Co-authored-by: Hanzo Dev <[email protected]>
17 lines
250 B
Docker
17 lines
250 B
Docker
FROM golang:1.27.1-alpine
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy go mod files
|
|
COPY go.mod go.sum ./
|
|
|
|
# Download dependencies
|
|
RUN go mod download
|
|
|
|
# Copy source code
|
|
COPY main.go ./
|
|
|
|
# Build and run the application
|
|
CMD ["go", "run", "main.go"]
|