Spaces:
Running
Running
Upload 2 files
Browse files- Dockerfile +24 -0
- entrypoint.sh +4 -0
Dockerfile
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM openjdk:18
|
| 2 |
+
|
| 3 |
+
# Set working directory
|
| 4 |
+
WORKDIR /ai
|
| 5 |
+
|
| 6 |
+
# Define the version as a build argument
|
| 7 |
+
ARG VERSION=0.2.3
|
| 8 |
+
ARG REPO=a2aPlaywright
|
| 9 |
+
ARG REPO_OWNER=vishalmysore
|
| 10 |
+
|
| 11 |
+
# Download the JAR file using curl with the version variable
|
| 12 |
+
RUN curl -L -o /ai/mcpdemo.jar https://github.com/${REPO_OWNER}/${REPO}/releases/download/release/${REPO}-${VERSION}.jar
|
| 13 |
+
|
| 14 |
+
# Expose the port
|
| 15 |
+
EXPOSE 7860
|
| 16 |
+
|
| 17 |
+
# Copy the entrypoint script to the container
|
| 18 |
+
COPY entrypoint.sh /entrypoint.sh
|
| 19 |
+
|
| 20 |
+
# Make the script executable
|
| 21 |
+
RUN chmod +x /entrypoint.sh
|
| 22 |
+
|
| 23 |
+
# Set the entrypoint
|
| 24 |
+
ENTRYPOINT ["/entrypoint.sh"]
|
entrypoint.sh
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
ls -l /ai/conf
|
| 3 |
+
# Start the Java application
|
| 4 |
+
exec java -Dloader.path=/ai/conf -Djava.security.egd=file:/dev/./urandom -jar /ai/mcpdemo.jar
|