Giter Site home page Giter Site logo

Comments (3)

bunchesofdonald avatar bunchesofdonald commented on June 16, 2024

These are the steps I'm using to do the build:

RUN apt-get update && apt-get install -y build-essential cmake curl && rm -rf /var/lib/apt/lists/*
RUN curl -OL https://github.com/apiaryio/drafter/releases/download/v5.0.0/drafter-5.0.0.tar.gz
RUN tar xf drafter-5.0.0.tar.gz && mkdir -p drafter-5.0.0/build && cd drafter-5.0.0/build && cmake .. && make && make install

from drafter.

kylef avatar kylef commented on June 16, 2024

I rebuild the container it takes 10+ minutes to build drafter itself

Once built, providing the version of Drafter isn't changed you should be able to utilise docker layer caching so that it will never need to rebuilt the Drafter layers of the image. You may also create a separate base image or multi-staged build.

Is there a way to speed up the build? Is there a way to build just the lib portion that I need?

You can utilise the option --jobs (or -j) to make to instruct it that it may build various parts in parallel to speed up the build.

Is there a way to build just the lib portion that I need?

Changing make to make drafter to omit building the tests. There is also a drafter-lib target, however install will fail as the drafter binary won't exist (that shouldn't take very long to build thought). https://hub.docker.com/r/apiaryio/drafter/dockerfile contains an example.

I'm working on building a python library that uses Drafter to parse API Blueprints

If you're not already aware, there's a Python library Draughtsman offering bindings to libdrafter.

from drafter.

bunchesofdonald avatar bunchesofdonald commented on June 16, 2024

I'm aware of layer caching, but we use ephemeral jenkins nodes and Docker caching isn't always available, and I build a lot of docker images and have to routinely prune my images to keep the down the size.

That's all super helpful, thank you so much!

from drafter.

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.