Skip to content

Fail fast when HTTPS is requested but certificates are missing #1293

Fail fast when HTTPS is requested but certificates are missing

Fail fast when HTTPS is requested but certificates are missing #1293

name: Test build the Docker image
on:
workflow_dispatch:
pull_request:
branches:
- main
permissions:
contents: read
jobs:
test-build-docker-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build -t test-image .
docker build -t test-image-neptune --build-arg NEPTUNE_NOTEBOOK=true .
- name: Scan Docker image for vulnerabilities
uses: aquasecurity/trivy-action@v0.35.0
with:
image-ref: test-image
severity: HIGH,CRITICAL
exit-code: 1
- name: Ensure openSSL is installed
run: |
docker run --rm --entrypoint="" test-image openssl --version
docker run --rm --entrypoint="" test-image-neptune openssl --version
- name: Verify package managers are removed
run: |
docker run --rm --entrypoint="" test-image sh -c '
(command -v npm && echo "FAIL: npm found" && exit 1) || echo "✓ npm removed"
(command -v pnpm && echo "FAIL: pnpm found" && exit 1) || echo "✓ pnpm removed"
(command -v corepack && echo "FAIL: corepack found" && exit 1) || echo "✓ corepack removed"
'
docker run --rm --entrypoint="" test-image-neptune sh -c '
(command -v npm && echo "FAIL: npm found" && exit 1) || echo "✓ npm removed"
(command -v pnpm && echo "FAIL: pnpm found" && exit 1) || echo "✓ pnpm removed"
(command -v corepack && echo "FAIL: corepack found" && exit 1) || echo "✓ corepack removed"
'