px32-bot/Dockerfile

18 lines
333 B
Docker
Raw Normal View History

2024-09-02 17:50:54 +09:00
FROM amazoncorretto:21-alpine3.20
2024-09-02 00:35:16 +09:00
2024-09-02 17:50:54 +09:00
ARG BOT_TOKEN
ENV BOT_TOKEN=${BOT_TOKEN}
2024-09-02 00:35:16 +09:00
2024-09-02 17:50:54 +09:00
WORKDIR /opt/bot/build
2024-09-02 00:35:16 +09:00
COPY . .
2024-09-02 17:50:54 +09:00
RUN chmod a+x ./gradlew
2024-09-02 00:35:16 +09:00
RUN ./gradlew shadowJar
RUN cp ./build/libs/px32-bot.jar ../
2024-09-02 17:50:54 +09:00
WORKDIR /opt/bot
RUN rm -rf ./build
RUN export BOT_TOKEN=${BOT_TOKEN}
ENTRYPOINT ["java", "-Xmx4096M", "-jar", "/opt/bot/px32-bot.jar"]