-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: put atest-collector into the image (#87)
* feat: put atest-collector into the image * doc: add instructions about how to use in Docker
- Loading branch information
1 parent
ec32ff3
commit 1fd4586
Showing
3 changed files
with
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ on: | |
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- master | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
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 |
---|---|---|
|
@@ -3,15 +3,19 @@ FROM golang:1.18 AS builder | |
WORKDIR /workspace | ||
COPY cmd/ cmd/ | ||
COPY pkg/ pkg/ | ||
COPY extensions/ extensions/ | ||
COPY sample/ sample/ | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
COPY go.work go.work | ||
COPY go.work.sum go.work.sum | ||
COPY main.go main.go | ||
COPY README.md README.md | ||
COPY LICENSE LICENSE | ||
|
||
RUN go mod download | ||
RUN CGO_ENABLE=0 go build -ldflags "-w -s" -o atest . | ||
RUN CGO_ENABLE=0 go build -ldflags "-w -s" -o atest-collector extensions/collector/main.go | ||
|
||
FROM ubuntu:23.04 | ||
|
||
|
@@ -27,6 +31,7 @@ LABEL "maintainer"="Rick <[email protected]>" | |
LABEL "Name"="API testing" | ||
|
||
COPY --from=builder /workspace/atest /usr/local/bin/atest | ||
COPY --from=builder /workspace/atest-collector /usr/local/bin/atest-collector | ||
COPY --from=builder /workspace/LICENSE /LICENSE | ||
COPY --from=builder /workspace/README.md /README.md | ||
|
||
|
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