thedocks/code-serverx/Dockerfile

71 lines
2.3 KiB
Docker
Raw Normal View History

2022-02-08 17:38:00 +00:00
# A code-server image with added
2023-03-01 20:36:02 +00:00
# openjdk@17
2023-05-23 23:05:52 +01:00
# BaseX installed@10.6
# docker build --tag=vscode4.13-basex10.6 .
# @author Andy Bunce
2022-07-31 12:24:40 +01:00
# Bugs:
# hardcoded for amd64
# Main image
2023-05-23 23:05:52 +01:00
FROM ghcr.io/linuxserver/code-server:4.13.0
2022-02-08 17:38:00 +00:00
2022-03-02 21:20:52 +00:00
ARG TARGETARCH
ARG BUILDARCH
2023-03-01 22:17:39 +00:00
ARG PUID=1000
ARG PGID=1000
2022-05-02 11:41:25 +01:00
RUN echo "I'm building vscode-basex for ${BUILDARCH} on ${TARGETARCH} User: ${PUID}"
2022-02-08 17:38:00 +00:00
LABEL author="Andy Bunce"
LABEL company="Quodatum Ltd"
2022-02-08 11:11:29 +00:00
LABEL maintainer="quodatum@gmail.com"
2022-02-08 10:54:29 +00:00
2023-03-01 20:36:02 +00:00
# Install OpenJDK-17
2022-02-08 10:54:29 +00:00
RUN apt-get update && \
2023-03-01 20:36:02 +00:00
apt-get install -y openjdk-17-jdk-headless;
2022-02-08 12:36:53 +00:00
2022-02-08 10:54:29 +00:00
# Fix certificate issues
RUN apt-get update && \
apt-get install ca-certificates-java && \
apt-get clean && \
update-ca-certificates -f;
# Setup JAVA_HOME -- useful for docker commandline
2023-03-01 20:36:02 +00:00
ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64/
2022-02-08 17:38:00 +00:00
RUN export JAVA_HOME
2022-03-02 21:20:52 +00:00
# install BaseX to /basex/
2023-05-23 23:05:52 +01:00
RUN curl https://files.basex.org/releases/10.6/BaseX106.zip | jar xv && \
2022-05-02 11:41:25 +01:00
chown -R $PUID:$PGID /basex && chmod a+x /basex/bin/* ;
2022-03-02 23:46:58 +00:00
ENV PATH=$PATH:/basex/bin
2022-02-08 18:09:35 +00:00
# install docker cli only
# https://docs.docker.com/engine/install/ubuntu/
RUN install -m 0755 -d /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
RUN chmod a+r /etc/apt/keyrings/docker.gpg
RUN echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
RUN apt-get update && apt-get install -y docker-ce-cli
2023-05-23 23:05:52 +01:00
#RUN curl https://download.docker.com/linux/static/stable/x86_64/docker-23.0.1.tgz | tar zxv -C /tmp/ && \
# cp /tmp/docker/docker /usr/local/bin && rm -r /tmp/docker;
2022-07-31 12:24:40 +01:00
# install maven
RUN curl https://dlcdn.apache.org/maven/maven-3/3.9.2/binaries/apache-maven-3.9.2-bin.tar.gz | \
2022-07-31 12:24:40 +01:00
tar zxv -C /usr/local/bin && \
cd /usr/local/bin && \
ln -s apache-maven-3.9.2 maven
2022-08-07 22:55:04 +01:00
ENV PATH=$PATH:/usr/local/bin/maven/bin
2022-07-31 12:24:40 +01:00
2022-08-08 11:31:55 +01:00
# install node+npm LTS see https://www.how2shout.com/linux/how-to-install-node-js-npm-on-debian-11-bullseye/
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
apt install nodejs
2022-03-03 00:51:24 +00:00
#RUN chmod 666 /var/run/docker.sock
2022-03-07 12:11:24 +00:00
2022-03-03 01:54:04 +00:00
#RUN /usr/local/bin/code-server --install-extension vscode-basex-0.0.21.vsix
2022-03-03 01:21:16 +00:00
2022-02-08 18:15:32 +00:00
# ports and volumes
EXPOSE 8443