.Gitpod.yml configuration¶
The .[Gitpod](<./gitpod.md>).yml file is the primary configuration file used to define and customize the development environment for a project running on [[gitpod|Gitpod]].^[github__gitpod.md]
Purpose and Usage¶
This configuration file resides in the root of a project and works in conjunction with an optional .[Gitpod](<./gitpod.md>).Dockerfile to set up the workspace.^[github__gitpod.md] While Gitpod offers default environments that come pre-installed with many common tools—such as Maven, Gradle, and Java—this file allows developers to define specific image requirements or override defaults when necessary.^[github__gitpod.md]
Configuration Example¶
To customize the environment, a user creates a .[Gitpod](<./gitpod.md>).yml file.^[github__gitpod.md] A common use case involves specifying a custom Docker image using the image key and pointing it to a separate Dockerfile.^[github__gitpod.md]
The following example demonstrates how to configure the workspace to use a custom Dockerfile that installs a specific version of Java:^[github__gitpod.md]
image:
file: .[Gitpod](<./gitpod.md>).Dockerfile
And the corresponding .[Gitpod](<./gitpod.md>).Dockerfile:^[github__gitpod.md]
FROM [Gitpod](<./gitpod.md>)/workspace-full
USER [Gitpod](<./gitpod.md>)
RUN bash -c ". /home/[Gitpod](<./gitpod.md>)/.[SDKMAN](<./sdkman.md>)/bin/sdkman-init.sh && \
sdk install java 17.0.3-ms && \
sdk default java 17.0.3-ms"
Related Concepts¶
- [[Docker]]
- CI/CD
Sources¶
^[github__gitpod.md]