Skip to content

Commit 756981b

Browse files
bpmctmatifali
andauthored
feat: add universal image (#307)
Co-authored-by: Atif Ali <atif@coder.com>
1 parent cb79ce2 commit 756981b

3 files changed

Lines changed: 38 additions & 0 deletions

File tree

images/universal/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Example Universal Image
2+
3+
[![Docker Pulls](https://img.shields.io/docker/pulls/codercom/example-universal?label=codercom%2Fexample-universal)](https://hub.docker.com/r/codercom/example-universal)
4+
5+
## Description
6+
7+
Microsoft's [Universal Dev Container Image](https://github.com/devcontainers/images/tree/main/src/universal) extended with a `coder` user.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Welcome to Coder! This environment is based on Microsoft's Dev Container Universal image
2+
with a suite of common tools and languages (Python, Java, Node.js, Go, Rust, etc.)
3+
4+
➡️ https://github.com/devcontainers/images/tree/main/src/universal
5+
6+
To use another image, modify your devcontainer.json or your Coder Template.
7+

images/universal/ubuntu.Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM mcr.microsoft.com/devcontainers/universal:linux
2+
3+
USER root
4+
5+
COPY first-run-notice.txt /usr/local/etc/vscode-dev-containers/
6+
7+
# Remove Conda to avoid any license issues
8+
RUN rm -R /opt/conda && \
9+
rm /usr/local/etc/vscode-dev-containers/conda-notice.txt
10+
11+
# Install Chrome for AI Browser Testing
12+
RUN yes | npx playwright install chrome
13+
14+
# Create `coder` user
15+
RUN userdel -r codespace && \
16+
useradd coder \
17+
--create-home \
18+
--shell=/bin/bash \
19+
--groups=docker \
20+
--uid=1000 \
21+
--user-group && \
22+
echo "coder ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers.d/nopasswd
23+
24+
USER coder

0 commit comments

Comments
 (0)