Custom images allow you to define workspaces that include the dependencies, scripts, and user preferences helpful for your project.
This guide assumes that you're familiar with:
Instead of starting from scratch, we recommend extending one of our sample images:
# Dockerfile FROM codercom/enterprise-base:ubuntu RUN apt-get install -y ... COPY file ./ ...
If you're using a different base image, see our image minimum requirements to make sure that your image will work with all of Coder's features.
If you're using CVM-only features during an image's build time (e.g., you're pre-loading images in workspaces), you will need to install the sysbox runtime onto your local machine and build images locally. Note that this isn't usually necessary, even if your image installs and enables Docker.
This snippet shows you how to install an IntelliJ IDE onto your image so that you can use it in your Coder workspace:
# Dockerfile FROM ... # Install IDEs as root USER root RUN mkdir -p /opt/[IDE] RUN curl -L \ "https://download.jetbrains.com/product?code=[CODE]&latest&distribution=linux" \ | tar -C /opt/[IDE] --strip-components 1 -xzvf RUN ln -s /opt/[IDE]/bin/clion.sh /usr/bin/[IDE]
Make sure that you replace
[IDE] with the name of the IDE in lowercase and
More specifically, here's how to install the CLion IDE onto your image:
# Dockerfile FROM ... USER root # Install CLion RUN mkdir -p /opt/clion RUN curl -L \ "https://download.jetbrains.com/product?code=CL&latest&distribution=linux" \ | tar -C /opt/clion --strip-components 1 -xzvf RUN ln -s /opt/clion/bin/clion.sh /usr/bin/clion
To get an idea of what you can include in your images, see: