Pihentagy
03/17/2023, 2:15 PMdocker run --user $(id -u) --volume "$PWD":/home/gradle/project --workdir /home/gradle/project gradle:7-jdk17 gradle --no-daemon --no-rebuild --no-scan --no-watch-fs --no-parallel bootRun
(to which channel does this question fit?)thanksforallthefish
03/17/2023, 2:31 PMbootJar
does packaging, you probably want bootRun
insteadPihentagy
03/17/2023, 2:34 PMthanksforallthefish
03/17/2023, 2:35 PM./gradlew bootBuildImage --imageName=myorg/myapp
and then run it with docker run -p 8080:8080 -t myorg/myapp
ashmelev
03/17/2023, 2:46 PMashmelev
03/17/2023, 2:46 PMashmelev
03/17/2023, 2:47 PMashmelev
03/17/2023, 2:48 PMashmelev
03/17/2023, 2:50 PM./gradlew jubDockerBuild
and then just start the container - your SpringBoot app launches automatically and normally - no commands needed. MagicPihentagy
03/17/2023, 2:51 PMashmelev
03/17/2023, 2:54 PMashmelev
03/17/2023, 2:56 PMbootBuildImage
task requires access to a Docker daemon". Job does not require that - hence a CI/CD is simpler to set upashmelev
03/17/2023, 2:59 PMPihentagy
03/17/2023, 3:00 PMPihentagy
03/17/2023, 3:14 PMashmelev
03/17/2023, 3:14 PMPihentagy
03/17/2023, 3:16 PMashmelev
03/17/2023, 3:28 PM