Collection of custom Docker images for personal project CIs
FROM docker.io/debian:buster-20210111-slim

RUN apt-get update && apt-get install -y \
  # Install wget for fetch bins to install
  wget \
  # And dependencies for native-images
  build-essential libz-dev zlib1g-dev

# Install Graal and native-images
RUN wget -O /tmp/graalvm-ce.tgz https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.0.0/graalvm-ce-java11-linux-amd64-21.0.0.tar.gz \
  && mkdir -p /opt/graalvm-ce \
  && tar -xz -C /opt/graalvm-ce -f /tmp/graalvm-ce.tgz --strip-components=1 \
  && rm /tmp/graalvm-ce.tgz \
  && /opt/graalvm-ce/bin/gu install native-image

ENV PATH /opt/graalvm-ce/bin:$PATH
ENV JAVA_HOME /opt/graalvm-ce

# Add leiningen for clojure builds
RUN wget -O /usr/local/bin/lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein \
  && chmod +x /usr/local/bin/lein \
  # Run once for self-install
  && lein