You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/agents/claude-code/quickstart.mdx
+18-16Lines changed: 18 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,31 +9,33 @@ import {DocsCTA} from '~/components/blog/CTA'
9
9
10
10
Run Claude Code agents in Depot's remote agent sandboxes: a secure, isolated environment in the cloud, where you can launch, resume, and share coding sessions.
11
11
12
-
## Install the Depot CLI
12
+
## Prerequisites
13
13
14
-
You'll need the[Depot CLI](/docs/cli/reference) on your machine to configure and launch remote sandboxes.
14
+
You'll need a[Depot account](https://depot.dev/sign-up).
15
15
16
-
### macOS
16
+
##Install the Depot CLI
17
17
18
-
Install the Depot CLI with Homebrew:
18
+
Install the [Depot CLI](/docs/cli/reference) on your machine to configure and launch remote sandboxes.
19
19
20
-
```shell
21
-
brew install depot/tap/depot
22
-
```
20
+
-**macOS**
23
21
24
-
### Linux
22
+
Install the Depot CLI with Homebrew:
25
23
26
-
Install the Depot CLI with the installation script.
24
+
```shell
25
+
brew install depot/tap/depot
26
+
```
27
27
28
-
Install the latest version:
28
+
-**Linux**
29
29
30
-
```shell
31
-
curl -L https://depot.dev/install-cli.sh | sh
32
-
```
30
+
Install the Depot CLI with the installation script:
31
+
32
+
```shell
33
+
curl -L https://depot.dev/install-cli.sh | sh
34
+
```
33
35
34
-
### All platforms
36
+
-**All platforms**
35
37
36
-
Download the binary file for your platform from the [Depot CLI releases page](https://github.com/depot/cli/releases) in GitHub.
38
+
Download the binary file for your platform from the [Depot CLI releases page](https://github.com/depot/cli/releases) in GitHub.
37
39
38
40
## Get and set your Anthropic credentials
39
41
@@ -87,7 +89,7 @@ To grant remote agent sandboxes access to clone and push changes to your private
87
89
88
90
### Grant access outside of GitHub
89
91
90
-
If you don't want to use the Depot Code app, you can set your Git credentials as secrets in your Depot organization allow changes to your private repositories. The value of `GIT_CREDENTIALS` must be one of the following:
92
+
If you don't want to use the Depot Code app, you can set your Git credentials as secrets in your Depot organization to allow changes to your private repositories. The value of `GIT_CREDENTIALS` must be one of the following:
91
93
92
94
- A token, such as a personal access token. Depot uses `x-token` as the username and the token you specify as the password.
93
95
- A user name and password in the format: username@password.
Copy file name to clipboardExpand all lines: content/cache/reference/bazel.mdx
+40-2Lines changed: 40 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,44 @@ If you are a member of multiple organizations, and you are authenticating with a
33
33
build --remote_header=x-depot-org=DEPOT_ORG_ID
34
34
```
35
35
36
-
## Using Depot Cache with Bazel
37
-
38
36
Once Bazel is configured to use Depot Cache, you can then run your builds as you normally would. Bazel will automatically communicate with Depot Cache to fetch and reuse any stored build artifacts from your previous builds.
37
+
38
+
### Using Depot Cache with Bazel in `depot/build-push-action`
39
+
40
+
When using `depot/build-push-action` to build Docker images that contain Bazel workspaces, your build needs access to Bazel's remote cache credentials to benefit from caching.
41
+
42
+
These credentials are not automatically available inside your Docker build environment. Unlike builds running directly on Depot-managed GitHub Actions runners (which have automatic access to Depot Cache environment variables), containerized builds execute in isolated VMs that require explicit configuration.
43
+
44
+
Follow these steps to securely pass your Bazel credentials into your Docker build:
45
+
46
+
1. Store the Depot token in a GitHub Secret named `DEPOT_TOKEN`.
47
+
48
+
2. Configure your GitHub Action to pass secrets to the container build:
49
+
50
+
```yaml
51
+
- name: Build and push
52
+
uses: depot/build-push-action@v1
53
+
with:
54
+
context: .
55
+
file: ./Dockerfile
56
+
push: true
57
+
tags: your-image:tag
58
+
secrets: |
59
+
"DEPOT_TOKEN=${{ secrets.DEPOT_TOKEN }}"
60
+
```
61
+
62
+
3. Update your Dockerfile to mount the secrets and configure Bazel:
63
+
64
+
```dockerfile
65
+
# syntax=docker/dockerfile:1
66
+
67
+
# ... other Dockerfile instructions
68
+
69
+
# Create .bazelrc with cache configuration
70
+
RUN --mount=type=secret,id=DEPOT_TOKEN,env=DEPOT_TOKEN \
Copy file name to clipboardExpand all lines: content/cache/reference/gocache.mdx
+43-2Lines changed: 43 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,47 @@ To set verbose output, add the --verbose option:
42
42
export GOCACHEPROG='depot gocache --verbose'
43
43
```
44
44
45
-
## Using Depot Cache with Go
46
-
47
45
Once Go is configured to use Depot Cache, you can then run your builds as you normally would. Go will automatically communicate with `GOCACHEPROG` to fetch from Depot Cache and reuse any stored build artifacts from your previous builds.
46
+
47
+
### Using Depot Cache with Go in `depot/build-push-action`
48
+
49
+
When using `depot/build-push-action` to build Docker images that contain Go projects, your build needs access to Go's remote cache credentials to benefit from caching.
50
+
51
+
These credentials are not automatically available inside your Docker build environment. Unlike builds running directly on Depot-managed GitHub Actions runners (which have automatic access to Depot Cache environment variables), containerized builds execute in isolated VMs that require explicit configuration.
52
+
53
+
Follow these steps to securely pass your Go cache credentials into your Docker build:
54
+
55
+
1. Store the Depot token in a GitHub Secret named `DEPOT_TOKEN`.
56
+
57
+
2. Configure your GitHub Action to pass secrets to the container build:
58
+
59
+
```yaml
60
+
- name: Build and push
61
+
uses: depot/build-push-action@v1
62
+
with:
63
+
context: .
64
+
file: ./Dockerfile
65
+
push: true
66
+
tags: your-image:tag
67
+
secrets: |
68
+
"DEPOT_TOKEN=${{ secrets.DEPOT_TOKEN }}"
69
+
```
70
+
71
+
3. Update your Dockerfile to install the Depot CLI and configure Go cache:
72
+
73
+
```dockerfile
74
+
# syntax=docker/dockerfile:1
75
+
76
+
# ... other Dockerfile instructions
77
+
78
+
# Install Depot CLI
79
+
RUN curl -L https://depot.dev/install-cli.sh | sh
80
+
81
+
# Mount secret and set GOCACHEPROG
82
+
RUN --mount=type=secret,id=DEPOT_TOKEN,env=DEPOT_TOKEN \
83
+
PATH="/root/.depot/bin:$PATH" \
84
+
GOCACHEPROG="depot gocache" \
85
+
go build -v ./
86
+
```
87
+
88
+
Adding `# syntax=docker/dockerfile:1` as the first line of your Dockerfile enables mounting secrets as environment variables.
Copy file name to clipboardExpand all lines: content/cache/reference/gradle.mdx
+55-2Lines changed: 55 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,59 @@ buildCache {
58
58
}
59
59
```
60
60
61
-
## Using Depot Cache with Gradle
62
-
63
61
Once Gradle is configured to use Depot Cache, you can then run your builds as you normally would. Gradle will automatically communicate with Depot Cache to fetch and reuse any stored build artifacts from your previous builds.
62
+
63
+
### Using Depot Cache with Gradle in `depot/build-push-action`
64
+
65
+
When using `depot/build-push-action` to build Docker images that contain Gradle projects, your build needs access to Gradle's remote cache credentials to benefit from caching.
66
+
67
+
These credentials are not automatically available inside your Docker build environment. Unlike builds running directly on Depot-managed GitHub Actions runners (which have automatic access to Depot Cache environment variables), containerized builds execute in isolated VMs that require explicit configuration.
68
+
69
+
Follow these steps to securely pass your Gradle credentials into your Docker build:
70
+
71
+
1. Store the Depot token in a GitHub Secret named `DEPOT_TOKEN`.
72
+
73
+
2. Update your `settings.gradle` to read the Depot token from an environment variable:
74
+
75
+
```groovy
76
+
buildCache {
77
+
remote(HttpBuildCache) {
78
+
url = 'https://cache.depot.dev'
79
+
enabled = true
80
+
push = true
81
+
credentials {
82
+
username = ''
83
+
password = System.getenv('DEPOT_TOKEN')
84
+
}
85
+
}
86
+
}
87
+
```
88
+
89
+
3. Configure your GitHub Action to pass secrets to the container build:
90
+
91
+
```yaml
92
+
- name: Build and push
93
+
uses: depot/build-push-action@v1
94
+
with:
95
+
context: .
96
+
file: ./Dockerfile
97
+
push: true
98
+
tags: your-image:tag
99
+
secrets: |
100
+
"DEPOT_TOKEN=${{ secrets.DEPOT_TOKEN }}"
101
+
```
102
+
103
+
4. Update your Dockerfile to mount the secret and run the build:
104
+
105
+
```dockerfile
106
+
# syntax=docker/dockerfile:1
107
+
108
+
# ... other Dockerfile instructions
109
+
110
+
# Copy settings.gradle and run build with mounted secret
111
+
COPY settings.gradle .
112
+
RUN --mount=type=secret,id=DEPOT_TOKEN,env=DEPOT_TOKEN \
113
+
./gradlew build
114
+
```
115
+
116
+
Adding `# syntax=docker/dockerfile:1` as the first line of your Dockerfile enables mounting secrets as environment variables.
Copy file name to clipboardExpand all lines: content/cache/reference/maven.mdx
+83-2Lines changed: 83 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,87 @@ To manually configure Maven to use Depot Cache, you will need to configure remot
77
77
78
78
**Note: Maven support currently only supports Depot Organization API tokens, not user tokens.**
79
79
80
-
## Using Depot Cache with Maven
81
-
82
80
Once Maven is configured to use Depot Cache, you can run your builds as usual. Maven will automatically communicate with Depot Cache to fetch and reuse any stored build artifacts from your previous builds.
81
+
82
+
### Using Depot Cache with Maven in `depot/build-push-action`
83
+
84
+
When using `depot/build-push-action` to build Docker images that contain Maven projects, your build needs access to Maven's remote cache credentials to benefit from caching.
85
+
86
+
These credentials are not automatically available inside your Docker build environment. Unlike builds running directly on Depot-managed GitHub Actions runners (which have automatic access to Depot Cache environment variables), containerized builds execute in isolated VMs that require explicit configuration.
87
+
88
+
Follow these steps to securely pass your Maven credentials into your Docker build:
89
+
90
+
1. Store the Depot token in a GitHub Secret named `DEPOT_TOKEN`.
91
+
92
+
2. Configure Maven Build Cache extension in `.mvn/maven-build-cache-config.xml`:
Copy file name to clipboardExpand all lines: content/cache/reference/moonrepo.mdx
+50-2Lines changed: 50 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,54 @@ unstable_remote:
34
34
35
35
See [moonrepo's remote cache documentation](https://moonrepo.dev/docs/guides/remote-cache#cloud-hosted-depot) for more details.
36
36
37
-
## Using Depot Cache with moonrepo
38
-
39
37
Once moonrepo is configured to use Depot Cache, you can then run your builds as you normally would. moonrepo will automatically communicate with Depot Cache to fetch and reuse any stored build artifacts from your previous builds.
38
+
39
+
### Using Depot Cache with moonrepo in `depot/build-push-action`
40
+
41
+
When using `depot/build-push-action` to build Docker images that contain moonrepo workspaces, your build needs access to moonrepo's remote cache credentials to benefit from caching.
42
+
43
+
These credentials are not automatically available inside your Docker build environment. Unlike builds running directly on Depot-managed GitHub Actions runners (which have automatic access to Depot Cache environment variables), containerized builds execute in isolated VMs that require explicit configuration.
44
+
45
+
Follow these steps to securely pass your moonrepo credentials into your Docker build:
46
+
47
+
1. Store the Depot token in a GitHub Secret named `DEPOT_TOKEN`.
48
+
49
+
2. Configure moonrepo to read the Depot token from an environment variable in `.moon/workspace.yml`:
50
+
51
+
```yaml
52
+
unstable_remote:
53
+
host: 'grpcs://cache.depot.dev'
54
+
auth:
55
+
token: 'DEPOT_TOKEN'
56
+
```
57
+
58
+
3. Configure your GitHub Action to pass secrets to the container build:
59
+
60
+
```yaml
61
+
- name: Build and push
62
+
uses: depot/build-push-action@v1
63
+
with:
64
+
context: .
65
+
file: ./Dockerfile
66
+
push: true
67
+
tags: your-image:tag
68
+
secrets: |
69
+
"DEPOT_TOKEN=${{ secrets.DEPOT_TOKEN }}"
70
+
```
71
+
72
+
4. Update your Dockerfile to copy the workspace configuration and run the build with mounted secret:
73
+
74
+
```dockerfile
75
+
# syntax=docker/dockerfile:1
76
+
77
+
# ... other Dockerfile instructions
78
+
79
+
# Copy moonrepo workspace configuration
80
+
COPY .moon/workspace.yml .moon/workspace.yml
81
+
82
+
# Mount secret as environment variable and run build
83
+
RUN --mount=type=secret,id=DEPOT_TOKEN,env=DEPOT_TOKEN \
84
+
moon run build
85
+
```
86
+
87
+
Adding `# syntax=docker/dockerfile:1` as the first line of your Dockerfile enables mounting secrets as environment variables.
0 commit comments