mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
Merge pull request #293 from anchore/revert-288-syft_docker_image
Revert "Add the ability to run syft from a scratch image."
This commit is contained in:
commit
0891faa756
6
.github/workflows/release.yaml
vendored
6
.github/workflows/release.yaml
vendored
@ -106,12 +106,6 @@ jobs:
|
||||
${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ hashFiles('**/go.sum') }}-
|
||||
${{ runner.os }}-go-${{ env.GO_VERSION }}-
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.TOOLBOX_DOCKER_USER }}
|
||||
password: ${{ secrets.TOOLBOX_DOCKER_PASS }}
|
||||
|
||||
- name: Import GPG key
|
||||
id: import_gpg
|
||||
uses: crazy-max/ghaction-import-gpg@v2
|
||||
|
||||
@ -47,22 +47,6 @@ builds:
|
||||
-X github.com/anchore/syft/internal/version.buildDate={{.Date}}
|
||||
-X github.com/anchore/syft/internal/version.gitTreeState={{.Env.BUILD_GIT_TREE_STATE}}
|
||||
|
||||
dockers:
|
||||
-
|
||||
# Docker image name and tags
|
||||
image_templates:
|
||||
- "anchore/syft:latest"
|
||||
- "anchore/syft:{{ .Version }}"
|
||||
- "anchore/syft:{{ .Major }}.{{ .Minor }}"
|
||||
- "anchore/syft:{{ .Major }}"
|
||||
|
||||
# name of binary to release.
|
||||
binaries:
|
||||
- syft
|
||||
|
||||
# path to Dockerfile.
|
||||
dockerfile: Dockerfile
|
||||
|
||||
archives:
|
||||
- format: tar.gz
|
||||
builds:
|
||||
|
||||
20
Dockerfile
20
Dockerfile
@ -1,20 +0,0 @@
|
||||
FROM alpine:latest AS build
|
||||
|
||||
# add required ca-certificates for https request.
|
||||
RUN apk --no-cache add ca-certificates
|
||||
|
||||
# create empty directory for scratch image cache.
|
||||
RUN mkdir -p /tmp-syft
|
||||
|
||||
# reduce container image to scratch size.
|
||||
FROM scratch
|
||||
|
||||
# Copy directories and files needed to execute syft.
|
||||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=build /tmp-syft /tmp
|
||||
|
||||
# copy syft binary to rootfs
|
||||
COPY syft /
|
||||
|
||||
# default path
|
||||
ENTRYPOINT ["/syft"]
|
||||
Loading…
x
Reference in New Issue
Block a user