Giter VIP home page Giter VIP logo

Comments (5)

Alex-Banna avatar Alex-Banna commented on July 4, 2024

Full build log attached
quarkus-native-image-build-imagebuilder.log

from imagebuilder.

Alex-Banna avatar Alex-Banna commented on July 4, 2024

Looks like the issue is with the line:

COPY --from=build /usr/src/app/target/*-runner /work/application

It puts *-runner into a directory called application, rather than moving *-runner to the file application. We need support for both Docker and imagebuilder so had to implement the following workaround:

Create a script to move the item in the directory to the directory location (if it's a directory):

#!/bin/bash

# This file is required due to differences between how openshift imagebuilder treats docker multistage files, and how native docker acts
# Consider the following line:
# COPY --from=build /usr/src/app/target/*-runner /work/application
#
# Native docker will create a single executable called "application" in the work directory
# Imagebuilder will take the approach of creating an application directory underneath work, and putting *-runner into that directory
# 
# We need both approaches to work, so we need to work out if "application" is a directory, if it is then we need to take the first
# (and hopefully only) file in there and call it "application"

if [ -d /work/application ]; then
  mv /work/application /work/applicationdir
  mv /work/applicationdir/*-runner /work/application
fi

Then run it in the dockerfile:

COPY deploy/scripts/move.sh /work
RUN chmod 775 /work/move.sh
RUN /work/move.sh

from imagebuilder.

openshift-bot avatar openshift-bot commented on July 4, 2024

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

from imagebuilder.

openshift-bot avatar openshift-bot commented on July 4, 2024

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

from imagebuilder.

nalind avatar nalind commented on July 4, 2024

/lifecycle frozen

from imagebuilder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.