Skip to content

Commit fcdb0ae

Browse files
author
Natalie Arellano
committed
Try to fix ugo
Signed-off-by: Natalie Arellano <[email protected]>
1 parent 94d095b commit fcdb0ae

File tree

5 files changed

+31
-32
lines changed

5 files changed

+31
-32
lines changed

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ weight=404
1111

1212
<!-- test:exec -->
1313
```bash
14-
cat $workspace/samples/extensions/tree/bin/detect
14+
cat $PWD/samples/extensions/tree/bin/detect
1515
```
1616

1717
The extension always detects (because its exit code is `0`) and provides a dependency called `tree` by writing to the build plan.
@@ -20,26 +20,26 @@ The extension always detects (because its exit code is `0`) and provides a depen
2020

2121
<!-- test:exec -->
2222
```bash
23-
cat $workspace/samples/extensions/tree/bin/generate
23+
cat $PWD/samples/extensions/tree/bin/generate
2424
```
2525

2626
The extension generates a `build.Dockerfile` that installs `tree` on the builder image.
2727

2828
### Re-create our builder with `hello-extensions` updated to require `tree`
2929

30-
Edit `$workspace/samples/buildpacks/hello-extensions/bin/detect` to uncomment the first set of lines that output `[[requires]]` to the build plan:
30+
Edit `$PWD/samples/buildpacks/hello-extensions/bin/detect` to uncomment the first set of lines that output `[[requires]]` to the build plan:
3131

3232
<!-- test:exec -->
3333
```bash
34-
sed -i '' "10,11s/#//" $workspace/samples/buildpacks/hello-extensions/bin/detect
34+
sed -i "10,11s/#//" $PWD/samples/buildpacks/hello-extensions/bin/detect
3535
```
3636

3737
Re-create the builder:
3838

3939
<!-- test:exec -->
4040
```
41-
pack builder create $registry_namespace/extensions-builder \
42-
--config $workspace/samples/builders/alpine/builder.toml \
41+
pack builder create localhost:5000/extensions-builder \
42+
--config $PWD/samples/builders/alpine/builder.toml \
4343
--publish
4444
```
4545

@@ -48,13 +48,14 @@ pack builder create $registry_namespace/extensions-builder \
4848
<!-- test:exec -->
4949
```
5050
pack build hello-extensions \
51-
--builder $registry_namespace/extensions-builder \
51+
--builder localhost:5000/extensions-builder \
5252
--network host \
53-
--path $workspace/samples/apps/java-maven \
53+
--path $PWD/samples/apps/java-maven \
54+
--pull-policy always \
5455
--verbose
5556
```
5657

57-
Note that `--network host` is necessary when using `registry_namespace=localhost:5000`.
58+
Note that `--network host` is necessary when publishing to a local registry.
5859

5960
You should see:
6061

content/docs/extension-author-guide/create-extension/building-blocks-extension.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ weight=403
99

1010
<!-- test:exec -->
1111
```bash
12-
tree $workspace/samples/extensions/tree
12+
tree $PWD/samples/extensions/tree
1313
```
1414

1515
(That's right, we're using the very tool we will later be installing!) You should see something akin to the following:

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ weight=405
1111

1212
<!-- test:exec -->
1313
```bash
14-
cat $workspace/samples/extensions/curl/bin/detect
14+
cat $PWD/samples/extensions/curl/bin/detect
1515
```
1616

1717
The extension always detects (because its exit code is `0`) and provides a dependency called `curl`.
@@ -20,7 +20,7 @@ The extension always detects (because its exit code is `0`) and provides a depen
2020

2121
<!-- test:exec -->
2222
```bash
23-
cat $workspace/samples/extensions/curl/bin/generate
23+
cat $PWD/samples/extensions/curl/bin/generate
2424
```
2525

2626
The extension generates a `run.Dockerfile` that switches the run image to reference `run-image-curl`.
@@ -29,7 +29,7 @@ The extension generates a `run.Dockerfile` that switches the run image to refere
2929

3030
<!-- test:exec -->
3131
```bash
32-
cat $workspace/samples/stacks/alpine/run/curl.Dockerfile
32+
cat $PWD/samples/stacks/alpine/run/curl.Dockerfile
3333
```
3434

3535
This is a simple Dockerfile that creates a CNB run image from the `curl` base image by adding the required CNB user configuration and `io.buildpacks.stack.id` label.
@@ -41,25 +41,25 @@ Build the run image:
4141
<!-- test:exec -->
4242
```bash
4343
docker build \
44-
--file $workspace/samples/stacks/alpine/run/curl.Dockerfile \
44+
--file $PWD/samples/stacks/alpine/run/curl.Dockerfile \
4545
--tag run-image-curl .
4646
```
4747

