Git Product home page Git Product logo

compiling-containers's Introduction

compiling-containers

front end

build my front end:

earthly -i --push +ick-frontend  
docker build -f ./dockerfile/cmd/dockerfile-frontend/Dockerfile . -t agbell/frontend 
go build ./dockerfile/cmd/dockerfile-frontend/main.go

make LLB

Start buildkit:

docker run --rm --privileged -d --name buildkit moby/buildkit
export BUILDKIT_HOST=docker-container://buildkit

Output LLB:

 go run ./writellb/writellb.go | buildctl debug dump-llb | jq .

Build the Image:

  go run ./writellb/writellb.go | buildctl build --local context=. --output type=image,name=docker.io/agbell/test,push=true

Run the image


docker run -it agbell/test:latest /bin/sh
➜  compiling-containers git:(main) ✗ go run ./writellb/writellb.go | buildctl build --no-cache --local context=. --output type=image,name=docker.io/agbell/test,push=true
[+] Building 1.9s (7/7) FINISHED                                                                                                                                                                                   
 => local://context                                                                                                                                                                                           0.1s
 => => transferring context: 48.26kB                                                                                                                                                                          0.1s
 => docker-image://docker.io/library/alpine:latest                                                                                                                                                            0.0s
 => => resolve docker.io/library/alpine:latest                                                                                                                                                                0.6s
 => [auth] library/alpine:pull token for registry-1.docker.io                                                                                                                                                 0.0s
 => copy /README.md /README.md                                                                                                                                                                                0.0s
 => /bin/sh -c echo "programmatically built" > /built.txt                                                                                                                                                     0.1s
 => exporting to image                                                                                                                                                                                        1.7s
 => => exporting layers                                                                                                                                                                                       0.1s
 => => exporting manifest sha256:7b613d1abdd023824a709c4c97d59087dbdd6368dbccb6b22ed0305d68f083da                                                                                                             0.0s
 => => exporting config sha256:ca6a7e01c880886fd55f0e0e7056d63731c164a85e82e0c4833cc84d07b716da                                                                                                               0.0s
 => => pushing layers                                                                                                                                                                                         1.4s
 => => pushing manifest for docker.io/agbell/test:latest                                                                                                                                                      0.3s
 => [auth] agbell/test:pull,push token for registry-1.docker.io                                                                                                                                               0.0s
➜  compiling-containers git:(main) ✗ docker run -it --pull always agbell/test:latest /bin/sh                                                                             
latest: Pulling from agbell/test
ba3557a56b15: Already exists 
e631696b715d: Already exists 
9868e2d03655: Pull complete 
Digest: sha256:7b613d1abdd023824a709c4c97d59087dbdd6368dbccb6b22ed0305d68f083da
Status: Downloaded newer image for agbell/test:latest
/ # cat built.txt 
programmatically built
/ # ls README.md
README.md

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.