api-testing/Dockerfile

24 lines
614 B
Docker
Raw Normal View History

FROM golang:1.18 as builder
2022-06-08 17:32:17 +08:00
WORKDIR /workspace
COPY . .
RUN go mod download
RUN CGO_ENABLE=0 go build -ldflags "-w -s" -o atest .
2022-06-08 17:32:17 +08:00
FROM ubuntu:23.04
2022-06-08 17:32:17 +08:00
LABEL "com.github.actions.name"="API testing"
LABEL "com.github.actions.description"="API testing"
LABEL "com.github.actions.icon"="home"
LABEL "com.github.actions.color"="red"
LABEL "repository"="https://github.com/linuxsuren/api-testing"
LABEL "homepage"="https://github.com/linuxsuren/api-testing"
LABEL "maintainer"="Rick <linuxsuren@gmail.com>"
LABEL "Name"="API testing"
COPY --from=builder /workspace/atest /usr/local/bin/atest
2022-06-08 17:32:17 +08:00
CMD ["atest", "server"]