peco8 / minimum-rack-cnb

Minimum Rack based Cloud Native Build Pack sample

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

minimum-rack-cnb Build

This repository contains instruction how to build image without Dockerfile (a bare minimum Rack app) using Cloud Native Buildpack.

Getting started

Usage

This buildpack is currently intended to be used with the heroku builder heroku/pack:18 via pack.

Locally

Build your app
git clone git@github.com:peco8/minimum-rack-cnb.git
cd minimum-rack-cnb
pack build sample \
     --builder heroku/buildpacks:18
     --path .
Quick test
docker run --rm -e PORT=8080 -p 8080:8080 sample
curl -s http://0.0.0.0:8080

GithubActions (CI)

Container images should be built in CI environment, not local. In this repo, we already have CI environment using GithubActions.

Push and Build
Fork and clone this repo locally
cd minimum-rack-cnb
git commit --allow-empty
git push origin master
Pull
docker pull docker.pkg.github.com/<USERNAME>/minimum-rack-cnb/sample:latest
Quick test
docker run --rm -e PORT=8080 -p 8080:8080 docker.pkg.github.com/<USERNAME>/minimum-rack-cnb/sample

About

Minimum Rack based Cloud Native Build Pack sample


Languages

Language:Ruby 100.0%