From 91c90c47403750066030874d7cb50a7e0212964b Mon Sep 17 00:00:00 2001 From: Schneems Date: Mon, 29 Apr 2024 11:16:46 -0500 Subject: [PATCH] Move node tutorial to docs folder --- README.md | 8 ++++---- TUTORIAL.md => docs/node_tutorial.md | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) rename TUTORIAL.md => docs/node_tutorial.md (99%) diff --git a/README.md b/README.md index e991b16..e2b023f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Heroku Cloud Native Buildpacks Logo

-Create a production-ready container image for your application with a [single command](TUTORIAL.md); no Dockerfile required. [Try Heroku Cloud Native Buildpacks today](TUTORIAL.md). +Create a production-ready container image for your application with a [single command](docs/node_tutorial.md); no Dockerfile required. [Try Heroku Cloud Native Buildpacks today](docs/node_tutorial.md). ## What is a Cloud Native Buildpack? @@ -13,7 +13,7 @@ Cloud Native Buildpacks (CNBs) are an [open specification for building and runni ### Philosophy -Heroku CNBs are written with the app developer in mind. We want it to be as easy and simple as possible to transform an app into an OCI image. While a Dockerfile is procedural, CNBs are declarative. Give us your application, and we'll give you an image that can run it. Don't believe us? [Try it out today](TUTORIAL.md). +Heroku CNBs are written with the app developer in mind. We want it to be as easy and simple as possible to transform an app into an OCI image. While a Dockerfile is procedural, CNBs are declarative. Give us your application, and we'll give you an image that can run it. Don't believe us? [Try it out today](docs/node_tutorial.md). We believe: - Building OCI images shouldn't be a pain. @@ -53,7 +53,7 @@ To run our buildpack locally, we will use `pack`, a tool maintained by the Cloud ### Create the app image > [!NOTE] -> For a full hands-on getting started experience [follow our getting started tutorial](TUTORIAL.md). +> For a full hands-on getting started experience [follow our getting started tutorial](docs/node_tutorial.md). First, we need an application to produce an image. We will use [Heroku's getting started app for Node.js](https://github.com/heroku/node-js-getting-started), but any other app that uses a supported ecosystem will work. Clone the application: @@ -67,7 +67,7 @@ In your application directory, run the `pack build` command. No additional steps $ pack build my-app-image --builder heroku/builder:22 --path node-js-getting-started ``` -Once the image is built, you can run it with the tools you're already comfortable with, like the `docker` CLI, for a demonstration of how [read out getting started tutorial](TUTORIAL.md). +Once the image is built, you can run it with the tools you're already comfortable with, like the `docker` CLI, for a demonstration of how [read out getting started tutorial](docs/node_tutorial.md). ## Discussions diff --git a/TUTORIAL.md b/docs/node_tutorial.md similarity index 99% rename from TUTORIAL.md rename to docs/node_tutorial.md index 697a023..3ed43ae 100644 --- a/TUTORIAL.md +++ b/docs/node_tutorial.md @@ -1,4 +1,4 @@ -# Cloud Native Buildpack Tutorial +# Cloud Native Buildpack Tutorial Build a Node.js application image in 5 minutes, no Dockerfile required. At the end of this tutorial, you'll have a working [OCI image](https://opencontainers.org/) of a Node.js application that can run locally. You will learn about the Cloud Native Buildpack (CNB) ecosystem, and how to utilize the [pack CLI](https://buildpacks.io/docs/for-platform-operators/how-to/integrate-ci/pack/) to build images without the need to write or maintain a Dockerfile. @@ -37,7 +37,7 @@ The current default builder is heroku/builder:22 ## What is a builder? > [!NOTE] -> Skip ahead if you want to build the application first and get into the details later. You won't need to +> Skip ahead if you want to build the application first and get into the details later. You won't need to > know about builders for the rest of this tutorial. In short, a builder is a delivery mechanism for buildpacks. A builder contains references to base images and individual buildpacks. A base image contains the operating system and system dependencies. Buildpacks are the components that will configure an image to run your application, that’s where the bulk of the logic lives and why the project is called “Cloud Native Buildpacks” and not “Cloud Native Builders.” @@ -78,7 +78,7 @@ This output shows the various buildpacks that represent the different languages ## Download an example Node.js application -How do you configure a CNB? Give them an application. While Dockerfile is procedural, buildpacks, are declarative. A buildpack will determine what your application needs to function by inspecting the code on disk. +How do you configure a CNB? Give them an application. While Dockerfile is procedural, buildpacks, are declarative. A buildpack will determine what your application needs to function by inspecting the code on disk. For this example, we're using a pre-built Node.js application. Download it now: @@ -94,7 +94,7 @@ $ ls Procfile README.md app.json index.js package-lock.json package.json public test.js views ``` -Now build an image named `my-image-name` by executing the `heroku/builder:22` against the application by running the +Now build an image named `my-image-name` by executing the `heroku/builder:22` against the application by running the `pack build` command: ``` @@ -399,4 +399,4 @@ This is the Procfile of the Node.js getting started guide: web: npm start ``` -By including this file and using `heroku/procfile` buildpack, your application will receive a default web process that calls `npm start`. You can configure this behavior by changing the contents of that file. +By including this file and using `heroku/procfile` buildpack, your application will receive a default web process that calls `npm start`. You can configure this behavior by changing the contents of that file.