Skip to content

docs(skill): explain running builds behind a TLS-intercepting proxy - #111

Merged
Pijukatel merged 9 commits into
masterfrom
claude/build-extra-ca
Oct 26, 2026
Merged

Pijukatel merged 9 commits into
masterfrom
claude/build-extra-ca

Conversation

@Pijukatel

@Pijukatel Pijukatel commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator
  • Adds a runtime-skill section for agents running behind a proxy that re-signs HTTPS: how to recognise it, find and verify the CA file, and trust it in the Actor's own Dockerfile.
  • Documentation only: the runtime does not touch images or builds. Also notes the /v2/acts 404 caused by old base images such as apify/actor-node:20.

@Pijukatel Pijukatel changed the title feat: let builds trust an extra CA bundle feat: builds trust the CA certificates of the host the runtime started on Oct 26, 2026
…stem bundle

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NPsGJyC8i3eUZ3WYtsyLPN
@Pijukatel Pijukatel changed the title feat: builds trust the CA certificates of the host the runtime started on feat: let builds trust extra CA certificates Oct 26, 2026
@Pijukatel
Pijukatel marked this pull request as ready for review October 26, 2026 08:25
@apify-service-account

Copy link
Copy Markdown
Contributor

Platform parity:

  • With ACTOR_RUNTIME_EXTRA_CA_FILE set, the runtime adds actor-runtime-ca-bundle.pem to the root of the build context. Any COPY . ./ (the default Dockerfile and the templates use one) then puts it in the Actor's working directory, and a pushed file with that name is silently replaced. The platform builds the context exactly as pushed. Not in requirements — builds.ts#L161-L164 · buildkit_image_builder.ts#L352-L363
  • The runtime adds ENV SSL_CERT_FILE/REQUESTS_CA_BUNDLE/PIP_CERT/CURL_CA_BUNDLE/GIT_SSL_CAINFO/AWS_CA_BUNDLE/NODE_EXTRA_CA_CERTS after every FROM, so build steps and runs see these extra env vars. They point OpenSSL, requests, pip, curl, git and AWS at Node's bundled Mozilla roots plus the file. That replaces the image's own trust store: CAs the base image or Dockerfile installs (update-ca-certificates, certifi) and a base image's own SSL_CERT_FILE stop applying. The platform builds the Dockerfile unmodified, so the image's own store applies. The requirements say "in addition to the public roots" and don't list these variables among a run's env vars — dockerfile-extra-ca.ts#L22-L37 · dockerfile-extra-ca.ts#L63-L67 · buildkit_image_builder.ts#L352-L363

Reviewed commit: 9df68dd

@apify-service-account

Copy link
Copy Markdown
Contributor

Platform parity:

  • With ACTOR_RUNTIME_EXTRA_CA_FILE set, the runtime adds actor-runtime-ca-bundle.pem to the root of the build context and copies it to /actor-runtime-ca-bundle.pem in every stage. So any COPY . ./ (the default Dockerfile uses one) also puts it in the Actor's working directory, the run's image contains both files, and a pushed file with that name is silently replaced. The platform builds the pushed context as-is. Not in requirements, which say runs are unchanged — builds.ts#L161-L164 · dockerfile-extra-ca.ts#L65-L68 · buildkit_image_builder.ts#L352-L363
  • The runtime treats any line starting with from as a FROM instruction and inserts COPY/ARG lines after it. That includes lines inside a RUN heredoc or a backslash continuation, such as a Python from x import y, so the RUN is split and the build breaks. The platform builds the Dockerfile unmodified with the docker/dockerfile:1 frontend, which supports heredocs. Not in requirements — dockerfile-extra-ca.ts#L74-L81 · buildkit_image_builder.ts#L59-L63 · buildkit_image_builder.ts#L352-L390
  • In build steps, SSL_CERT_FILE, REQUESTS_CA_BUNDLE, PIP_CERT, CURL_CA_BUNDLE, GIT_SSL_CAINFO and AWS_CA_BUNDLE point at Node's bundled Mozilla roots plus the file. This replaces the image's own trust store, so CAs that the base image or Dockerfile installs (update-ca-certificates, certifi) no longer apply to RUN steps. The platform passes only the user's build args plus BUILDKIT_*, so the image's own store applies. The requirements say the CAs are trusted "in addition to the public roots", which is the opposite — dockerfile-extra-ca.ts#L23-L31 · buildkit_image_builder.ts#L379-L390

Reviewed commit: ab07d9b

…the Actor's Dockerfile

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NPsGJyC8i3eUZ3WYtsyLPN
@Pijukatel Pijukatel changed the title feat: let builds trust extra CA certificates docs(skill): explain running builds behind a TLS-intercepting proxy Oct 26, 2026
@apify-service-account

apify-service-account commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Platform parity: Aligned.

Reviewed commit: 32466fc

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NPsGJyC8i3eUZ3WYtsyLPN
Pijukatel added a commit to apify/apify-cli that referenced this pull request Oct 26, 2026
…1521)

- The CLI agent skill now tells agents to run `apify runtime skill`
after `install` and before `start`, since the runtime's own skill covers
what depends on their environment.
- Documentation only; pairs with the runtime-skill section in
apify/actor-runtime#111.

---------

Co-authored-by: Claude <noreply@anthropic.com>
@Pijukatel
Pijukatel merged commit c0a3726 into master Oct 26, 2026
38 of 41 checks passed
@Pijukatel
Pijukatel deleted the claude/build-extra-ca branch October 26, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants