mirror of
https://github.com/tiennm99/docker-images.git
synced 2026-08-01 02:21:02 +00:00
Introduces a complete runnable example for the Scribe logging image, featuring: - docker-compose.yml orchestrating scribe daemon and Go test sender - Go test sender application (main.go, go.mod, Dockerfile) - Example README with setup and usage instructions - Updated scribe/README.md with Runnable Example section
11 lines
266 B
Docker
11 lines
266 B
Docker
# Multi-stage build: compile a static binary, ship it on a minimal runtime.
|
|
FROM golang:1.22-alpine AS build
|
|
WORKDIR /src
|
|
COPY go.mod .
|
|
COPY main.go .
|
|
RUN CGO_ENABLED=0 go build -o /sender .
|
|
|
|
FROM alpine:3.20
|
|
COPY --from=build /sender /sender
|
|
ENTRYPOINT ["/sender"]
|