1.0 KiB
1.0 KiB
Vaessl: code-server adjustments
Before developing on code-server I configure a Dockerfile to install all packages needed for Spring Boot, Java and Next.js. I install openjdk, npm, nodejs and yarn and set the environment variables for Java. Since the linuxserver code-server image doesn't come with root access for its default user abc out of the box every privileged action will be baked in here:
FROM lscr.io/linuxserver/code-server:latest
USER root
RUN apt update && apt install -y \
openjdk-25-jdk maven \
nodejs npm \
&& npm install -g yarn \
&& rm -rf /var/lib/apt/lists/*
ENV JAVA_HOME=/usr/lib/jvm/java-25-openjdk-amd64
ENV PATH="$JAVA_HOME/bin:${PATH}"
Build the custom image and name it something like code-server-dev:
docker build -t code-server-dev .
Make sure to add code-server-dev:latest to the image env in the docker-compose file.
Now deploy the docker-compose and check all the configurations:
java --version
mvn --version
npm --version
yarn --version
nodejs --version