hprasath commited on
Commit
23c86b4
·
verified ·
1 Parent(s): a058970

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -2
Dockerfile CHANGED
@@ -1,6 +1,7 @@
1
  # Use a specific version of the node image as a base
2
  FROM node:16-alpine
3
 
 
4
  RUN apk add --no-cache openjdk11 python3 py3-pip g++
5
 
6
  # Set working directory
@@ -23,6 +24,7 @@ EXPOSE 7860
23
  # Set user to non-root
24
  USER node
25
 
26
- # Start Node.js application
27
- CMD ["node", "index.js"]
 
28
 
 
1
  # Use a specific version of the node image as a base
2
  FROM node:16-alpine
3
 
4
+ # Install necessary dependencies including JDK, Python, pip, and g++
5
  RUN apk add --no-cache openjdk11 python3 py3-pip g++
6
 
7
  # Set working directory
 
24
  # Set user to non-root
25
  USER node
26
 
27
+ # Compile and run Java code
28
+ CMD ["sh", "-c", "javac -d /code/temp /code/temp/*.java && java -cp /code/temp Main"]
29
+
30