Skip to content

Commit a66131f

Browse files
committed
Moved the offline image to make it work for packaged installs
1 parent 7ccf71f commit a66131f

2 files changed

Lines changed: 2 additions & 30 deletions

File tree

VideoServer/Dockerfile

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,23 @@
1-
# Stage 1: Build the application using Eclipse Temurin JDK 22
21
FROM eclipse-temurin:22-jdk AS build
32

4-
# Set working directory inside the build container
53
WORKDIR /app
64

7-
# Copy Gradle wrapper scripts and related files for build setup
8-
COPY gradlew /app/gradlew
9-
COPY gradlew.bat /app/gradlew.bat
10-
COPY gradle/wrapper/gradle-wrapper.jar /app/gradle/wrapper/gradle-wrapper.jar
11-
COPY gradle/wrapper/gradle-wrapper.properties /app/gradle/wrapper/gradle-wrapper.properties
5+
COPY gradlew gradlew.bat settings.gradle build.gradle /app/
6+
COPY gradle /app/gradle
127

13-
# Copy Gradle build files (build.gradle, settings.gradle)
14-
COPY build.gradle settings.gradle /app/
15-
16-
# Copy application source code to container
178
COPY src /app/src
189

19-
# Ensure Gradle wrapper has execute permission
2010
RUN chmod +x gradlew
21-
22-
# Execute Gradle build to clean and create a shadow (fat) JAR
2311
RUN ./gradlew clean shadowJar
2412

25-
# Stage 2: Prepare runtime image
2613
FROM eclipse-temurin:22-jdk
2714

28-
# Set working directory inside the runtime container
2915
WORKDIR /app
3016

31-
# Copy the built shadow JAR from the build stage
3217
COPY --from=build /app/build/libs/VideoServer-1.0-SNAPSHOT.jar /app/VideoServer.jar
3318

34-
# Copy static asset required by the application
35-
COPY device_offline.jpg /app/device_offline.jpg
36-
37-
# Define container start command to run the JAR
3819
ENTRYPOINT ["java", "-jar", "/app/VideoServer.jar"]
3920

40-
# Expose ports used by the application services
41-
# 1234: WebSocket Server
42-
# 4444: MJPEG Streaming Server
43-
# 4321: Camera Server
4421
EXPOSE 1234
4522
EXPOSE 4444
4623
EXPOSE 4321
47-
48-
# Docker usage instructions:
49-
# Build image: sudo docker build -t videoserver:latest .
50-
# Run container detached with port mappings:
51-
# sudo docker run -d -p 1234:1234 -p 4444:4444 -p 4321:4321 videoserver
File renamed without changes.

0 commit comments

Comments
 (0)