Presistent ubuntu volume

Hello, how do i achieve a presistent ubuntu volume? when I restart my docker dev volume it just reinstall ubuntu and delete my zsh and Golang installation.
11 Replies
Codercord
Codercord2w ago
<#1338382160226160670>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Dee Lishus
Dee LishusOP2w ago
note: i am using default docker template, here is the start up script:
<<-EOT
set -e

# Prepare user home with default files on first start.
if [ ! -f ~/.init_done ]; then
cp -rT /etc/skel ~
touch ~/.init_done
fi

# Install the latest code-server.
# Append "--version x.x.x" to install a specific version of code-server.
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server

# Start code-server in the background.
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
EOT
<<-EOT
set -e

# Prepare user home with default files on first start.
if [ ! -f ~/.init_done ]; then
cp -rT /etc/skel ~
touch ~/.init_done
fi

# Install the latest code-server.
# Append "--version x.x.x" to install a specific version of code-server.
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server

# Start code-server in the background.
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
EOT
Dee Lishus
Dee LishusOP2w ago
also. when I try to edit the script, it just download terraform file instead.. and not edit existing one
No description
Atif
Atif2w ago
Hi @Dee Lishus what is your Coder version? We recently fixed an issue with the example template that was preventing the persistent volume from working as expected. https://github.com/coder/coder/commit/738a7f6bd92f7b9d1a3df18b9a2fd181ba5f9d46
Dee Lishus
Dee LishusOP2w ago
hello, i am using latest v2.18.5+41bfccc the problem is id like to install zsh and golang to be presistent outside of /home/coder
Phorcys
Phorcys2w ago
hello @Dee Lishus, Coder workspaces are made to be ephemeral and only persist what's needed, so anything you install will be wiped unless specified otherwise. with Docker, you can't really persist packages because you'd risk breaking future changes in the Docker image, so you either have to edit your Dockerfile to install these tools beforehand, or you can edit the startup_script to install them when the workspace starts if you want to let users install their own tools, use the personalize module
Dee Lishus
Dee LishusOP2w ago
ah i seee, thats exactly what i need! thank you very much! how do i mark this as solved?
Phorcys
Phorcys2w ago
for this, I think you might want to disable your download manager extension as it is probably causing the issue you can use the /close command
Dee Lishus
Dee LishusOP2w ago
alrighty, thank you very much for the help! /close
Codercord
Codercord2w ago
@Phorcys closed the thread.
Phorcys
Phorcys2w ago
;)

Did you find this page helpful?