Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building using an image from a private repository results in "x509: certificate signed by unknown authority". #83

Open
chriseaton opened this issue Dec 31, 2021 · 2 comments

Comments

@chriseaton
Copy link

When our docker file specifies an image in a private repo, it causes the oci-build-task to fail. As far I could tell there's no way to specify a custom CA.

ERROR: failed to do request: Head "https://our-private-repo/v2/shared/centos/manifests/latest": x509: certificate signed by unknown authority
@CJLove
Copy link

CJLove commented Jan 7, 2022

Here's a possible workaround, with the downside that you're basically forking the official oci-build-task image and using it in the interim:

  1. Build your own oci-build-task image with a Dockerfile like this to add your ca.crt file to the image, and push to your private registry
FROM docker.io/concourse/oci-build-task:latest

COPY ca.crt /usr/local/share/ca-certificates/

RUN update-ca-certificates
  1. In your pipeline specify your oci-build-task image in place of the official one
...
  - task: build-task-image
    privileged: true
    config:
      platform: linux
      image_resource:
        type: registry-image
        source:
          repository: fir.love.io:3005/amd64/oci-build-task
          # repository: concourse/oci-build-task
          tag: latest
...

gnud added a commit to gnud/concourse-simple-docker-demo that referenced this issue Apr 3, 2022
@lrstanley
Copy link
Member

lrstanley commented Apr 4, 2022

Related, that has a bit cleaner temporary solution that doesn't require making a custom image: #70 (comment)

Looking at the code, however, I believe adding an input for custom certs/ca should be pretty easy.

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

No branches or pull requests

3 participants