4848
### Re-create our builder with `hello-extensions` updated to require `curl`
4949

50-
Edit `$workspace/samples/buildpacks/hello-extensions/bin/detect` to uncomment the second set of lines that output `[[requires]]` to the build plan:
50+
Edit `$PWD/samples/buildpacks/hello-extensions/bin/detect` to uncomment the second set of lines that output `[[requires]]` to the build plan:
5151

5252
<!-- test:exec -->
5353
```bash
54-
sed -i '' "14,15s/#//" $workspace/samples/buildpacks/hello-extensions/bin/detect
54+
sed -i "14,15s/#//" $PWD/samples/buildpacks/hello-extensions/bin/detect
5555
```
5656

5757
Re-create the builder:
5858

5959
<!-- test:exec -->
6060
```bash
61-
pack builder create $registry_namespace/extensions-builder \
62-
--config $workspace/samples/builders/alpine/builder.toml \
61+
pack builder create localhost:5000/extensions-builder \
62+
--config $PWD/samples/builders/alpine/builder.toml \
6363
--publish
6464
```
6565

@@ -68,13 +68,14 @@ pack builder create $registry_namespace/extensions-builder \
6868
<!-- test:exec -->
6969
```bash
7070
pack build hello-extensions \
71-
--builder $registry_namespace/extensions-builder \
72-
--path $workspace/samples/apps/java-maven \
71+
--builder localhost:5000/extensions-builder \
72+
--path $PWD/samples/apps/java-maven \
73+
--pull-policy always \
7374
--network host \
7475
--verbose
7576
```
7677

77-
Note that `--network host` is necessary when using `registry_namespace=localhost:5000`.
78+
Note that `--network host` is necessary when publishing to a local registry.
7879

7980
You should see:
8081

content/docs/extension-author-guide/create-extension/setup-local-environment.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ Server: Docker Engine - Community
4141

4242
### Setup workspace directory
4343

44-
<!-- test:exec -->
4544
```bash
46-
workspace=$PWD # or your preferred workspace directory
45+
cd <your preferred workspace directory>
4746
```
4847

4948
### Ensure pack version supports image extensions
@@ -66,9 +65,7 @@ pack config experimental true
6665

6766
<!-- test:exec -->
6867
```bash
69-
cd $workspace
7068
git clone https://github.com/buildpacks/samples.git
71-
cd samples
7269
```
7370

7471
<!--+ if false +-->

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Let's see a build that requires base image extension in order to succeed.
1313

1414
<!-- test:exec -->
1515
```bash
16-
cat $workspace/samples/buildpacks/hello-extensions/bin/detect
16+
cat $PWD/samples/buildpacks/hello-extensions/bin/detect
1717
```
1818

1919
The buildpack always detects (because its exit code is `0`) but doesn't require any dependencies (as the output build plan is empty).
@@ -22,7 +22,7 @@ The buildpack always detects (because its exit code is `0`) but doesn't require
2222

2323
<!-- test:exec -->
2424
```bash
25-
cat $workspace/samples/buildpacks/hello-extensions/bin/build
25+
cat $PWD/samples/buildpacks/hello-extensions/bin/build
2626
```
2727

2828
The buildpack tries to use `tree` at build-time, and defines a launch process called `curl` that runs `curl --version` at runtime.
@@ -52,8 +52,8 @@ Create the builder:
5252

5353
<!-- test:exec -->
5454
```bash
55-
pack builder create $registry_namespace/extensions-builder \
56-
--config $workspace/samples/builders/alpine/builder.toml \
55+
pack builder create localhost:5000/extensions-builder \
56+
--config $PWD/samples/builders/alpine/builder.toml \
5757
--publish
5858
```
5959

@@ -63,14 +63,14 @@ Run `pack build` (note that the "source" directory is effectively ignored in our
6363

6464
```
6565
pack build hello-extensions \
66-
--builder $registry_namespace/extensions-builder \
66+
--builder localhost:5000/extensions-builder \
6767
--network host \
68-
--path $workspace/samples/apps/java-maven \
68+
--path $PWD/samples/apps/java-maven \
6969
--pull-policy always \
7070
--verbose
7171
```
7272

73-
Note that `--network host` is necessary when using `registry_namespace=localhost:5000`.
73+
Note that `--network host` is necessary when publishing to a local registry.
7474

7575
You should see:
7676

0 commit comments

Comments
 (0)