generated from brandonfl/discord-java-docker-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (23 loc) · 1.06 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM maven:3.9.3-eclipse-temurin-17-alpine@sha256:1cbc71cb8e2f594338f4b4cbca897b9f9ed6183e361489f1f7db770d57efe839 AS build
COPY . /tmp/project
RUN mvn -f /tmp/project/pom.xml clean package -DskipTests
FROM ibm-semeru-runtimes:open-17-jre-jammy
LABEL maintainer="Brandon Fontany--Legall <[email protected]>"
LABEL description="Discord Role Persistence is a verified Discord bot with the objective to save the roles of users even after a leave/join server"
LABEL website="https://discord-role-persistence.com"
LABEL github="https://github.com/brandonfl/discord-role-persistence"
RUN apt update && apt upgrade -y
RUN apt install -y dumb-init bash && apt-get clean
RUN apt auto-remove -y
WORKDIR /app
COPY --from=build /tmp/project/target/bot.war /app
COPY docker/utils/wait-for-it.sh /app
COPY docker-custom-entrypoint.sh /app
RUN groupadd -g 10001 drp && \
useradd -u 10000 -g drp drp \
&& chown -R drp:drp /app
USER drp:drp
RUN chmod +x /app/wait-for-it.sh
RUN chmod +x /app/docker-custom-entrypoint.sh
EXPOSE 8080
ENTRYPOINT ["/app/docker-custom-entrypoint.sh"]