Skip to content

Commit

Permalink
feat: fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
linkxzhou committed Feb 15, 2025
1 parent 1d98bc9 commit 9b66498
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ services:
codeUri: ./

customContainer:
image: golang:1.20
command:
- /bin/sh
- -c
- 'go mod tidy && CGO_ENABLED=0 GOOS=linux go build -o /code/http_bench .'
dockerfile: |
FROM golang:1.20 AS builder
WORKDIR /build
COPY . .
RUN go mod tidy && CGO_ENABLED=0 GOOS=linux go build -o http_bench .
FROM debian:buster-slim
WORKDIR /code
COPY --from=builder /build/http_bench /code/
CMD ["/code/http_bench", "-dashboard", "0.0.0.0:9000"]
triggers:
- name: httpTrigger
Expand Down

0 comments on commit 9b66498

Please sign in to comment.