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..1f2529e --- /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