FROM public.ecr.aws/docker/library/eclipse-temurin:20.0.2_9-jdk AS builder
WORKDIR /app
COPY . /app
RUN ./gradlew shadowJar

FROM public.ecr.aws/docker/library/eclipse-temurin:20.0.2_9-jre AS runner
LABEL authors="skydust"
WORKDIR /app

RUN apt update && apt install -y zabbix-sender && rm -rf /var/lib/apt/lists/*

COPY --from=builder /app/build/libs/JdrBot.jar /app/JdrBot.jar
COPY start.sh /app

CMD ["/bin/bash","./start.sh"]