diff --git a/images/base/README.md b/images/base/README.md index ae2d9f8..68713f0 100644 --- a/images/base/README.md +++ b/images/base/README.md @@ -1,6 +1,6 @@ -# Enterprise Base +# Example Base -[![Docker Pulls](https://img.shields.io/docker/pulls/codercom/enterprise-base?label=codercom%2Fenterprise-base)](https://hub.docker.com/r/codercom/enterprise-base) +[![Docker Pulls](https://img.shields.io/docker/pulls/codercom/example-base?label=codercom%2Fexample-base)](https://hub.docker.com/r/codercom/example-base) ## Description diff --git a/images/desktop/README.md b/images/desktop/README.md index 35f969b..855f5eb 100644 --- a/images/desktop/README.md +++ b/images/desktop/README.md @@ -1,10 +1,10 @@ # Desktop -[![DockerPulls](https://img.shields.io/docker/pulls/codercom/enterprise-desktop)](https://hub.docker.com/r/codercom/enterprise-desktop) +[![DockerPulls](https://img.shields.io/docker/pulls/codercom/example-desktop)](https://hub.docker.com/r/codercom/example-desktop) ## Description -Wraps [enterprise-base](../base/README.md) with a xfce desktop environment. +Wraps [example-minimal](../minimal/README.md) with a xfce desktop environment. > **Note:** This image does not contain a vnc-server. > A VNC server can be added by using the [KasmVNC](https://registry.coder.com/modules/kasmvnc) module. diff --git a/images/desktop/ubuntu.Dockerfile b/images/desktop/ubuntu.Dockerfile index 24899f7..cc25233 100644 --- a/images/desktop/ubuntu.Dockerfile +++ b/images/desktop/ubuntu.Dockerfile @@ -1,4 +1,4 @@ -FROM codercom/enterprise-minimal:latest +FROM codercom/example-minimal:latest USER root diff --git a/images/golang/README.md b/images/golang/README.md index 527dbc7..452f09b 100644 --- a/images/golang/README.md +++ b/images/golang/README.md @@ -1,10 +1,10 @@ # Golang -[![DockerPulls](https://img.shields.io/docker/pulls/codercom/enterprise-golang)](https://hub.docker.com/r/codercom/enterprise-golang) +[![DockerPulls](https://img.shields.io/docker/pulls/codercom/example-golang)](https://hub.docker.com/r/codercom/example-golang) ## Description -Wraps [enterprise-base](../base/README.md) with the basics for Go development. +Wraps [example-base](../base/README.md) with the basics for Go development. > **Note:** This image does not contain GoLand. For an example of how to install > GoLand, see [enterprise-goland](../../deprecated/goland/README.md) diff --git a/images/golang/ubuntu.Dockerfile b/images/golang/ubuntu.Dockerfile index e80d0a2..23ea3e9 100644 --- a/images/golang/ubuntu.Dockerfile +++ b/images/golang/ubuntu.Dockerfile @@ -1,4 +1,4 @@ -FROM codercom/enterprise-base:ubuntu +FROM codercom/example-base:ubuntu # Run everything as root USER root diff --git a/images/java/README.md b/images/java/README.md index 27d246d..306a790 100644 --- a/images/java/README.md +++ b/images/java/README.md @@ -1,10 +1,10 @@ # Java -[![Docker Pulls](https://img.shields.io/docker/pulls/codercom/enterprise-java?label=codercom%2Fenterprise-java)](https://hub.docker.com/r/codercom/enterprise-java) +[![Docker Pulls](https://img.shields.io/docker/pulls/codercom/example-java?label=codercom%2Fexample-java)](https://hub.docker.com/r/codercom/example-java) ## Description -Wraps [enterprise-base](../base/README.md) with the basics for Java development. +Wraps [example-base](../base/README.md) with the basics for Java development. > **Note:** This image does not contain IntelliJ. For an example of how to > install IntelliJ, see [enterprise-intellij](../../deprecated/intellij/README.md) diff --git a/images/java/ubuntu.Dockerfile b/images/java/ubuntu.Dockerfile index baa7a3c..50d01c1 100644 --- a/images/java/ubuntu.Dockerfile +++ b/images/java/ubuntu.Dockerfile @@ -1,4 +1,4 @@ -FROM codercom/enterprise-base:ubuntu +FROM codercom/example-base:ubuntu # Run everything as root USER root @@ -18,7 +18,7 @@ ENV MAVEN_CONFIG="/home/coder/.m2" RUN mkdir -p $MAVEN_HOME $MAVEN_HOME/ref \ && echo "Downloading maven" \ - && curl -fsSL -o /tmp/apache-maven.tar.gz https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz \ + && curl -fsSL -o /tmp/apache-maven.tar.gz https://downloads.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz \ && echo "Checking downloaded file hash" \ && echo "${MAVEN_SHA512} /tmp/apache-maven.tar.gz" | sha512sum -c - \ && echo "Unzipping maven" \ diff --git a/images/minimal/README.md b/images/minimal/README.md index aad0f50..19e6810 100644 --- a/images/minimal/README.md +++ b/images/minimal/README.md @@ -1,4 +1,6 @@ -# Minimal Image +# Example Minimal + +[![Docker Pulls](https://img.shields.io/docker/pulls/codercom/example-minimal?label=codercom%2Fexample-minimal)](https://hub.docker.com/r/codercom/example-minimal) This image only contains the bare necessities: diff --git a/images/node/README.md b/images/node/README.md index b7da053..e61381a 100644 --- a/images/node/README.md +++ b/images/node/README.md @@ -1,10 +1,10 @@ # Node -[![Docker Pulls](https://img.shields.io/docker/pulls/codercom/enterprise-node?label=codercom%2Fenterprise-node)](https://hub.docker.com/r/codercom/enterprise-node) +[![Docker Pulls](https://img.shields.io/docker/pulls/codercom/example-node?label=codercom%2Fexample-node)](https://hub.docker.com/r/codercom/example-node) ## Description -Wraps [enterprise-base](../base/README.md) with the basics for Node development. +Wraps [example-base](../base/README.md) with the basics for Node development. ## How To Use diff --git a/images/node/ubuntu.Dockerfile b/images/node/ubuntu.Dockerfile index b466aca..a4d28fa 100644 --- a/images/node/ubuntu.Dockerfile +++ b/images/node/ubuntu.Dockerfile @@ -1,4 +1,4 @@ -FROM codercom/enterprise-base:ubuntu +FROM codercom/example-base:ubuntu # Run everything as root USER root 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..5947812 --- /dev/null +++ b/images/universal/ubuntu.Dockerfile @@ -0,0 +1,55 @@ +FROM mcr.microsoft.com/devcontainers/base:ubuntu + +USER root + +COPY first-run-notice.txt /usr/local/etc/vscode-dev-containers/ + +# Install universal development tools +# Common development tools, programming languages and runtimes, additional tools +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends \ + build-essential \ + curl \ + wget \ + git \ + vim \ + nano \ + unzip \ + zip \ + python3 \ + python3-pip \ + python3-venv \ + nodejs \ + npm \ + openjdk-11-jdk \ + jq \ + htop \ + tree \ + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* + +# Install Go +RUN wget -O go.tar.gz https://go.dev/dl/go1.21.5.linux-amd64.tar.gz \ + && tar -C /usr/local -xzf go.tar.gz \ + && rm go.tar.gz + +# Install Maven +RUN wget -O maven.tar.gz https://downloads.apache.org/maven/maven-3/3.9.10/binaries/apache-maven-3.9.10-bin.tar.gz \ + && tar -C /opt -xzf maven.tar.gz \ + && mv /opt/apache-maven-3.9.10 /opt/maven \ + && rm maven.tar.gz + +# Set up environment variables +ENV PATH="/usr/local/go/bin:/opt/maven/bin:${PATH}" +ENV JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64" +ENV MAVEN_HOME="/opt/maven" + +# Create coder user +RUN 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 diff --git a/scripts/images.sh b/scripts/images.sh index 0439477..f56741f 100644 --- a/scripts/images.sh +++ b/scripts/images.sh @@ -9,4 +9,5 @@ IMAGES=( "java" "node" "desktop" + "universal" )