Code Monkey home page Code Monkey logo

buildkit-pack's Introduction

asciicinema example

buildkit-pack

BuildKit frontend for building buildpacks directly.

Usage

With Docker (v18.06+ with DOCKER_BUILDKIT=1):

Add # syntax = tonistiigi/pack as the first line of a file (eg. manifest.yml):

docker build -f manifest.yml .

With buildctl:

buildctl build --frontend=gateway.v0 --opt source=tonistiigi/pack --local context=.

Options

Detection can be enabled with skipDetect=true. Custom buildpacks can be set in manifest.yml or passed with buildpackOrder=url.

Examples

Python

> git clone git://github.com/ihuston/python-cf-examples.git
> cd python-cf-examples/01-simple-python-app
> tmp=$(mktemp); ( echo "# syntax = tonistiigi/pack" ; cat manifest.yml ) > $tmp && mv $tmp manifest.yml
> docker build -t pythonapp -f manifest.yml .
[+] Building 89.4s (16/16) FINISHED
 ....
 => => writing image sha256:1e13eb221e7779c8aa65624b97afcc11ee797d3c09d80dcfc1e55d956d467d39         0.0s
 => => naming to docker.io/library/pythonapp                                                         0.0s
> docker run -d -p 8080:8080 pythonapp
> curl localhost:8080
Hello World! I am instance 0

Go

> git clone git://github.com/cloudfoundry/go-buildpack
> cd go-buildpack/fixtures/go_app/
> tmp=$(mktemp); ( echo "# syntax = tonistiigi/pack" ; cat Procfile ) > $tmp && mv $tmp Procfile
> docker build -t goapp -f Procfile .
[+] Building 28.9s (16/16) FINISHED
...
 => => writing image sha256:f0d240bed9a2b12b288845c3a305050c8d9fa035f564d057e95b0714f68363f2         0.0s
 => => naming to docker.io/library/goapp                                                             0.0s
> docker run -d -p 8080:8080 goapp
> curl localhost:8080
go, world
.

.

buildkit-pack's People

Contributors

po3rin avatar tonistiigi avatar

Watchers

 avatar  avatar

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.