45 lines
1.1 KiB
Docker
45 lines
1.1 KiB
Docker
#
|
|
# add openjdk 11 and basex on code-server docker image
|
|
# @author Andy Bunce
|
|
FROM alpine:latest AS builder
|
|
RUN apk --no-cache add zip
|
|
ADD https://files.basex.org/releases/9.6.4/BaseX964.zip /srv
|
|
RUN cd /srv && unzip *.zip && rm *.zip
|
|
|
|
# custom options
|
|
#COPY .basex /srv/basex/
|
|
|
|
# Main image
|
|
FROM ghcr.io/linuxserver/code-server:4.0.1
|
|
LABEL author="Andy Bunce"
|
|
LABEL company="Quodatum Ltd"
|
|
LABEL maintainer="andy@quodatum.com"
|
|
|
|
# Install "software-properties-common" (for the "add-apt-repository")
|
|
RUN apt-get update && apt-get install -y \
|
|
software-properties-common
|
|
|
|
# Add the "JAVA" ppa
|
|
RUN add-apt-repository -y \
|
|
ppa:webupd8team/java
|
|
|
|
# Install OpenJDK-8
|
|
RUN apt-get update && \
|
|
apt-get install -y openjdk-8-jdk && \
|
|
apt-get install -y ant && \
|
|
apt-get clean;
|
|
|
|
# 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
|
|
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
|
|
RUN export JAVA_HOME
|
|
|
|
|
|
RUN adduser -h /srv -D -u 1000 basex
|
|
COPY --from=builder --chown=basex:basex /srv/ /srv
|
|
|