mirror of
https://github.com/YuWanTingbb/unofficial-gpt4.git
synced 2025-10-16 07:03:17 +00:00
Update Dockerfile
This commit is contained in:
@@ -4,14 +4,16 @@ FROM container-registry.oracle.com/graalvm/native-image:21-ol8 AS builder
|
|||||||
# Set the working directory to /home/app
|
# Set the working directory to /home/app
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
# Copy the source code into the image for building
|
# Copy the pom.xml file and download dependencies
|
||||||
COPY . /build
|
COPY pom.xml .
|
||||||
|
RUN ./mvnw dependency:go-offline
|
||||||
|
|
||||||
# Add execute permission to mvnw script
|
# Copy the rest of the source code
|
||||||
RUN chmod +x mvnw
|
COPY . .
|
||||||
|
|
||||||
# Build
|
# Add execute permission to mvnw script and build
|
||||||
RUN ./mvnw --no-transfer-progress native:compile -Pnative
|
RUN chmod +x mvnw && \
|
||||||
|
./mvnw --no-transfer-progress native:compile -Pnative
|
||||||
|
|
||||||
# The deployment Image
|
# The deployment Image
|
||||||
FROM container-registry.oracle.com/os/oraclelinux:8-slim
|
FROM container-registry.oracle.com/os/oraclelinux:8-slim
|
||||||
|
Reference in New Issue
Block a user