-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 81171d9
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Use an Alpine-based image with OpenJDK | ||
FROM alpine:3.20 | ||
|
||
# Set the maintainer | ||
LABEL maintainer="[email protected]" | ||
|
||
# Install dependencies: bash, curl, and git (git is required for SBT) | ||
RUN apk update && apk upgrade && \ | ||
apk add --no-cache bash curl git openjdk21 && \ | ||
# Download and install SBT | ||
curl -L -o sbt.zip https://github.com/sbt/sbt/releases/download/v1.10.2/sbt-1.10.2.zip && \ | ||
unzip sbt.zip && rm sbt.zip && \ | ||
chmod +x sbt/bin/sbt && \ | ||
mv sbt /usr/local/sbt && \ | ||
ln -s /usr/local/sbt/bin/sbt /usr/local/bin/sbt | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy the project files | ||
COPY . /app | ||
|
||
# Run sbt to download dependencies and compile the project | ||
RUN sbt update && sbt compile | ||
|
||
# Set the entry point to run the application | ||
CMD ["/bin/sh"] |