FROM alpine:3.22

RUN apk update && apk add --no-cache \
    curl \
    bash \
    openjdk21-jdk \
    maven \
    git \
    ca-certificates \
    pnpm

# git trust all directories
RUN git config --global --add safe.directory '*'

# Install quarkus
ENV JBANG_DIR="/root/.jbang"
ENV PATH="${JBANG_DIR}/bin:${PATH}"

RUN curl -Ls https://sh.jbang.dev | bash -s - trust add https://repo1.maven.org/maven2/io/quarkus/quarkus-cli/
RUN curl -Ls https://sh.jbang.dev | bash -s - app install --fresh --force quarkus@quarkusio
