Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on gha due to missing layer #21

Open
LeadingMoominExpert opened this issue Apr 28, 2022 · 0 comments
Open

Build fails on gha due to missing layer #21

LeadingMoominExpert opened this issue Apr 28, 2022 · 0 comments

Comments

@LeadingMoominExpert
Copy link

LeadingMoominExpert commented Apr 28, 2022

Building a spring-boot + gradle application using the action version 1.3.3 fails, but the build succeeds using docker push action.

Dockerfile: https://github.com/three-consulting/epoc-backend/blob/60f980ce2d257970e8f0fba9d9d816ac5115e9a4/Dockerfile
Working build using a different action: https://github.com/three-consulting/epoc-backend/blob/60f980ce2d257970e8f0fba9d9d816ac5115e9a4/.github/workflows/pull-request.yaml#L37-L45
Failing build using heroku-docker-deploy: https://github.com/three-consulting/epoc-backend/blob/60f980ce2d257970e8f0fba9d9d816ac5115e9a4/.github/workflows/main.yaml#L32-L41
I also tried the heroku build without the --no-cache flag, which also fails.

Github actions logs on failure:

Run gonuit/[email protected]
  with:
    email: ***
    heroku_api_key: ***
    heroku_app_name: ***
    dockerfile_directory: ./
    dockerfile_name: Dockerfile
    docker_options: --no-cache
    process_type: web
  env:
    JAVA_HOME: /opt/hostedtoolcache/Java_Adopt_jdk/17.0.2-8/x64
Logging into the Heroku docker registry...
  Login Succeeded
  
Building docker container...
  Sending build context to Docker daemon  5.071MB
  
  Step 1/15 : FROM gradle:jdk17 as builder
  jdk17: Pulling from library/gradle
  8e5c1b329fe3: Pulling fs layer
  6eba7eb4b070: Pulling fs layer
  7f5190524da8: Pulling fs layer
  4b95bc0fbc88: Pulling fs layer
  001c63a4ae36: Pulling fs layer
  311a12340251: Pulling fs layer
  ad71688bca0d: Pulling fs layer
  001c63a4ae36: Waiting
  311a12340251: Waiting
  ad71688bca0d: Waiting
  4b95bc0fbc88: Waiting
  6eba7eb4b070: Verifying Checksum
  6eba7eb4b070: Download complete
  8e5c1b329fe3: Verifying Checksum
  8e5c1b329fe3: Download complete
  4b95bc0fbc88: Verifying Checksum
  4b95bc0fbc88: Download complete
  001c63a4ae36: Verifying Checksum
  001c63a4ae36: Download complete
  311a12340251: Verifying Checksum
  311a12340251: Download complete
  ad71688bca0d: Verifying Checksum
  ad71688bca0d: Download complete
  7f5190524da8: Verifying Checksum
  7f5190524da8: Download complete
  8e5c1b329fe3: Pull complete
  6eba7eb4b070: Pull complete
  7f5190524da8: Pull complete
  4b95bc0fbc88: Pull complete
  001c63a4ae36: Pull complete
  311a12340251: Pull complete
  ad71688bca0d: Pull complete
  Digest: sha256:5e94c8494940ef924a6f389f2f2f24b1841977f66aae01fa308156f03eb99f57
  Status: Downloaded newer image for gradle:jdk17
   ---> 9e7038d609f1
  Step 2/15 : WORKDIR /builder
   ---> Running in 6dc57dbd183c
  Removing intermediate container 6dc57dbd183c
   ---> 0af3555fe184
  Step 3/15 : COPY . .
   ---> 9db07687d857
  Step 4/15 : RUN gradle clean bootJar
   ---> Running in 89a873bb6d18
  
  Welcome to Gradle 7.4.2!
  
  Here are the highlights of this release:
   - Aggregated test and JaCoCo reports
   - Marking additional test source directories as tests in IntelliJ
   - Support for Adoptium JDKs in Java toolchains
  
  For more details see https://docs.gradle.org/7.4.2/release-notes.html
  
  Starting a Gradle Daemon (subsequent builds will be faster)
  > Task :clean
  > Task :processResources
  > Task :loadKtlintReporters
  > Task :runKtlintCheckOverKotlinScripts
  > Task :ktlintKotlinScriptCheck
  > Task :runKtlintCheckOverMainSourceSet
  > Task :ktlintMainSourceSetCheck
  > Task :runKtlintCheckOverTestSourceSet
  > Task :ktlintTestSourceSetCheck
  > Task :ktlintCheck
  > Task :compileKotlin
  > Task :compileJava NO-SOURCE
  > Task :classes
  > Task :bootJarMainClassName
  > Task :bootJar
  
  BUILD SUCCESSFUL in 1m 26s
  12 actionable tasks: 12 executed
  Removing intermediate container 89a873bb6d18
   ---> bf779a34f39c
  Step 5/15 : RUN java -Djarmode=layertools -jar build/libs/epoc.jar extract --destination layers
   ---> Running in 4289a2b4394a
  Removing intermediate container 4289a2b4394a
   ---> 01925369a118
  Step 6/15 : FROM azul/zulu-openjdk-alpine:17-jre
  17-jre: Pulling from azul/zulu-openjdk-alpine
  df9b9388f04a: Already exists
  1a2da678c736: Pulling fs layer
  1a2da678c736: Verifying Checksum
  1a2da678c736: Download complete
  1a2da678c736: Pull complete
  Digest: sha256:86d43e40a17f5a4d1fe7b8559968f56540bd8b03da46ea91450f035781fddfe2
  Status: Downloaded newer image for azul/zulu-openjdk-alpine:17-jre
   ---> b60b8273e2f0
  Step 7/15 : RUN adduser -u 1999 -D user
   ---> Running in 5f230d1cf5ec
  Removing intermediate container 5f230d1cf5ec
   ---> b6fb9dd0acc7
  Step 8/15 : WORKDIR /app
   ---> Running in 9f6add921f8a
  Removing intermediate container 9f6add921f8a
   ---> 8504e5b4be88
  Step 9/15 : COPY --from=builder /builder/layers/dependencies ./
   ---> df6d26cc28be
  Step 10/15 : COPY --from=builder /builder/layers/spring-boot-loader ./
   ---> 5a930035468e
  Step 11/15 : COPY --from=builder /builder/layers/snapshot-dependencies ./
   ---> 279aed585a67
  Step 12/15 : COPY --from=builder /builder/layers/application ./
  failed to export image: failed to create image: failed to get layer sha256:dcfbbfa372e9066a774d698fa26da47808d940a8f3cf2507e4ea1b925a855c39: layer does not exist
Error: Building container failed.
Error: undefined

edit: updated links

@LeadingMoominExpert LeadingMoominExpert changed the title Build fails on on gha due to missing layer Build fails on gha due to missing layer Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant