Cloud native buildpacks
# 🌱|help-and-getting-started
w
Has anyone used garden with cloud native buildpacks? Tried running the pack cli directly but getting gradle errors.
q
I've used Nixpacks which is similar. These are the relevant files (they're written for Acorn, not Bonsai but they should be trivial to adapt):
Copy code
yaml
kind: Module
type: exec
name: nixpacks
include: ["*"]
local: true
build:
  command:
    - nixpacks build . --name lbob -o .

---
kind: Module
type: container
name: lbob
include: ["*"]
build:
  dependencies:
    - name: nixpacks
      copy:
        - source: .nixpacks
dockerfile: .nixpacks/Dockerfile
services:
  - name: lbob
tests:
  - name: unit
    args: [pytest]

---
kind: Workflow
name: my-workflow
envVars:
  SCW_VERSION: "2.10.0"
  SCW_DEFAULT_REGION: "nl-ams"
  SCW_DEFAULT_ZONE: "nl-ams-2"
  SCW_DEFAULT_ORGANIZATION_ID: "eeb9ffc1-000-0000-8c91-00000000"
  SCW_ACCESS_KEY: "SCW000000000"
  NIXPACKS_VERSION: "1.1.1"
  NIXPACKS_PYTHON_VERSION: "3.11"
  PATH: "$HOME/bin:${local.env.PATH}"
steps:
  - script: |-
      mkdir -p ${local.env.HOME}/bin
      command -v scw || curl -o ${local.env.HOME}/bin/scw -L "https://github.com/scaleway/scaleway-cli/releases/download/v${local.env.SCW_VERSION}/scaleway-cli_${local.env.SCW_VERSION}_linux_amd64"
      chmod +x ${local.env.HOME}/bin/scw 
      ${local.env.HOME}/bin/scw k8s kubeconfig install c50d7b47-1d34-40b5-b7c8-1709a6839609
      command -v nixpacks || curl -sSL https://nixpacks.com/install.sh | bash
  - command: [deploy]
And welcome to the community, @witty-dusk-40518 🥳
@witty-dusk-40518 if you'd like to see specific support for Cloud Native Buildpacks, please open a feature request on our GitHub 🙇‍♂️ https://github.com/garden-io/garden/issues/new?assignees=&labels=feature+request&projects=&template=FEATURE_REQUEST.md&title=%5BFEATURE%5D%3A+
10 Views