Skip to content

Commit 2b40c5e

Browse files
author
Natalie Arellano
committed
Fix extensions demo now that samples repo has been updated
We don't need to re-create the builder, we just need to update the env vars passed to the buildpack to make it require things from extensions. Signed-off-by: Natalie Arellano <[email protected]>
1 parent ddfcca0 commit 2b40c5e

File tree

3 files changed

+5
-40
lines changed

3 files changed

+5
-40
lines changed

content/docs/extension-guide/create-extension/build-dockerfile.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,14 @@ cat $PWD/samples/extensions/tree/bin/generate
2828

2929
The extension generates a `build.Dockerfile` that installs `tree` on the builder image.
3030

31-
### Re-create our builder with `hello-extensions` updated to require `tree`
32-
33-
Edit `$PWD/samples/buildpacks/hello-extensions/bin/detect` to uncomment the first set of lines that output `[[requires]]` to the build plan:
34-
35-
<!-- test:exec -->
36-
```bash
37-
sed -i "10,11s/#//" $PWD/samples/buildpacks/hello-extensions/bin/detect
38-
```
39-
40-
(On Mac, use `sed -i '' "10,11s/#//" $PWD/samples/buildpacks/hello-extensions/bin/detect`)
41-
42-
Re-create the builder:
43-
44-
<!-- test:exec -->
45-
```
46-
pack builder create localhost:5000/extensions-builder \
47-
--config $PWD/samples/builders/alpine/builder.toml \
48-
--publish
49-
```
50-
5131
### Re-build the application image
5232

5333
<!-- test:exec -->
5434
```
5535
pack build hello-extensions \
5636
--builder localhost:5000/extensions-builder \
37+
--env BP_EXT_DEMO=1 \
38+
--env BP_REQUIRES=tree \
5739
--network host \
5840
--path $PWD/samples/apps/java-maven \
5941
--pull-policy always \

content/docs/extension-guide/create-extension/run-dockerfile.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,32 +48,14 @@ docker build \
4848
--tag run-image-curl .
4949
```
5050

51-
### Re-create our builder with `hello-extensions` updated to require `curl`
52-
53-
Edit `$PWD/samples/buildpacks/hello-extensions/bin/detect` to uncomment the second set of lines that output `[[requires]]` to the build plan:
54-
55-
<!-- test:exec -->
56-
```bash
57-
sed -i "14,15s/#//" $PWD/samples/buildpacks/hello-extensions/bin/detect
58-
```
59-
60-
(On Mac, use `sed -i '' "14,15s/#//" $PWD/samples/buildpacks/hello-extensions/bin/detect`)
61-
62-
Re-create the builder:
63-
64-
<!-- test:exec -->
65-
```bash
66-
pack builder create localhost:5000/extensions-builder \
67-
--config $PWD/samples/builders/alpine/builder.toml \
68-
--publish
69-
```
70-
7151
### Re-build the application image
7252

7353
<!-- test:exec -->
7454
```bash
7555
pack build hello-extensions \
7656
--builder localhost:5000/extensions-builder \
57+
--env BP_EXT_DEMO=1 \
58+
--env BP_REQUIRES=tree,curl \
7759
--path $PWD/samples/apps/java-maven \
7860
--pull-policy always \
7961
--network host \

content/docs/extension-guide/create-extension/why-dockerfiles.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Run `pack build` (note that the "source" directory is effectively ignored in our
6060
```
6161
pack build hello-extensions \
6262
--builder localhost:5000/extensions-builder \
63+
--env BP_EXT_DEMO=1 \
6364
--network host \
6465
--path $PWD/samples/apps/java-maven \
6566
--pull-policy always \

0 commit comments

Comments
 (0)