Skip to content

Commit 17c7fd8

Browse files
committed
feat: add universal image based on Microsoft's universal devcontainer image
1 parent c481c46 commit 17c7fd8

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

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: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
RUN userdel -r codespace && \
12+
useradd coder \
13+
--create-home \
14+
--shell=/bin/bash \
15+
--groups=docker \
16+
--uid=1000 \
17+
--user-group && \
18+
echo "coder ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers.d/nopasswd
19+
20+
USER coder

0 commit comments

Comments
 (0)