From 528d1f0d4d362132bbd1309a150cf7953e69c5bb Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Mon, 16 Oct 2023 20:22:26 +0200 Subject: [PATCH 1/2] build(hb): add missing word Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- content/build/hydrobuild.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/build/hydrobuild.md b/content/build/hydrobuild.md index 00fbe886d8..8ea2746f9b 100644 --- a/content/build/hydrobuild.md +++ b/content/build/hydrobuild.md @@ -160,7 +160,7 @@ $ docker buildx build --builder cloud--default \ ``` If you want to build with a tag, but you don't want to load the results to your -local image store, you export the build results to the build cache only: +local image store, you can export the build results to the build cache only: ```console $ docker buildx build --builder cloud--default \ From e79be994d534df7c9d4b2991ef7bebc4923ba6dc Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Mon, 16 Oct 2023 20:29:09 +0200 Subject: [PATCH 2/2] build(hb): clarify var names Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- content/build/hydrobuild.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/content/build/hydrobuild.md b/content/build/hydrobuild.md index 8ea2746f9b..9955fcf1ac 100644 --- a/content/build/hydrobuild.md +++ b/content/build/hydrobuild.md @@ -74,9 +74,9 @@ local Docker configuration. $ docker buildx create --driver cloud /default ``` - Replace `` with the Docker Hub namespace of your Docker organization. + Replace `ORG` with the Docker Hub namespace of your Docker organization. -This creates a builder named `cloud--default`. +This creates a builder named `cloud-ORG-default`. {{< /tab >}} {{< tab name="GUI" >}} @@ -105,7 +105,7 @@ To build using Hydrobuild, invoke a build command and specify the name of the builder using the `--builder` flag. ```console -$ docker buildx build --builder cloud--default --tag / . +$ docker buildx build --builder cloud--default --tag . ``` If you want to use Hydrobuild without having to specify the `--builder` flag @@ -117,7 +117,7 @@ each time, you can set it as the default builder. Run the following command: ```console -$ docker buildx use cloud--default --global +$ docker buildx use cloud--default --global ``` {{< /tab >}} @@ -153,9 +153,9 @@ Loading the build result for multi-platform images is not supported. Use the the output to a registry. ```console -$ docker buildx build --builder cloud--default \ +$ docker buildx build --builder cloud--default \ --platform linux/amd64,linux/arm64 \ - --tag / \ + --tag \ --push . ``` @@ -163,9 +163,9 @@ If you want to build with a tag, but you don't want to load the results to your local image store, you can export the build results to the build cache only: ```console -$ docker buildx build --builder cloud--default \ +$ docker buildx build --builder cloud--default \ --platform linux/amd64,linux/arm64 \ - --tag / \ + --tag \ --output type=cacheonly . ``` @@ -175,9 +175,9 @@ To run multi-platform builds, you must specify all of the platforms that you want to build for using the `--platform` flag. ```console -$ docker buildx build --builder cloud--default \ +$ docker buildx build --builder cloud--default \ --platform linux/amd64,linux/arm64 \ - --tag / \ + --tag \ --push . ``` @@ -235,12 +235,12 @@ jobs: with: version: "lab:latest" driver: cloud - endpoint: "/default" + endpoint: "/default" - name: Build and push uses: docker/build-push-action@v5 with: context: . - tags: "/" + tags: "" # For pull requests, export results to the build cache. # Otherwise, push to a registry. outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry,push=true' }} @@ -268,13 +268,13 @@ jobs: chmod a+x ~/.docker/cli-plugins/docker-buildx - run: echo "$DOCKER_PASS" | docker login --username $DOCKER_USER --password-stdin - - run: docker buildx create --use --driver cloud "/default" + - run: docker buildx create --use --driver cloud "/default" - run: | docker buildx build \ --platform linux/amd64,linux/arm64 \ --push \ - --tag "/" . + --tag "" . # Build an image and discard the result build_cache: @@ -291,7 +291,7 @@ jobs: chmod a+x ~/.docker/cli-plugins/docker-buildx - run: echo "$DOCKER_PASS" | docker login --username $DOCKER_USER --password-stdin - - run: docker buildx create --use --driver cloud "/default" + - run: docker buildx create --use --driver cloud "/default" - run: | docker buildx build \ @@ -327,7 +327,7 @@ chmod a+x ~/.docker/cli-plugins/docker-buildx echo "$DOCKER_PASS" | docker login --username $DOCKER_USER --password-stdin # Connect to your builder and set it as the default builder -docker buildx create --use --driver cloud "/default" +docker buildx create --use --driver cloud "/default" # Cache-only image build docker buildx build \ @@ -339,7 +339,7 @@ docker buildx build \ docker buildx build \ --platform linux/amd64,linux/arm64 \ --push \ - --tag "/" \ + --tag "" \ . ``` @@ -459,7 +459,7 @@ If you want to stop using Hydrobuild, and remove it from your system, remove the builder using the `docker buildx rm` command. ```console -$ docker buildx rm cloud--default +$ docker buildx rm cloud--default ``` This doesn't deprovision the builder backend, it only removes the builder from