Compare commits
4 Commits
89b715ec9a
...
f57a971951
| Author | SHA1 | Date | |
|---|---|---|---|
| f57a971951 | |||
| bef3300198 | |||
| 873875c33a | |||
| a679d229f8 |
@@ -4,8 +4,19 @@
|
||||
commands:
|
||||
- go test ./...
|
||||
volumes:
|
||||
- go_cache:/root/.cache/go-build
|
||||
- go_build_cache:/root/.cache/go-build
|
||||
- go_mod_cache:/go/pkg/mod
|
||||
build:
|
||||
image: golang:1.26
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GOOS: linux
|
||||
commands:
|
||||
- go build -o server ./cmd/serve
|
||||
volumes:
|
||||
- go_build_cache:/root/.cache/go-build
|
||||
- go_mod_cache:/go/pkg/mod
|
||||
container:
|
||||
image: docker
|
||||
commands:
|
||||
- apk add curl
|
||||
@@ -23,4 +34,5 @@
|
||||
branch: "master"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- go_cache:/root/.cache/go-build
|
||||
- go_build_cache:/root/.cache/go-build
|
||||
- go_mod_cache:/go/pkg/mod
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
FROM golang:1.26
|
||||
WORKDIR /src
|
||||
COPY . ./
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o server ./cmd/serve
|
||||
|
||||
FROM scratch
|
||||
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
COPY --from=0 /src/server ./
|
||||
COPY server ./
|
||||
CMD ["/server"]
|
||||
Reference in New Issue
Block a user