#How to run the Engine with Custom Certificate Authorities?

1 messages · Page 1 of 1 (latest)

wise comet
#

I've built a custom dagger image with a custom CA, but I don't understand how to run it. If there is another way to add a custom CA to the engine w/o building an image? I would be grateful for your help. Thank You.

white marsh
#

👋 hello, @wise comet
You can mount them at runtime under /usr/local/share/ca-certificates

wise comet
#

@white marsh Thanks, yes I read the documentation but it didn't help.

Locally Built Docker Image
FROM registry.dagger.io/engine:v.12.7
COPY ca.crt /usr/local/share/ca-certificates

Execute
dagger init —sdk=go —source=./dagger

How to set variables to use local docker image or remote registry?

bright loom
#

it's the same behaviour with normal docker I thought, pull if not exists.

#

i wacked a page up somewhere at work when iwas going through this process, let me see if i can dump that conf page stuff onto a gist somewhere

fathom condor
white marsh
#

@fathom condor was faster with the answer daggerfire

bright loom
#

tbh, i think the official docs could be a bit more verbose like my gist

wise comet
#

Thanks guys.

I figured it out, let's summarize a bit.
By running the following commands, you create your image, run it, and then set a variable to tell dagger cli where to go, which container to use.

cat dagger_engine.containerfile
FROM registry.dagger.io/engine:v0.12.7
COPY ./ca.crt /usr/local/share/ca-certificates

docker build -t your.private.registry/acme/custom-dagger-engine:v0.12.7 -f dagger_engine.containerfile .
docker run -d --rm --name custom-dagger-engine --privileged your.private.registry/acme/custom-dagger-engine:v0.12.7
export _EXPERIMENTAL_DAGGER_RUNNER_HOST=docker-container://custom-dagger-engine
dagger init --sdk=go --source=./dagger

I was thinking of using a pointer to a custom docker image, instead of specifying a running custom container. Otherwise, in a Git Self Runner, you'd have to run the container in addition to the checkout and dagger run. But it doesn't work

export _EXPERIMENTAL_DAGGER_RUNNER_HOST=docker-image://your.private.registry/acme/custom-dagger-engine:v0.12.7