Description
We could consider deprecating the common feature (similar to some of the ones mentioned in #64) and creating multiple features out of it.
The current common
feature contains (text from @Chuxel):
1. Common OS Utilities, set a locale if one not there, systemctl shim
- A “common utilities” feature w/o sudo. To recap, its goal is to install:
- Common command line utilities used in shell scripts (e.g., ps, lsof, wget, curl + ca-certificates zip, unzip, tar, net-tools)
- Utilities frequently referenced in Linux install instructions (apt-transport-https, lsb-release, jq, gnupg2 + dirmngr)
- Man pages (man-db, manpages, manpages-dev, manpages-posix manpages-posix-dev)
- Libraries frequently required by native code that is not statically compiled (libc6, libgcc1, libkrb5-3, libgssapi-krb5-2, libicu[0-9][0-9], liblttng-ust[0-9], libstdc++6, zlib1g)
- Give people a hint for what to do w/o systemctl since systemd is rarely in container images, but pass through if it’s there. Lots of Linux instructions reference it so it was added in time because of customer confusion.
Many of these are already in images like “node”, but they’re checked for coverage since they can be missing from minimal images like “debian”. Adding a default locale is a good idea given the number of developer tools that can bomb without it, but we could give the option to pick a locale. Right now, it’s always en_US.UTF-8. In theory we could pull out git in favor of the git feature but given how central it is to developer images and it only installs if not present, it might be worth keeping.
2. Default bash theme
- Include in “common utilities” but change the default so the source code portion of it is off by default since this can be slow in massive repos. Also disabling source control is mandatory if git is removed from common utilities. Rename it to “devcontainers-default” instead of “codespaces.”
3. apt-get upgrade option
- New “apt” feature which includes upgrade and the option to install packages from a list.
4. Non-root user and w/sudo setup
- Add into devcontainer.json as a core option including installing, configuring sudo @chrmarti (Proposal: Introduce support for auto-creation of user referenced in remoteUser or containerUser properties spec#75)
5. Zsh + Oh My Zsh + Default Theme
- New “ZSH” feature that includes default theme but makes it an option. Rename the theme “devcontainers-default.”
6. Set git editor to “code” if in VS Code terminal window and editor not already set
- Built-in feature of Remote – Containers and Codespaces. Its presence here is a hack.
7. “code” auto-maps to code-insiders if we’re in a container created by code-insiders (since “code” won’t ever work)
- Built-in feature of Remote – Containers and Codespaces. Its presence here is a hack.
8. devcontainer-info command
- Separate Feature specifically used in images from https://github.com/devcontainers/images. Very useful command for debugging, but it uses a file output by the image build setup.
9. First run message
- Built-in feature of Remote – Containers and Codespaces. Reuse same file location for back compat.
Its inclusion here was always a workaround. Tactically we could just make this a separate feature, but it’s always been a bit of an ugly hack.
10. common-redhat.sh, common-alpine.sh
- Merge these two scripts into the “common utilities” and “zsh” features. We can detect whether apt, yum, or apk are there to figure out which scenario we are in. Most of the script is the same aside from how the packages are installed.