features icon indicating copy to clipboard operation
features copied to clipboard

Affect / add to motd (Message of the Day) at Codespace start

Open cnuss opened this issue 2 years ago • 2 comments

I'd like to add/append my own Message-of-the-Day (motd) at terminal start in Codespaces using Features, but it doesn't look like /etc/motd is displayed.

Is there a file I can modify or drop in to augment it?

Screen Shot 2022-11-16 at 9 07 16 AM

cnuss avatar Nov 16 '22 17:11 cnuss

Here is the source code for the default Codespaces image, if you'd like to see how it is set up there.

  • https://github.com/devcontainers/images/blob/main/src/universal/.devcontainer/first-run-notice.txt
  • https://github.com/devcontainers/images/blob/main/src/universal/.devcontainer/Dockerfile#L82

This is primed in the Dockerfile, and the common-utils Feature picks it up: https://github.com/devcontainers/features/blob/main/src/common-utils/install.sh#L243-L264

joshspicer avatar Nov 17 '22 00:11 joshspicer

I think a Feature that extracted this functionality would be valuable to other folks as well.

I encourage you to check out https://github.com/devcontainers/feature-starter if you are interested in trying to author the Feature yourself and contribute it back to https://containers.dev/features

joshspicer avatar Nov 17 '22 00:11 joshspicer