mirror of
https://github.com/jpillora/chisel
synced 2026-06-08 15:07:02 +00:00
docker to use scratch
This commit is contained in:
@@ -21,7 +21,7 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Build
|
||||
run: go build -v .
|
||||
run: go build -v -o /dev/null .
|
||||
- name: Test
|
||||
run: go test -v ./...
|
||||
# ================
|
||||
@@ -67,7 +67,6 @@ jobs:
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: jpillora/chisel
|
||||
tag-latest: true
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
|
||||
+2
-2
@@ -9,8 +9,8 @@ RUN go build \
|
||||
-ldflags "-X github.com/jpillora/chisel/share.BuildVersion=$(git describe --abbrev=0 --tags)" \
|
||||
-o chisel
|
||||
# run stage
|
||||
FROM gcr.io/distroless/static-debian11
|
||||
FROM scratch
|
||||
COPY --from=alpine:latest /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
WORKDIR /app
|
||||
CMD ["/app"]
|
||||
COPY --from=build /src/chisel /app/chisel
|
||||
ENTRYPOINT ["/app/chisel"]
|
||||
Reference in New Issue
Block a user