From 1157561f1d562aff9286844b4c68ac0624ea1474 Mon Sep 17 00:00:00 2001 From: guillaume Date: Fri, 8 Apr 2022 11:27:19 +0200 Subject: [PATCH 1/4] Docs: 1223-custom-buildkit improvement Add connection steps to remote buildkitd running in Docker Signed-off-by: guillaume --- docs/guides/1223-custom-buildkit.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/guides/1223-custom-buildkit.md b/docs/guides/1223-custom-buildkit.md index ac0dfb1f..1323dab0 100644 --- a/docs/guides/1223-custom-buildkit.md +++ b/docs/guides/1223-custom-buildkit.md @@ -20,6 +20,24 @@ To use a buildkit daemon running in a container named "super-buildkit" on the lo export BUILDKIT_HOST=docker-container://super-buildkit ``` +## Using a custom remote buildkit running in Docker + +Dagger can also be configured to use a remote buildkit daemon running in a Docker container. This an be done using the environment variable `DOCKER_HOST`. + +```shell +export DOCKER_HOST=ssh://user@IP +``` + +You will also need to set the `BUILDKIT_HOST` environment variable explained above. + +## Running a custom buildkit container in Docker + +To run a customized Buildkit version with Docker, this can be done using the below command: + +```shell +docker run -d --name dagger-buildkitd --privileged --network=host docker.io/moby/buildkit:latest +``` + ## OpenTracing Support Both Dagger and buildkit support opentracing. To capture traces to From e48262a2fb4228c1fe37310c33bdf938ea7573c0 Mon Sep 17 00:00:00 2001 From: guillaume Date: Fri, 8 Apr 2022 11:28:46 +0200 Subject: [PATCH 2/4] Docs: 1224-self-signed-certificates Add documentation on how to use Dagger with self-signed certs Signed-off-by: guillaume --- docs/guides/1224-self-signed-certificates.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docs/guides/1224-self-signed-certificates.md diff --git a/docs/guides/1224-self-signed-certificates.md b/docs/guides/1224-self-signed-certificates.md new file mode 100644 index 00000000..9bcb44f3 --- /dev/null +++ b/docs/guides/1224-self-signed-certificates.md @@ -0,0 +1,19 @@ +--- +slug: /1224/self-signed-certificates/ +--- + +# Running Dagger with self-signed certificates + +The connection to a container registry or to a remote docker daemon might require the need to add self-signed CA: `x509: certificate signed by unknown authority`. + +These operations are being run inside the buildkitd context and require you to mount your certificates inside your buildkit instance. + +## Running a custom buildkit in Docker + +To run a customized Buildkit version with Docker, this can be done using the below command. You can add as many certificate as you need: + +```shell +docker run --net=host -d --restart always -v $PWD/my-cert.pem:/etc/ssl/certs/my-cert.pem --name dagger-buildkitd --privileged moby/buildkit:latest +``` + +To connect your Dagger client to this custom instance, [please follow these steps](../guides/1223-custom-buildkit.md) From 497b155355559b84f0d7b4078a62d71b5508558f Mon Sep 17 00:00:00 2001 From: guillaume Date: Fri, 8 Apr 2022 11:29:39 +0200 Subject: [PATCH 3/4] Docs: guides/1225-pushing-plan-dependencies Add documentation enforcing the best practice regarding dagger dependencies `cue.mod/pkg` Signed-off-by: guillaume --- docs/guides/1225-pushing-plan-dependencies.md | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 docs/guides/1225-pushing-plan-dependencies.md diff --git a/docs/guides/1225-pushing-plan-dependencies.md b/docs/guides/1225-pushing-plan-dependencies.md new file mode 100644 index 00000000..b764b619 --- /dev/null +++ b/docs/guides/1225-pushing-plan-dependencies.md @@ -0,0 +1,67 @@ +--- +slug: /1225/pushing-plan-dependencies/ +--- + +# Pushing your plan's dependencies + +After completing your plan and setting up your GHA or Gitlab CI, you'll realize that a lot of `Cue` files are present in the `cue.mod/pkg` directory. These are the dependencies required by Dagger to run your actions : + +```shell +cue.mod/ +├── pkg +│ ├── dagger.io +│ │ ├── cue.mod +│ │ └── dagger +│ │ └── core +│ └── universe.dagger.io +│ ├── alpine +│ │ └── test +│ ├── aws +│ │ ├── cli +│ │ │ └── test +│ │ └── test +│ ├── bash +│ │ └── test +│ │ └── data +│ ├── cue.mod +│ ├── docker +│ │ ├── cli +│ │ │ └── test +│ │ └── test +│ ├── examples +│ │ ├── changelog.com +│ │ │ ├── elixir +│ │ │ │ └── mix +│ │ │ └── gerhard +│ │ ├── helloworld +│ │ └── todoapp +│ │ ├── public +│ │ └── src +│ │ └── components +│ ├── git +│ ├── go +│ │ └── test +│ ├── netlify +│ │ └── test +│ │ └── testutils +│ ├── nginx +│ ├── powershell +│ │ └── test +│ │ └── data +│ ├── python +│ ├── x +│ │ └── david@rawkode.dev +│ │ └── pulumi +│ └── yarn +│ └── test +│ └── data +│ ├── bar +│ └── foo +└── usr +``` + +The current best practice is to push your project with these files: it will ensure its consistency between runs. + +:::info +We are aware of that and, soon, `dagger project update` will only download the dependencies required by your actions +::: From 7a51c51e840b1efe1423488df8c58e7aa0050025 Mon Sep 17 00:00:00 2001 From: guillaume Date: Fri, 8 Apr 2022 11:31:01 +0200 Subject: [PATCH 4/4] Docs: Add docs to sidebar Add documentation to sidebar + fix missing previous ones Signed-off-by: guillaume --- website/sidebars.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/website/sidebars.js b/website/sidebars.js index 26f74df5..f6b3868d 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -107,7 +107,15 @@ module.exports = { label: "Guides", collapsible: false, collapsed: false, - items: ["guides/container-images", "guides/cli-telemetry", "guides/docker-cli-load", "guides/docker-cli-run"], + items: [ + "guides/container-images", + "guides/cli-telemetry", + "guides/docker-cli-load", + "guides/docker-cli-run", + "guides/custom-buildkit", + "guides/self-signed-certificates", + "guides/pushing-plan-dependencies", + ], }, { type: "category",