Building and Starting the Daytona Project
This document provides a step-by-step guide to building and starting the Daytona project.
Prerequisites:
- Go installed and configured.
- Docker installed and running.
Building the project:
Clone the repository:
git clone https://github.com/daytonaio/daytona.git cd daytonaBuild the project:
go build -o daytona ./cmd/daytonaThis command will build the Daytona executable and place it in the current directory. The
-o daytonaflag sets the output filename todaytona.
Running Tests:
Build the project with test constraints:
go build -tags testing -o daytona ./cmd/daytonaThe
-tags testingflag enables the build constraint for testing, ensuring that the tests are compiled into the executable.Run the tests:
./daytona testThis will run the tests included in the project.
Starting the Daytona Server:
- Run the server in daemon mode:
This command starts the Daytona server in the background as a daemon../daytona server start
Creating a workspace:
- Create a new workspace:
Replace./daytona create [REPOSITORY_URL][REPOSITORY_URL]with the URL of the Git repository you want to use for your workspace.
Starting a workspace:
- Start the workspace:
Replace./daytona start [WORKSPACE][WORKSPACE]with the name of the workspace you want to start.
Example using a custom image:
- Create a workspace using a custom image:
Replace./daytona create [REPOSITORY_URL] --custom-image [CUSTOM_IMAGE] --custom-image-user [CUSTOM_IMAGE_USER][CUSTOM_IMAGE]with the custom image name and[CUSTOM_IMAGE_USER]with the custom image user.
Example using a devcontainer builder:
- Create a workspace using a devcontainer builder:
Replace./daytona create [REPOSITORY_URL] --devcontainer-path [DEVCONTAINER_PATH][DEVCONTAINER_PATH]with the path to the devcontainer configuration file.
Note: These commands are provided as examples, and you can refer to the documentation for more options and customization possibilities.
Further Documentation:
This documentation provides an overview of building and starting the Daytona project. For more detailed information and advanced usage, please refer to the project’s documentation.