This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
How to Maintain Persistent Changes in Your Workspace
Overview
This article outlines best practices for making workspace changes, such as installing packages, software, and libraries—persist across workspace restarts.
In a cloud development environment (CDE), only the developer’s home directory (/home/developer) is stored persistently by default. Here, we explain how to preserve changes made to the workspace image—including modifications outside the developer folder—so the development environment remains consistent across restarts.
If you’d like to create a new container image instead of updating an existing one, e.g. to share the same environment across users or to speed up the boot time of an image with a large start-up script, see: How to Update an Existing Container Image
Key rule: In an SDS workspace, the only persistent directory is /home/developer.
If a tool is installed outside /home/developer (for example via system package paths), it will not persist across restarts. Use the options below to keep environments consistent.
Recommended options (in order of preference)
- Use a workspace image with most of the tools you use to minimize start-up time (by keeping the start-up script as short as possible)
- Prefer user-space package managers for developer tooling (npm, pipx, etc) so installations live under
/home/developer(for example~/.local)`. - Use a workspace startup script for tools that cannot be installed in /home/developer installation commands split between pre-start and post-start when applicable.
Example: persistent user-space installations (npm)
Install global Node tooling into ~/.local so it persists under /home/developer:
mkdir -p ~/.local
npm config set prefix ~/.local
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
npm i -g yarn pnpm
<!--NeedCopy-->
Startup scripts (pre-start vs post-start)
Startup scripts automate configuration on workspace launch. SDS supports running the script either pre-startup or post-startup depending on your requirements.
- Use pre-startup when the workspace must wait for setup to complete (critical prerequisites).
- Use post-startup for larger installations so developers can start working sooner while setup continues.
Points of consideration
- Keep long software and package installation sequences as part of the workspace base image definition (i.e. docker file). This will minimize the workspace start-up time.
- Avoid storing secrets in images or scripts; use platform-managed mechanisms for secrets and access control.
- If you do use startup scripts, put large installations in post-start to keep time-to-first-code low.
References
Share
Share
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Citrix product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.