From abe982b0826f933cae6b68306ccc47b937055f99 Mon Sep 17 00:00:00 2001 From: Ben Potter Date: Tue, 19 Aug 2025 02:30:15 +0000 Subject: [PATCH 1/2] feat: add universal image --- images/universal/README.md | 7 +++++++ images/universal/first-run-notice.txt | 7 +++++++ images/universal/ubuntu.Dockerfile | 24 ++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 images/universal/README.md create mode 100644 images/universal/first-run-notice.txt create mode 100644 images/universal/ubuntu.Dockerfile diff --git a/images/universal/README.md b/images/universal/README.md new file mode 100644 index 0000000..f64b27d --- /dev/null +++ b/images/universal/README.md @@ -0,0 +1,7 @@ +# Example Universal Image + +[![Docker Pulls](https://img.shields.io/docker/pulls/codercom/example-universal?label=codercom%2Fexample-universal)](https://hub.docker.com/r/codercom/example-universal) + +## Description + +Microsoft's [Universal Dev Container Image](https://github.com/devcontainers/images/tree/main/src/universal) extended with a `coder` user. diff --git a/images/universal/first-run-notice.txt b/images/universal/first-run-notice.txt new file mode 100644 index 0000000..5d8febd --- /dev/null +++ b/images/universal/first-run-notice.txt @@ -0,0 +1,7 @@ +Welcome to Coder! This environment is based on Microsoft's Dev Container Universal image +with a suite of common tools and languages (Python, Java, Node.js, Go, Rust, etc.) + +➡️ https://github.com/devcontainers/images/tree/main/src/universal + +To use another image, modify your devcontainer.json or your Coder Template. + diff --git a/images/universal/ubuntu.Dockerfile b/images/universal/ubuntu.Dockerfile new file mode 100644 index 0000000..c40e7c8 --- /dev/null +++ b/images/universal/ubuntu.Dockerfile @@ -0,0 +1,24 @@ +FROM mcr.microsoft.com/devcontainers/universal:linux + +USER root + +COPY first-run-notice.txt /usr/local/etc/vscode-dev-containers/ + +# Remove Conda to avoid any license issues +RUN rm -R /opt/conda && \ + rm /usr/local/etc/vscode-dev-containers/conda-notice.txt + +# Install Chrome for AI Browser Testing +RUN yes | npx playwright install chrome + +# Create `coder` user +RUN userdel -r codespace && \ + useradd coder \ + --create-home \ + --shell=/bin/bash \ + --groups=docker \ + --uid=1000 \ + --user-group && \ +echo "coder ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers.d/nopasswd + +USER coder \ No newline at end of file From 749fd91bbd911ec78af62bcc0ffe826f8192842d Mon Sep 17 00:00:00 2001 From: Ben Potter Date: Tue, 19 Aug 2025 02:31:51 +0000 Subject: [PATCH 2/2] newline --- images/universal/ubuntu.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/universal/ubuntu.Dockerfile b/images/universal/ubuntu.Dockerfile index c40e7c8..1f2529e 100644 --- a/images/universal/ubuntu.Dockerfile +++ b/images/universal/ubuntu.Dockerfile @@ -21,4 +21,4 @@ RUN userdel -r codespace && \ --user-group && \ echo "coder ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers.d/nopasswd -USER coder \ No newline at end of file +USER coder