-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add traffic generator 2 docker file. (#817)
Signed-off-by: Cody Littley <cody@eigenlabs.org>
- Loading branch information
1 parent
febcd95
commit 36137c3
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM golang:1.21.1-alpine3.18 as builder | ||
|
||
RUN apk add --no-cache make musl-dev linux-headers gcc git jq bash | ||
|
||
WORKDIR /app | ||
|
||
# Copy Entire Repo here in order to not copy individual dependencies | ||
COPY . . | ||
|
||
WORKDIR /app/tools/traffic | ||
|
||
RUN --mount=type=cache,target=/go/pkg/mod \ | ||
--mount=type=cache,target=/root/.cache/go-build \ | ||
go build -o ./bin/generator ./cmd2 | ||
|
||
FROM alpine:3.18 as generator2 | ||
|
||
COPY --from=builder /app/tools/traffic/bin/generator /usr/local/bin | ||
|
||
ENTRYPOINT ["generator"] |