Skip to content

Commit e546a6d

Browse files
committed
docker to use scratch
1 parent 4246b64 commit e546a6d

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Checkout code
2222
uses: actions/checkout@v3
2323
- name: Build
24-
run: go build -v .
24+
run: go build -v -o /dev/null .
2525
- name: Test
2626
run: go test -v ./...
2727
# ================
@@ -67,7 +67,6 @@ jobs:
6767
uses: docker/metadata-action@v4
6868
with:
6969
images: jpillora/chisel
70-
tag-latest: true
7170
tags: |
7271
type=semver,pattern={{version}}
7372
type=semver,pattern={{major}}.{{minor}}

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ RUN go build \
99
-ldflags "-X github.com/jpillora/chisel/share.BuildVersion=$(git describe --abbrev=0 --tags)" \
1010
-o chisel
1111
# run stage
12-
FROM gcr.io/distroless/static-debian11
12+
FROM scratch
13+
COPY --from=alpine:latest /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
1314
WORKDIR /app
14-
CMD ["/app"]
1515
COPY --from=build /src/chisel /app/chisel
1616
ENTRYPOINT ["/app/chisel"]

0 commit comments

Comments
 (0)