hey , Im new to `docker` and i want to add my `Doc...
# ktor
h
hey , Im new to
docker
and i want to add my
Dockerfile
to my
Ktor
project but i dont know how to do it im also using
mongodb and Onesignal for Notification
and i added the api keys to config file and that to gitignore , can anyone help me with that how can i setup dockerfile , i tried blackboxAi and this is code
Copy code
# Stage 1: Build
FROM gradle:7.5.1-jdk11 AS build

WORKDIR /app

COPY --chown=gradle:gradle . .

RUN gradle build

# Stage 2: Run
FROM adoptopenjdk:11-jre-hotspot

WORKDIR /app

COPY --from=build /app/build/libs/ktor-mongodb-server.jar /app/ktor-mongodb-server.jar

COPY --from=build /app/application.conf /app/application.conf

EXPOSE 8080

CMD ["java", "-jar", "ktor-mongodb-server.jar"]
but it showing error
failed to solve: process "/bin/sh -c gradle build" did not complete successfully: exit code:
a
You need to find out why the Gradle build failed in order to solve the problem.