Backend/Dockerfile

23 lines
681 B
Docker
Raw Normal View History

2024-04-20 19:34:00 +00:00
FROM maven:3.9.6-sapmachine-17
2024-04-20 19:31:02 +00:00
2024-04-20 19:43:45 +00:00
RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
2024-04-20 19:41:24 +00:00
RUN apt update -y && apt install ttf-mscorefonts-installer -y && fc-cache -f
2024-04-20 19:38:05 +00:00
2024-04-08 04:03:41 +00:00
# Set the working directory
2024-04-08 06:30:02 +00:00
WORKDIR /home/container
2024-04-08 04:03:41 +00:00
# Copy the current directory contents into the container at /home/container
2024-04-06 05:07:01 +00:00
COPY . .
2024-04-08 04:03:41 +00:00
# Build the jar
2024-04-14 16:13:12 +00:00
RUN mvn package -q -Dmaven.test.skip -DskipTests -T2C
2024-04-06 04:55:48 +00:00
2024-04-08 04:03:41 +00:00
# Make port 80 available to the world outside this container
2024-04-06 05:21:30 +00:00
EXPOSE 80
ENV PORT=80
2024-04-06 05:06:19 +00:00
2024-04-11 02:08:17 +00:00
# Indicate that we're running in production
ENV ENVIRONMENT=production
2024-04-08 04:03:41 +00:00
# Run the jar file
2024-04-20 19:26:31 +00:00
CMD java -jar target/Minecraft-Utilities.jar -Djava.awt.headless=true