Introduction
Welcome to Daytona
Install Daytona and run the server
Configure a Git provider
Install Daytona providers
Manage local development environments with Daytona
Manage remote development environments using the Docker provider
Manage remote development environments using the AWS provider
Review
Next Steps
Daytona makes it easy to manage local development environments.
Follow these steps to learn how to create and manage an example local development environment.
To have a go, you can use a small dev container example from Microsoft. The example is a small Python application which uses Flask to serve a single HTML page.
Visit the GitHub repository to review the project.
If you want to create a workspace with the example repository and are not pushing any changes back to GitHub, you can use the URL to create a workspace.
Create a workspace with the command below:
daytona create --no-ide https://github.com/microsoft/vscode-remote-try-python/tree/main
The workspace is created without starting any IDE. More information about how to connect to the workspace is given below.
If you want to work with a repository in your GitHub account and learn how to make changes and push them to GitHub, you can click the Use this template button on the GitHub repository.
The template option creates a new repository in your account. Putting the repository in your account allows you to commit changes back to GitHub.
daytona create --no-ide
You will go through a series of prompts including:
Use the / command to find the repo if you have many repositories in your GitHub account.
The sequence is shown below:
The first time you create a workspace there are some delays while Docker images are pulled to your computer. This initial setup delay is usually unique to the first time you do this, and when you create a workspace subsequently, it should be much faster.
Once your workspace is running, you can use various commands to connect and performing coding tasks. Some options are shown below.
List the available workspaces:
daytona list
The output is similar to:
Workspace Repository Target Status
─────────────────────────────────────────────────────────────────────────────────────────────────────────────
vscode-remote-try-python microsoft/vscode-remote-try-python.git local STOPPED
To open VS Code on your computer and connect to the workspace run:
daytona code
To connect to the dev container using SSH in your current terminal run:
daytona ssh
To open a browser tab with VS Code running in the browser tab and connect to the workspace run:
daytona code -i browser
Any of these options can be used to connect to a Daytona workspace.
A number of other IDEs can be used with Daytona. Refer to the IDE documentation for details.
To start the Flask application, run:
python -m flask run --port 9000 --no-debugger --no-reload
If you start Python in VS Code, it will automatically forward port 9000 and open a browser tab to see the web page.
If you run the Python command in a terminal after using SSH to connect to a workspace, you can forward the port by running the command below on your local machine with the name of your workspace:
daytona forward 9000 vscode-remote-try-python
Now that you can create a workspace and connect to it, there are some other commands that you will find useful.
Use the stop command to stop the workspace. The dev container will stop on your local computer:
daytona stop
Use the start command to restart a workspace which is stopped:
daytona start
You can also delete a stopped workspace:
daytona delete
The container is removed from the system.
You have now learned the basic commands to manage local development environments with Daytona.
You can now move on to learn how to manage remote development environments.