Skip to content

fix(examples): copy /etc/skel on init in docker template #12913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

mafredri
Copy link
Member

@mafredri mafredri commented Apr 9, 2024

This will give users a nicer first-time experience using the docker template and will allow them to update their ~/.bashrc and it'll just work ™️.

Fixes #10209

image

Edit: It seems ~/.bashrc did work even without this, but this is still a nicer experience with colored prompt/better settings over of a basic black/white one. I only tested in web terminal though so that may be why the rcfile worked even without this PR.

Copy link
Member Author

mafredri commented Apr 9, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @mafredri and the rest of your teammates on Graphite Graphite

@mafredri mafredri marked this pull request as ready for review April 9, 2024 11:41
@mafredri mafredri requested review from johnstcn and matifali April 9, 2024 11:49
@mafredri
Copy link
Member Author

mafredri commented Apr 9, 2024

Verified the fix for SSH sessions, here the change is immediately visible.

Fix:

coder@w ~/coder mafredri/fix-examples-docker-user-skel*
❯ ./scripts/coder-dev.sh ssh test
👋 Your workspace is outdated! Update it here: http://127.0.0.1:3000/@admin/test

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

HELLO WORLD
admin@test:~$

No fix:

coder@w ~/coder mafredri/fix-examples-docker-user-skel* 17s
❯ ./scripts/coder-dev.sh ssh test2
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

admin@test2:~$ cat ~/.bashrc
echo HELLO WORLD
admin@test2:~$

@mafredri mafredri merged commit 0178bfe into main Apr 9, 2024
34 checks passed
@mafredri mafredri deleted the mafredri/fix-examples-docker-user-skel branch April 9, 2024 11:54
@github-actions github-actions bot locked and limited conversation to collaborators Apr 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A new workspace from docker template does not source .bashrc
3 participants