diff --git a/.docker/Dockerfile b/.docker/Dockerfile new file mode 100644 index 0000000..dc9dfe4 --- /dev/null +++ b/.docker/Dockerfile @@ -0,0 +1,13 @@ +FROM golang:1.25 AS build-stage + +WORKDIR /app + +COPY . /app/ + +RUN go build -ldflags="-s -w" -o shm-agent ./cmd/shm-agent + +FROM golang:1.25 AS production-stage + +COPY --from=build-stage /app/shm-agent /usr/local/go/bin/shm-agent + +WORKDIR /app diff --git a/README.md b/README.md index 3a95bdf..fe4f063 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,14 @@ A lightweight, autonomous agent that collects metrics by parsing log files and s ### From Source ```bash -git clone https://github.com/kolapsis/shm-agent.git +git clone https://github.com/btouchard/shm-agent.git cd shm-agent go build -ldflags="-s -w" -o shm-agent ./cmd/shm-agent ``` ### Binary Releases -Download pre-built binaries from the [Releases](https://github.com/kolapsis/shm-agent/releases) page. +Download pre-built binaries from the [Releases](https://github.com/btouchard/shm-agent/releases) page. ## Quick Start diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..9d2c539 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,9 @@ +services: + + shm-agent: + pull_policy: build + build: + context: . + dockerfile: .docker/Dockerfile + volumes: + - "./testdata:/app/testdata"