Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0178bfe

Browse files
authored
fix(examples): copy /etc/skel on init in docker template (coder#12913)
Fixes coder#10209
1 parent 28754a7 commit 0178bfe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/templates/docker/main.tf

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ resource "coder_agent" "main" {
2828
startup_script = <<-EOT
2929
set -e
3030
31+
# Prepare user home with default files on first start.
32+
if [ ! -f ~/.init_done ]; then
33+
cp -rT /etc/skel ~
34+
touch ~/.init_done
35+
fi
36+
3137
# install and start code-server
3238
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.19.1
3339
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &

0 commit comments

Comments
 (0)