Skip to content

Commit

Permalink
docs: Add windows example in cli.#Load using socket
Browse files Browse the repository at this point in the history
Signed-off-by: Helder Correia <[email protected]>
  • Loading branch information
helderco committed Jun 17, 2022
1 parent ecc1cc2 commit 00081fe
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/guides/docker/1216-docker-cli-load.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,33 @@ It can be useful to debug or test a build locally before pushing.

## Local daemon

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import BrowserOnly from '@docusaurus/BrowserOnly';

<BrowserOnly>
{() =>
<Tabs defaultValue={ window.navigator.userAgent.indexOf('Win') != -1 ? 'windows': 'unix'} groupId="local-daemon">

<TabItem value="unix" label="Linux/macOS">

```cue file=../../plans/docker-cli-load/local.cue
```

</TabItem>

<TabItem value="windows" label="Windows">

```cue file=../../plans/docker-cli-load/local_windows.cue
```

</TabItem>
</Tabs>
}
</BrowserOnly>

## Remote daemon, via SSH

```cue file=../../plans/docker-cli-load/ssh.cue
Expand Down
23 changes: 23 additions & 0 deletions docs/plans/docker-cli-load/local_windows.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package main

import (
"dagger.io/dagger"
"universe.dagger.io/docker"
"universe.dagger.io/docker/cli"
)

dagger.#Plan & {
client: network: "npipe:////./pipe/docker_engine": connect: dagger.#Socket

actions: {
build: docker.#Build & {
...
}

load: cli.#Load & {
image: build.output
host: client.network."npipe:////./pipe/docker_engine".connect
tag: "myimage"
}
}
}

0 comments on commit 00081fe

Please sign in to comment.