A set of applications provided by opopops
This repository provides a Docker dagger module and allows you to execute the following functions:
- Run a container in a terminal (Just For fun):
dagger -m github.com/opopops/docker@main \
call import --address=chainguard/wolfi-base terminal
- Build a container using apko and export it as tarball on the host filesystem:
dagger -m github.com/opopops/docker@main \
call apko --context="." --config="apko.yml" \
export --output=<path>
- Build a multi-platform container unsing apko and publish it:
dagger -m github.com/opopops/docker@main \
call apko --arch="x86_64,arm64" --context="." --config="apko.yml" \
publish --address=<image>
- Build a container and export it as tarball on the host filesystem:
dagger -m github.com/opopops/docker@main \
call build --context="." --dockerfile="Dockerfile" \
export --output=<path>
- Build a multi-platform container and publish it:
dagger -m github.com/opopops/docker@main \
call build --platform="linux/amd64,linux/arm64" --context="." --dockerfile="Dockerfile" \
publish --address=<image>
- Build a multi-platform container, publish and sign it:
dagger -m github.com/opopops/docker@main \
call build --platform="linux/amd64,linux/arm64" --context="." --dockerfile="Dockerfile" \
publish --address=<image> \
sign --private-key=env:COSIGN_PRIVATE_KEY --password=env:COSIGN_PASSWORD --registry-username=<username> --registry-password=env:REGISTRY_PASSWORD
- Build a container and scan it using
grype
:
dagger -m github.com/opopops/docker@main \
call build --platform="linux/amd64" --context="." --dockerfile="Dockerfile" \
scan --fail-on=high
# Generate a JSON report
dagger -m github.com/opopops/docker@main \
call build --platform="linux/amd64" --context="." --dockerfile="Dockerfile" \
scan --output-format=json
# Generate a JSON report and write it to /tmp/grype.json
dagger -m github.com/opopops/docker@main \
call build --platform="linux/amd64" --context="." --dockerfile="Dockerfile" \
scan --output-format=json --output=/tmp/grype.json
- Import a container and scan it using
grype
:
dagger -m github.com/opopops/docker@main \
call --container=alpine:latest scan-report