Harlow Robotics' custom Cloud Workstations image copies shared IDE settings and a Git configuration into /home/user in its Dockerfile. The image builds correctly, and packages installed in the same Dockerfile are present, but on every workstation those home directory files are missing. What should you do?
- A.
Move the home directory setup into a script in /etc/workstation-startup.d/, since /home is mounted from the disk at runtime.
- B.
Rebuild the image with the files copied to /home/user a second time, because the first copy step was cached incorrectly.
- C.
Increase the persistent disk size in the workstation configuration, because full disks cause the container to drop files from /home.
- D.
Grant the workstation configuration's service account Storage Admin so that it can write files into /home at startup.
Show answer
Answer: A
Because /home is mounted from the persistent disk at runtime, home directory customization belongs in /etc/workstation-startup.d/ scripts.
- A. The persistent disk is mounted over /home when the container starts, hiding build-time files; startup scripts run after the mount.
- B. Any build-time content under /home is hidden by the runtime mount, so copying it again changes nothing.
- C. Disk size isn't related; the files were never on the mounted disk.
- D. No Google Cloud permission is involved in writing files into the container's home directory.