# Use the official OpenJDK base image FROM openjdk:11 # Install sbt RUN echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | tee /etc/apt/sources.list.d/sbt.list RUN echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee /etc/apt/sources.list.d/sbt_old.list RUN curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add RUN apt-get update RUN apt-get install sbt # Set the working directory in the container WORKDIR /app # Copy the project files into the container COPY . /app # Run sbt clean and compile RUN sbt clean compile # Expose the port the app runs on EXPOSE 9000 # Command to run the application CMD ["sbt", "run"]