Giter Site home page Giter Site logo

alfespa17 / buildpack-mkdocs Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 2.74 MB

Buildpack using mkdocs

License: Apache License 2.0

Shell 0.41% Dockerfile 0.46% HTML 12.19% CSS 9.74% JavaScript 76.11% Earthly 0.49% Makefile 0.14% Batchfile 0.17% Python 0.20% PowerShell 0.10%

buildpack-mkdocs's Introduction

Base Image

Install CLI

Buildpack documentation links:

https://buildpacks.io/docs/
https://buildpacks.io/docs/tools/pack/#pack-cli

We need to define a custom stack for our base image and define the build and run image

Folder: buildpack-stack

Build both images:

cd  buildpack-stack
docker build . -t cnbs/applaudo-stack-build:focal --target build
docker build . -t cnbs/applaudo-stack-run:focal --target run
cd ..

Create Builder

cd buildpack-builder
pack builder create mkdocs-builder:focal --config ./builder.toml
cd ..

Update the local configuration to use the new builder

pack config default-builder mkdocs-builder:focal
pack config trusted-builders add mkdocs-builder:focal

Create Buildpack

Create base project to start working with buildpacks

cd mkdocs-buildpack
pack buildpack new applaudo/mkdocs --api 0.8 --path mkdocs-buildpack --version 0.0.1 --stacks io.buildpacks.applaudo.stacks.focal

Use Buildpack

pack config trusted-builders add mkdocs-builder:focal
pack builder create mkdocs-builder:focal --config ./buildpack-builder/builder.toml
pack build my-app1 --builder mkdocs-builder:focal --path mkdocs-sample/ -v
docker run --rm -p 8080:8080 my-app1

Examples pack 3 different images

pack build my-app1 --builder mkdocs-builder:focal --path mkdocs-sample/ -v
pack build my-app2 --builder mkdocs-builder:focal --path sphinx-sample/ -v
pack build my-app3 --builder mkdocs-builder:focal --path mkdocs-az/ -v

docker run --rm -p 8080:8080 my-app1
docker run --rm -p 8080:8080 my-app2
docker run --rm -p 8080:8080 my-app3

Earthfile

Example to use earthly to build the image with mkdocs

docker build . -t earthfile-pack:focal

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.