Tech
01/31/2023, 6:04 PMWhen using COPY with more than one source file, the destination must be a directory and end with a /
however if I add a /
to the end of the copy statement it stops building locally.
Here's the Dockerfile
FROM gradle as build
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
RUN gradle buildFatJar --no-daemon
FROM openjdk:17
EXPOSE 8080:8080
RUN mkdir /app
COPY --from=build /home/gradle/src/build/libs/*.jar /app/ktor-app.jar
ENTRYPOINT ["java", "-jar", "/app/ktor-app.jar"]
Trevor Stone
01/31/2023, 6:25 PMjib
https://github.com/GoogleContainerTools/jib to build your container instead of using a Dockerfile. This adds gradle tasks to build and run the containerCLOVIS
01/31/2023, 7:33 PM./gradlew assembleDist
before building itTech
01/31/2023, 7:34 PMCLOVIS
01/31/2023, 7:34 PMTech
01/31/2023, 7:35 PMCLOVIS
01/31/2023, 7:35 PMTech
01/31/2023, 7:36 PMTrevor Stone
01/31/2023, 8:03 PMCOPY --from=build /home/gradle/src/build/libs/*.jar /app/ktor-app.jar
This seems like it could be the problem due to that wildcardTech
01/31/2023, 11:14 PMTrevor Stone
01/31/2023, 11:28 PMTech
01/31/2023, 11:30 PM