-
Notifications
You must be signed in to change notification settings - Fork 38
chore: standardize Docker base images to approved platform images #9
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
base: main
Are you sure you want to change the base?
Conversation
Replace mcr.microsoft.com/devcontainers/base:ubuntu-24.04 with approved ubuntu:22.04 base image for consistency across the platform. Co-authored-by: Ona <[email protected]>
| @@ -0,0 +1,6 @@ | |||
| # Standardized to approved base image | |||
| FROM ubuntu:22.04 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ Info: Updated from mcr.microsoft.com/devcontainers/base:ubuntu-24.04 to ubuntu:22.04.
Key differences:
- Version change: Ubuntu 24.04 → 22.04 LTS (Long Term Support until 2027)
- Base image source: Microsoft's dev container base → Official Ubuntu base
- Pre-installed tools: The Microsoft base includes common dev tools (git, curl, wget, etc.). The official Ubuntu base is minimal and may require installing these tools.
What changed:
- Microsoft's base includes a non-root
vscodeuser with sudo access - Official Ubuntu 22.04 only has the
rootuser by default - If your devcontainer.json relies on the
vscodeuser or pre-installed tools, you may need to add RUN commands to install them
👀 Review: Check if your devcontainer.json has remoteUser set to vscode - you may need to create this user or change to root.
| FROM ubuntu:22.04 | ||
|
|
||
| # use this Dockerfile to install additional tools you might need, e.g. | ||
| # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Good news: The apt-get package manager works with ubuntu:22.04 since both the old and new base images are Debian-based.
ℹ️ Info: Common packages you might need to install for dev container functionality:
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
git \
curl \
wget \
ca-certificates \
sudo \
&& apt-get clean && rm -rf /var/lib/apt/lists/*vscode user from the Microsoft base), add:
RUN useradd -m -s /bin/bash vscode \
&& echo "vscode ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/vscode \
&& chmod 0440 /etc/sudoers.d/vscode| @@ -0,0 +1,6 @@ | |||
| # Standardized to approved base image | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📋 Overview: This Dockerfile has been updated to use the approved ubuntu:22.04 base image instead of Microsoft's dev container base.
Testing checklist:
- Rebuild the dev container and verify it starts successfully
- Check that all required tools are available (git, docker, docker-compose, etc.)
- Verify file permissions work correctly
- Test that the docker-compose services start as expected
- Confirm the user context is correct (root vs non-root)
Note: The devcontainer.json currently doesn't specify a remoteUser, so it will default to root with the new base image. This is different from the Microsoft base which defaulted to the vscode user.
This pull request updates the Docker base images in this repository to align with our organization's approved base image standards. These changes were generated automatically by Ona as part of our platform-wide standardization effort.
Changes Made
.devcontainer/Dockerfilemcr.microsoft.com/devcontainers/base:ubuntu-24.04ubuntu:22.04Standardization Benefits
Testing
The Dockerfile has been updated with the approved base image and includes a comment explaining the change. The structure and existing comments have been preserved.