mirror of
https://github.com/docker/docs.git
synced 2026-11-04 10:01:00 +00:00
docs: build and preview an app in the DAP Shell quickstart (#26413)
## Description Make the first Docker Agentic Platform session useful without a model provider API key: launch the Shell kit, clone the Welcome to Docker sample, build its container image, run the app, and preview it through the Console's port connection. Readers can continue editing the same project in VS Code or Cursor over SSH. PReview: https://deploy-preview-26413--docsdocker.netlify.app/agentic-platform/get-started/
This commit is contained in:
1 parent
6bc39c45a1
commit
5179c97252
1 file changed
+103
-36
@@ -1,39 +1,44 @@
|
||||
---
|
||||
title: Get started with Docker Agentic Platform
|
||||
linkTitle: Get started
|
||||
description: Run your first cloud sandbox, ask an agent to review a sample project, save the result, and pause or delete the sandbox when you're finished.
|
||||
keywords: docker agentic platform, get started, cloud sandboxes, agents, ssh, vscode, cursor
|
||||
description: Review a sample project with a coding agent or build and preview it from a shell in a cloud sandbox, without setting up a local development environment.
|
||||
keywords: docker agentic platform, get started, cloud sandboxes, shell, agents, ssh, vscode, cursor
|
||||
weight: 10
|
||||
aliases:
|
||||
- /agentic-platform/concepts/platform-model/
|
||||
---
|
||||
|
||||
Use a cloud sandbox to have an agent review a project without setting up the
|
||||
project on your computer. In this walkthrough, you'll launch Claude Code,
|
||||
clone a public sample application, and save a project review. Then you'll
|
||||
pause the sandbox to return later or delete it when you're finished.
|
||||
Use a cloud sandbox to review a project with a coding agent or build and run
|
||||
an application from a shell, without setting up the project on your computer.
|
||||
|
||||
You can complete the walkthrough in the browser. An optional step shows how
|
||||
You can complete either workflow in the browser. An optional step shows how
|
||||
to open the same project in VS Code or Cursor over SSH.
|
||||
|
||||
## Before you begin
|
||||
|
||||
You need:
|
||||
You need a personal Docker account with an active
|
||||
[Docker Agentic Platform subscription](signup.md#activate-cloud-access).
|
||||
|
||||
- A personal Docker account with an active
|
||||
[Docker Agentic Platform subscription](signup.md#activate-cloud-access).
|
||||
- An Anthropic API key for the Claude Code kit. Add it under **Secrets** or
|
||||
enter it when you launch the sandbox. Your model provider bills inference
|
||||
separately from Docker's sandbox compute charges.
|
||||
Both workflows use a public sample project, so you don't need a GitHub token.
|
||||
|
||||
This example uses a public repository, so you don't need a GitHub token.
|
||||
For other agents and their credentials, see [Kits](kits.md) and
|
||||
[Secrets](secrets.md).
|
||||
## Choose a workflow
|
||||
|
||||
## Start a sandbox
|
||||
- [Use a coding agent](#use-a-coding-agent) to have Claude Code review a sample
|
||||
project and save its findings. You need an Anthropic API key.
|
||||
- [Use a shell](#use-a-shell) to build and run the sample application and preview
|
||||
it in your browser. You don't need a model provider API key.
|
||||
|
||||
## Use a coding agent
|
||||
|
||||
Add an Anthropic API key under **Secrets** or enter it when you launch the
|
||||
sandbox. Your model provider bills inference separately from Docker's sandbox
|
||||
compute charges. For other agents and their credentials, see [Kits](kits.md)
|
||||
and [Secrets](secrets.md).
|
||||
|
||||
### Launch Claude Code
|
||||
|
||||
1. Open [Docker Agentic Platform](https://agentic-platform.docker.com/) and
|
||||
select **New**.
|
||||
select **+ New sandbox**.
|
||||
2. Choose the Claude Code kit.
|
||||
3. Add your Anthropic API key if it isn't already saved. Don't enter it in
|
||||
the agent's prompt or in a file inside the sandbox.
|
||||
@@ -43,11 +48,9 @@ On your first launch, the default **Open** network policy permits outbound
|
||||
access to any host. If you're using a custom policy, make sure it permits
|
||||
GitHub and your model provider. See [Network policies](policies.md).
|
||||
|
||||
When the sandbox is ready, its terminal opens with Claude Code. After launch,
|
||||
you can't change the selected credentials, tools, network policies, or compute
|
||||
size. See [Sandbox options](#sandbox-options) for other launch settings.
|
||||
When the sandbox is ready, its terminal opens with Claude Code.
|
||||
|
||||
## Give the agent a task
|
||||
### Give the agent a task
|
||||
|
||||
Your local files aren't mounted in a cloud sandbox. Ask Claude Code to clone
|
||||
and review a public sample project:
|
||||
@@ -70,10 +73,72 @@ Claude Code summarizes the project in the conversation and saves the review
|
||||
at `/home/agent/workspace/review.md`. You can ask follow-up questions or give
|
||||
it another task in the same session.
|
||||
|
||||
Continue to [keep your work](#keep-your-work), or
|
||||
[open the project in your editor](#open-the-project-in-your-editor-optional).
|
||||
|
||||
## Use a shell
|
||||
|
||||
### Launch a shell
|
||||
|
||||
The Shell kit starts a Bash shell without an agent.
|
||||
|
||||
1. Open [Docker Agentic Platform](https://agentic-platform.docker.com/) and
|
||||
select **+ New sandbox**.
|
||||
2. Open the kit picker and choose **shell**.
|
||||
3. If saved secrets or a GitHub token are selected, deselect them for this
|
||||
walkthrough. You don't need MCP tools either.
|
||||
4. In the network policy picker, select **Balanced** to permit access to
|
||||
GitHub, Docker Hub, and npm. Keep the compute and timer defaults and select
|
||||
**Run**.
|
||||
|
||||
If you use a custom network policy, make sure it permits GitHub, Docker Hub,
|
||||
and npm. See [Network policies](policies.md).
|
||||
|
||||
When the sandbox is ready, its terminal opens with a Bash shell.
|
||||
|
||||
### Build and run an application
|
||||
|
||||
Your local files aren't mounted in a cloud sandbox. In the browser terminal,
|
||||
clone a public sample project:
|
||||
|
||||
```console
|
||||
$ git clone https://github.com/docker/welcome-to-docker.git project
|
||||
$ cd project
|
||||
```
|
||||
|
||||
The Shell kit includes Docker Engine. Build the application's container image:
|
||||
|
||||
```console
|
||||
$ docker build -t welcome-to-docker .
|
||||
```
|
||||
|
||||
The build installs the application's dependencies and compiles it inside the
|
||||
sandbox. When it finishes, start a container and publish its port:
|
||||
|
||||
```console
|
||||
$ docker run -d --name welcome-to-docker -p 3000:3000 welcome-to-docker
|
||||
```
|
||||
|
||||
### Preview the application
|
||||
|
||||
1. Select **Connect** on the sandbox's detail page.
|
||||
2. Under **Connect via a Port**, enter `3000` and select **Open Port**.
|
||||
3. Open the generated URL in your browser.
|
||||
|
||||
You should see the Welcome to Docker application. The application runs in the
|
||||
cloud sandbox, so you can try it without installing Docker or Node.js on your
|
||||
computer.
|
||||
|
||||
The generated URL is public. Close the port in **Connect** when you've finished
|
||||
previewing the application.
|
||||
|
||||
Continue to [keep your work](#keep-your-work), or
|
||||
[open the project in your editor](#open-the-project-in-your-editor-optional).
|
||||
|
||||
## Keep your work
|
||||
|
||||
The cloned project and review are stored in the sandbox. Files don't sync
|
||||
automatically with your computer or a remote repository. They remain available
|
||||
The cloned project and any files you create are stored in the sandbox. Files
|
||||
don't sync automatically with your computer or a remote repository. They remain available
|
||||
when you pause and resume the sandbox, but are lost when you delete it.
|
||||
|
||||
To keep files outside the sandbox, use the CLI to
|
||||
@@ -84,9 +149,9 @@ needs to push changes.
|
||||
|
||||
## Open the project in your editor (optional)
|
||||
|
||||
Open the project and review in VS Code or Cursor over SSH. Your editor
|
||||
runs on your computer, while the files and terminal commands stay in the
|
||||
cloud sandbox.
|
||||
Open the project in VS Code or Cursor over SSH to edit the application. Your
|
||||
editor runs on your computer, while the files and terminal commands stay in
|
||||
the cloud sandbox.
|
||||
|
||||
1. Install the [Docker Sandboxes CLI](/manuals/ai/sandboxes/install.md),
|
||||
version 0.45.0 or later.
|
||||
@@ -113,12 +178,13 @@ cloud sandbox.
|
||||
In Cursor, install its Remote - SSH support.
|
||||
5. Open your editor's Command Palette and run **Remote-SSH: Connect to Host**.
|
||||
Enter `<SANDBOX_ID>@sbx_cloud`, using the same ID as in the SSH command.
|
||||
6. Open `/home/agent/workspace` in the remote window. You'll find the cloned
|
||||
application in `project` and the agent's output in `review.md`.
|
||||
6. Open `/home/agent/workspace` in the remote window. Both workflows clone
|
||||
the application into `project`. The coding agent also saves `review.md`
|
||||
in the workspace.
|
||||
|
||||
The first connection installs the editor's server inside the sandbox.
|
||||
|
||||
To download the review, run this command in a terminal on your computer:
|
||||
If you followed the coding agent workflow, download the review run this command in a terminal on your computer:
|
||||
|
||||
```console
|
||||
$ sbx --cloud cp <SANDBOX_ID>:/home/agent/workspace/review.md ./review.md
|
||||
@@ -127,19 +193,19 @@ $ sbx --cloud cp <SANDBOX_ID>:/home/agent/workspace/review.md ./review.md
|
||||
## Pause, keep running, or delete the sandbox
|
||||
|
||||
Closing the browser or disconnecting your editor leaves the sandbox running.
|
||||
An agent can continue working until you pause or delete the sandbox, or its
|
||||
timer expires. Compute is billed while the sandbox runs, even when the agent
|
||||
has finished its task.
|
||||
Commands and background processes can continue until you pause or delete the
|
||||
sandbox, or its timer expires. Compute is billed while the sandbox runs, even
|
||||
when no commands are running.
|
||||
|
||||
Return to **Sandboxes** in the Console and choose what to do next:
|
||||
|
||||
- Pause the sandbox to stop compute charges and keep its files. Confirm that
|
||||
it is paused in the list. To continue later, reopen the sandbox and resume
|
||||
it. Resuming starts a fresh timer with the original duration.
|
||||
- Leave it running if the agent still has work to do. Check the expiration
|
||||
- Leave it running if the agent still has work to do or to keep the application available. Check the expiration
|
||||
time: the default **Stop** action stops the sandbox after one hour, including
|
||||
background processes, and keeps its files.
|
||||
- Delete it when you no longer need it. Save the review or push any changes
|
||||
- Delete it when you no longer need it. Push any source changes
|
||||
you want to keep first. Deletion removes files stored only in the sandbox.
|
||||
|
||||
For more detail, see [Lifecycle actions](sandboxes.md#manage-the-lifecycle).
|
||||
@@ -150,7 +216,8 @@ For programmatic workflows, see the
|
||||
|
||||
## Sandbox options
|
||||
|
||||
Configure these options before selecting **Run**:
|
||||
After launch, you can't change the selected credentials, tools, network policies,
|
||||
or compute size. Configure these options before selecting **Run**:
|
||||
|
||||
| Option | What to choose |
|
||||
| --- | --- |
|
||||
|
||||
Reference in new issue
Block a user