Skip to content

Commit

Permalink
chore: docker使用scratch基础镜像
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Sep 18, 2024
1 parent b081d3d commit b91efb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
docker_registry: ghcr.io
docker_username: ${{ github.actor }}
docker_password: ${{ secrets.GITHUB_TOKEN }}
docker_password: ${{ secrets.GITHUB_TOKEN }}
backup_registry: ${{ secrets.BACKUP_REGISTRY }}
backup_username: ${{ secrets.BACKUP_USERNAME }}
backup_password: ${{ secrets.BACKUP_PASSWORD }}
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ COPY . .
RUN go mod download
RUN make build

FROM alpine:latest
FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /app/build/github-backup /main
ENTRYPOINT ["/main"]
CMD ["--config", "/config/config.json"]

0 comments on commit b91efb8

Please sign in to comment.