[FOLIO-2911] Docker image is not created by Jenkins build due to file copying issue Created: 11/Dec/20 Updated: 04/Jan/21 Resolved: 11/Dec/20 |
|
| Status: | Closed |
| Project: | FOLIO |
| Components: | Continuous Integration |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Task | Priority: | P2 |
| Reporter: | Dima Tkachenko | Assignee: | John Malconian |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||||||
| Sprint: | DevOps: Sprint 103 | ||||||||||||
| Development Team: | FOLIO DevOps | ||||||||||||
| Description |
|
There is an issue with docker image creation in mod-password-validator/job/mpv-with-spring/ For some reason a file that resides next to Dockerfile in the source folder cannot be copied (see an excerpt from the log below). The same works w/o any problems if the image is built inside vagrant box. Not sure if the issue is with Dockerfile itself or docker image build step in Jenkins. + docker build --pull=true --no-cache=true -t mod-password-validator:1.9.0-SNAPSHOT.10 .
Sending build context to Docker daemon 84.28MB
Step 1/9 : FROM folioci/alpine-jre-openjdk11:latest
latest: Pulling from folioci/alpine-jre-openjdk11
Digest: sha256:752a2e458a7f4bbdef4157e5c7d658bdc6b42ae1dc471032d9b2068a78c80c87
Status: Image is up to date for folioci/alpine-jre-openjdk11:latest
---> 92854f01d29e
Step 2/9 : USER root
---> Running in 147bb0233601
Removing intermediate container 147bb0233601
---> 6025bb853e75
Step 3/9 : ENV APP_FILE mod-password-validator-fat.jar
---> Running in 5ebbee054e3b
Removing intermediate container 5ebbee054e3b
---> 8d4cdc97e6f6
Step 4/9 : ARG JAR_FILE=./target/*.jar
---> Running in 4219bd72a636
Removing intermediate container 4219bd72a636
---> 45b63a6c2d27
Step 5/9 : COPY ${JAR_FILE} ${JAVA_APP_DIR}/${APP_FILE}
---> f68a3027a0d5
Step 6/9 : ARG RUN_ENV_FILE=run-env.sh
---> Running in cc2c501ef25d
Removing intermediate container cc2c501ef25d
---> 6e2ebe8b695b
Step 7/9 : COPY ${RUN_ENV_FILE} ${JAVA_APP_DIR}/
COPY failed: stat /var/lib/docker/tmp/docker-builder557747113/run-env.sh: no such file or directory
[Pipeline] }
|
| Comments |
| Comment by John Malconian [ 11/Dec/20 ] |
|
the 'buildJavaDocker' jenkins pipeline is very opinionated. Updated the branch to try the more generic 'buildDocker' pipeline instead. |
| Comment by John Malconian [ 11/Dec/20 ] |
|
'buildDocker' works. However, the Docker health check fails. Perhaps '/apidocs' is not a valid endpoint on this Spring branch? Disabled health check by setting 'healthChk' to 'no' in Jenkinsfile until a valid health check command can be determined. |
| Comment by John Malconian [ 11/Dec/20 ] |
|
Side note: We should come up with and use a standard Dockerfile config or base image for all Spring-based modules across folio-org like we do for Vert.x modules so that there is some consistency in the Docker images produced by the project. |