testdeep123 commited on
Commit
3200146
·
verified ·
1 Parent(s): 54ce350

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -8
Dockerfile CHANGED
@@ -1,18 +1,29 @@
1
  FROM debian:stable
2
 
3
- USER root
4
-
5
  ENV DEBIAN_FRONTEND=noninteractive
6
 
7
- COPY . /app
8
-
9
- RUN chmod -R 777 /app
 
10
 
11
- WORKDIR /app
 
 
12
 
 
13
  RUN apt-get update && \
14
- apt-get install -y openjdk-21-jdk && \
15
- apt-get clean && \
16
  rm -rf /var/lib/apt/lists/*
17
 
 
 
 
 
 
 
 
 
 
 
18
  CMD ["sh", "start.sh"]
 
1
  FROM debian:stable
2
 
 
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
+ # Install dependencies
6
+ RUN apt-get update && \
7
+ apt-get install -y wget gnupg && \
8
+ rm -rf /var/lib/apt/lists/*
9
 
10
+ # Add Amazon Corretto GPG key and repository
11
+ RUN wget -O- https://apt.corretto.aws/corretto.key | gpg --dearmor > /usr/share/keyrings/corretto-archive-keyring.gpg && \
12
+ echo "deb [signed-by=/usr/share/keyrings/corretto-archive-keyring.gpg] https://apt.corretto.aws stable main" > /etc/apt/sources.list.d/corretto.list
13
 
14
+ # Install OpenJDK 21
15
  RUN apt-get update && \
16
+ apt-get install -y java-21-amazon-corretto-jdk && \
 
17
  rm -rf /var/lib/apt/lists/*
18
 
19
+ # Set working directory
20
+ WORKDIR /app
21
+
22
+ # Copy application files
23
+ COPY . /app
24
+
25
+ # Set permissions
26
+ RUN chmod -R 777 /app
27
+
28
+ # Set default command
29
  CMD ["sh", "start.sh"]