Code Monkey home page Code Monkey logo

Comments (7)

mechtaev avatar mechtaev commented on May 8, 2024

If there was a way to pass the query though docker build, for example, using the --target option, or even print proof tree via some options, this would be the ideal approach.

from modus.

maowtm avatar maowtm commented on May 8, 2024

There doesn't seems to be a way to extend the command line syntax to enable something like docker build -f Modusfile . query. However there seems to be a way to specify build arguments which may be applied as environment variables when running the front-end. I will do some trial on this and see if it works well enough.

from modus.

maowtm avatar maowtm commented on May 8, 2024

Missed your --target suggestion - I will also investigate what that does in the context of buildkit builds

from modus.

maowtm avatar maowtm commented on May 8, 2024

For some reason I keep getting this, even if I just sleep indefinitely in main:

(#syntax=europe-docker.pkg.dev/maowtm/modus-test/frontend)

Dockerfile for modus-test/frontend:

FROM rust AS build
WORKDIR /usr/src/app
COPY ./src ./src
COPY ./Cargo.lock .
COPY ./Cargo.toml .
RUN cargo build --release

FROM debian
COPY --from=build /usr/src/app/target/release/bktest /
CMD ["/bktest"]

Unless I can figure out how to make my own buildkit frontend, I will implement our image building by statically generating llb and just asking user to run buildctl for now...

I figured it out - just change the CMD to ENTRYPOINT... For some reason CMD doesn't work lol

from modus.

maowtm avatar maowtm commented on May 8, 2024

Made a very simple buildkit frontend with the buildkit_frontend and buildkit_llb crate: https://github.com/maowtm/buildkit-frontend-test . (Can't create repo in modus org)

Just confirmed that fortunately we can get the --target value, as well as any build arguments provided in the command line. Outputing error messages might be tricky though - it is re-echo'd by the buildkit gateway, and we may lose colors and might not even be able to print multiple lines...

@mechtaev

(Remember that I set DOCKER_BUILDKIT=1 in my shell, otherwise things won't work. These images are actually there on Google Cloud so feel free to try.)

from modus.

maowtm avatar maowtm commented on May 8, 2024

Also worth noting - the crates are almost two years old with no update to tokio 1.0 and uses other deprecated stuff.

from modus.

mechtaev avatar mechtaev commented on May 8, 2024

we can get the --target value, as well as any build arguments provided in the command line

This is great. If we can also somehow print the proof, this will be the perfect option for the initial release. I am wondering if something like --progress plain will work for printing multiple lines.

Also worth noting - the crates are almost two years old with no update to tokio 1.0 and uses other deprecated stuff.

Yes, and it seems to be a rather complicated to fork and maintain by ourselves.

from modus.

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.