File tree Expand file tree Collapse file tree 4 files changed +37
-18
lines changed Expand file tree Collapse file tree 4 files changed +37
-18
lines changed Original file line number Diff line number Diff line change 1+ FROM nginx:latest
2+ COPY index.html /usr/share/nginx/html/index.html
Original file line number Diff line number Diff line change 1+ < html >
2+ < head >
3+ < title > Docker Demo</ title >
4+ < style >
5+ body {
6+ font-family : Arial, sans-serif;
7+ display : flex;
8+ justify-content : center;
9+ align-items : center;
10+ height : 100vh ;
11+ margin : 0 ;
12+ background-color : # f0f0f0 ;
13+ }
14+ .container {
15+ text-align : center;
16+ padding : 20px ;
17+ background-color : white;
18+ border-radius : 8px ;
19+ box-shadow : 0 2px 4px rgba (0 , 0 , 0 , 0.1 );
20+ }
21+ h1 { color : # 333 ; }
22+ .docker-text { color : # 0db7ed ; }
23+ </ style >
24+ </ head >
25+ < body >
26+ < div class ="container ">
27+ < h1 > Hello from < span class ="docker-text "> Docker</ span > !</ h1 >
28+ < p > If you can see this, your nginx container is working.</ p >
29+ </ div >
30+ </ body >
Original file line number Diff line number Diff line change 1- # Use the official Node.js LTS image
21FROM node:16
3-
4- # Set the working directory inside the container
52WORKDIR /app
6-
7- # Copy package.json and package-lock.json
83COPY package*.json ./
9-
10- # Install Node.js dependencies
114RUN npm install
12-
13- # Copy the rest of the application code
145COPY . .
15-
16- # Expose the port that your app runs on
176EXPOSE 7002
18-
19- # Start the Node.js application
20- CMD ["npm" , "run" , "serve" ]
7+ CMD ["npm" ,"run" ,"serve" ]
Original file line number Diff line number Diff line change 1- # Use OpenJDK 17 slim as the base image
2- FROM openjdk:17 -slim
1+ # Use OpenJDK 23 slim as the base image
2+ FROM openjdk:23 -slim
33
44# Install dependencies
55RUN apt-get update && \
@@ -18,9 +18,9 @@ ENV PATH "$MAVEN_HOME/bin:$PATH"
1818# Verify Maven installation
1919RUN mvn -version
2020
21- # Install curl and update CA certificates
21+ # Update CA certificates
2222RUN apt-get update && \
23- apt-get install -y --no-install-recommends curl ca-certificates && \
23+ apt-get install -y --no-install-recommends ca-certificates && \
2424 rm -rf /var/lib/apt/lists/*
2525
2626# Install Node.js and npm
You can’t perform that action at this time.
0 commit comments