Skip to content

Commit 694b1b9

Browse files
Merge pull request #150 from depot/docs-sync-updates
Update content from depot/app
2 parents 21fc552 + f1cc086 commit 694b1b9

File tree

14 files changed

+729
-58
lines changed

14 files changed

+729
-58
lines changed

content/agents/claude-code/quickstart.mdx

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,33 @@ import {DocsCTA} from '~/components/blog/CTA'
99

1010
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.
1111

12-
## Install the Depot CLI
12+
## Prerequisites
1313

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).
1515

16-
### macOS
16+
## Install the Depot CLI
1717

18-
Install the Depot CLI with Homebrew:
18+
Install the [Depot CLI](/docs/cli/reference) on your machine to configure and launch remote sandboxes.
1919

20-
```shell
21-
brew install depot/tap/depot
22-
```
20+
- **macOS**
2321

24-
### Linux
22+
Install the Depot CLI with Homebrew:
2523

26-
Install the Depot CLI with the installation script.
24+
```shell
25+
brew install depot/tap/depot
26+
```
2727

28-
Install the latest version:
28+
- **Linux**
2929

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+
```
3335

34-
### All platforms
36+
- **All platforms**
3537

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.
3739

3840
## Get and set your Anthropic credentials
3941

@@ -87,7 +89,7 @@ To grant remote agent sandboxes access to clone and push changes to your private
8789

8890
### Grant access outside of GitHub
8991

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:
9193

9294
- A token, such as a personal access token. Depot uses `x-token` as the username and the token you specify as the password.
9395
- A user name and password in the format: username@password.

content/cache/reference/bazel.mdx

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,44 @@ If you are a member of multiple organizations, and you are authenticating with a
3333
build --remote_header=x-depot-org=DEPOT_ORG_ID
3434
```
3535

36-
## Using Depot Cache with Bazel
37-
3836
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 \
71+
echo "build --remote_cache=https://cache.depot.dev" >> ~/.bazelrc && \
72+
echo "build --remote_header=authorization=${DEPOT_TOKEN}" >> ~/.bazelrc && \
73+
bazel build
74+
```
75+
76+
Adding `# syntax=docker/dockerfile:1` as the first line of your Dockerfile enables mounting secrets as environment variables.

content/cache/reference/gocache.mdx

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,47 @@ To set verbose output, add the --verbose option:
4242
export GOCACHEPROG='depot gocache --verbose'
4343
```
4444

45-
## Using Depot Cache with Go
46-
4745
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.

content/cache/reference/gradle.mdx

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,59 @@ buildCache {
5858
}
5959
```
6060

61-
## Using Depot Cache with Gradle
62-
6361
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.

content/cache/reference/maven.mdx

Lines changed: 83 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,87 @@ To manually configure Maven to use Depot Cache, you will need to configure remot
7777

7878
**Note: Maven support currently only supports Depot Organization API tokens, not user tokens.**
7979

80-
## Using Depot Cache with Maven
81-
8280
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`:
93+
94+
```xml
95+
<cache xmlns="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0"
96+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
97+
xsi:schemaLocation="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0 https://maven.apache.org/xsd/build-cache-config-1.0.0.xsd">
98+
<configuration>
99+
<enabled>true</enabled>
100+
<hashAlgorithm>SHA-256</hashAlgorithm>
101+
<validateXml>true</validateXml>
102+
<remote enabled="true" saveToRemote="true" id="depot-cache">
103+
<url>https://cache.depot.dev</url>
104+
</remote>
105+
<projectVersioning adjustMetaInf="true" />
106+
</configuration>
107+
</cache>
108+
```
109+
110+
3. Update your `settings.xml` to read the Depot token from an environment variable. Create or update `.m2/settings.xml`:
111+
112+
```xml
113+
<?xml version="1.0" encoding="UTF-8"?>
114+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
115+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
116+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
117+
<servers>
118+
<server>
119+
<id>depot-cache</id>
120+
<configuration>
121+
<httpHeaders>
122+
<property>
123+
<name>Authorization</name>
124+
<value>Bearer ${env.DEPOT_TOKEN}</value>
125+
</property>
126+
</httpHeaders>
127+
</configuration>
128+
</server>
129+
</servers>
130+
</settings>
131+
```
132+
133+
4. Configure your GitHub Action to pass secrets to the container build:
134+
135+
```yaml
136+
- name: Build and push
137+
uses: depot/build-push-action@v1
138+
with:
139+
context: .
140+
file: ./Dockerfile
141+
push: true
142+
tags: your-image:tag
143+
secrets: |
144+
"DEPOT_TOKEN=${{ secrets.DEPOT_TOKEN }}"
145+
```
146+
147+
5. Update your Dockerfile to copy configuration files and run the build with mounted secret:
148+
149+
```dockerfile
150+
# syntax=docker/dockerfile:1
151+
152+
# ... other Dockerfile instructions
153+
154+
# Copy Maven configuration files
155+
COPY .mvn/maven-build-cache-config.xml .mvn/maven-build-cache-config.xml
156+
COPY .m2/settings.xml /root/.m2/settings.xml
157+
158+
# Run build with mounted secret
159+
RUN --mount=type=secret,id=DEPOT_TOKEN,env=DEPOT_TOKEN \
160+
mvn clean install
161+
```
162+
163+
Adding `# syntax=docker/dockerfile:1` as the first line of your Dockerfile enables mounting secrets as environment variables.

content/cache/reference/moonrepo.mdx

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,54 @@ unstable_remote:
3434

3535
See [moonrepo's remote cache documentation](https://moonrepo.dev/docs/guides/remote-cache#cloud-hosted-depot) for more details.
3636

37-
## Using Depot Cache with moonrepo
38-
3937
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

Comments
 (0)