Skip to content

Commit aadce06

Browse files
committed
Update image yaml spec
1 parent 209a09f commit aadce06

File tree

1 file changed

+14
-22
lines changed

1 file changed

+14
-22
lines changed

research/3-desktopus-image-spec/README.md

+14-22
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,23 @@ The `parameters` section defines a list of configurable parameters that can be u
2828
#### Example Parameters:
2929

3030
```yaml
31-
parameters:
32-
- name: username
31+
envs:
32+
- name: USERNAME
3333
type: string
34-
description: The username for the user account.
3534
default: user
36-
- name: password
35+
- name: PASSWORD
3736
type: string
38-
description: The password for the user account.
3937
default: password
40-
- name: font
38+
- name: VSCODE_FONT
4139
type: string
42-
description: The font family to use in the VS Code editor.
4340
default: Fira Code
44-
- name: fontSize
41+
- name: VSCODE_FONT_SIZE
4542
type: number
46-
description: The font size to use in the VS Code editor.
47-
required: true
43+
default: 14
4844
```
4945
46+
The environment variables defined in the `envs` section are resolved on startup and checked, so the container can't start if they are not defined or values are not valid.
47+
5048
### Modules
5149

5250
The `modules` section lists the software modules to be installed. Each module is specified by its name.
@@ -103,12 +101,9 @@ files:
103101

104102
#### Startup Script
105103

106-
The `startup_script` subsection specifies a script to be executed at startup. The script can include commands to install software or configure the environment.
104+
The `startup_script` subsection specifies a script to be executed at startup. The script can include commands to install software or configure the environment. Executes by default as root to allow for system-wide changes.
107105

108106
- **content**: The script content.
109-
- **mode**: File permissions (e.g., `0755`).
110-
- **owner**: Owner of the script file.
111-
- **group**: Group of the script file.
112107

113108
##### Example Startup Script:
114109

@@ -134,17 +129,17 @@ Below is a complete example of a Desktopus configuration file:
134129
135130
desktopusVersion: v0.1.0
136131
os: ubuntu-jammy
137-
parameters:
138-
- name: username
132+
envs:
133+
- name: USERNAME
139134
type: string
140135
default: user
141-
- name: password
136+
- name: PASSWORD
142137
type: string
143138
default: password
144-
- name: font
139+
- name: VSCODE_FONT
145140
type: string
146141
default: Fira Code
147-
- name: fontSize
142+
- name: VSCODE_FONT_SIZE
148143
type: number
149144
default: 14
150145
modules:
@@ -181,7 +176,4 @@ meta:
181176
# Install vscode extensions
182177
code --install-extension ms-python.python
183178
code --install-extension ms-vscode.cpptools
184-
mode: '0755'
185-
owner: ${username}
186-
group: ${username}
187179
```

0 commit comments

Comments
 (0)