Running the CLI inside a Dockerfile
Run the Seal CLI inside a Dockerfile build, replacing vulnerable packages before the image is finalized.
Sketch
# syntax=docker/dockerfile:1.4
FROM node:20
WORKDIR /app
COPY . .
RUN npm ci
# Install the Seal CLI in an intermediate layer.
ADD https://github.com/seal-community/cli/releases/download/latest/seal-linux-amd64-latest /usr/local/bin/seal
RUN chmod +x /usr/local/bin/seal
# Run seal fix with the token mounted as a build-time secret.
ARG SEAL_PROJECT=my-project-id
RUN --mount=type=secret,id=SEAL_TOKEN,env=SEAL_TOKEN \
seal fix --mode all --remove-cli
RUN npm run buildPassing the token
Notes
Related
Last updated