RESTfulMC/API/Dockerfile

22 lines
411 B
Docker
Raw Permalink Normal View History

2024-04-06 21:34:24 -07:00
FROM maven:3.8.5-openjdk-17-slim
2024-04-06 21:27:09 -07:00
2024-04-06 21:42:54 -07:00
# Set the working directory
WORKDIR /home/container
2024-04-06 21:27:09 -07:00
# Copy project files
COPY . .
# Build the app
2024-04-14 09:16:09 -07:00
RUN mvn clean package -q -DskipTests -T4C
2024-04-06 21:27:09 -07:00
# Exposting on port 80 so we can
# access via a reverse proxy for Dokku
ENV HOSTNAME "0.0.0.0"
EXPOSE 80
ENV PORT 80
2024-04-11 02:32:31 -07:00
# We're running in production
ENV APP_ENV "production"
2024-04-06 21:27:09 -07:00
# Start the app
2024-04-06 21:55:21 -07:00
CMD ["java", "-jar", "target/RESTfulMC.jar"]