forked from cloudfoundry/docs-cf-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildpacks.html.md.erb
116 lines (82 loc) · 3.59 KB
/
buildpacks.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
---
title: Managing Custom Buildpacks
owner: Buildpacks
---
This topic describes how an admin can manage additional buildpacks in <%= vars.app_runtime_full %>
<%= vars.app_runtime_abbr %>) using the Cloud Foundry Command Line Interface tool (cf CLI). If your app uses a language
or framework that the <%= vars.app_runtime_abbr %> system buildpacks do not support, you can take one of the following
actions:
* Write your own buildpack. For more information, see [Creating Custom Buildpacks](../buildpacks/custom.html).
* Customize an existing buildpack.
* Use a [Cloud Foundry Community Buildpack](https://github.com/cloudfoundry-community/cf-docs-contrib/wiki/Buildpacks).
* Use a [Heroku Third-Party Buildpack](https://devcenter.heroku.com/articles/third-party-buildpacks).
## <a id="add"></a> Add a Buildpack
<p class="note"><strong>Note:</strong> You must be a <%= vars.app_runtime_abbr %> admin user to run the commands
discussed in this section.</p>
To add a buildpack:
1. Run:
```
cf create-buildpack BUILDPACK PATH POSITION
```
Where:
* `BUILDPACK` specifies the buildpack name.
* `PATH` specifies the location of the buildpack. `PATH` can point to a ZIP file, the URL of a ZIP file, or a local
directory.
* `POSITION` specifies where to place the buildpack in the detection priority list.
<br>
<br>
For more information, see [create-buildpack](https://cli.cloudfoundry.org/en-US/cf/create-buildpack.html) in the
_Cloud Foundry CLI Reference Guide_.
1. To confirm that you have successfully added a buildpack, run:
```
cf buildpacks
```
## <a id="rename"></a> Rename a Buildpack
To rename a buildpack:
* If you use **cf CLI v7**, run:
```
cf update-buildpack --rename BUILDPACK-NAME NEW-BUILDPACK-NAME
```
Where:
* `BUILDPACK-NAME` is the original buildpack name.
* `NEW-BUILDPACK-NAME` is the new buildpack name.
* If you use **cf CLI v6**, run:
```
cf rename-buildpack BUILDPACK-NAME NEW-BUILDPACK-NAME
```
Where:
* `BUILDPACK-NAME` is the original buildpack name.
* `NEW-BUILDPACK-NAME` is the new buildpack name.
For more information about renaming buildpacks, see
[rename-buildpack](https://cli.cloudfoundry.org/en-US/cf/rename-buildpack.html) in the
_Cloud Foundry CLI Reference Guide_.
## <a id="update"></a> Update a Buildpack
To update a buildpack, run:
```
cf update-buildpack BUILDPACK [-p PATH] [-i POSITION] [-s STACK][--enable|--disable] [--lock|--unlock]
```
Where:
* `BUILDPACK` is the buildpack name.
* `PATH` is the location of the buildpack.
* `POSITION` is where the buildpack is in the detection priority list.
* `STACK` is the stack that the buildpack uses.
<p class="note"><strong>Note:</strong> cf CLI v7 removes the <code>cf rename-buildpack</code> command in favor of a
<code>--rename</code> option for <code>cf update-buildpack</code>.</p>
For more information about updating buildpacks, see
[update buildpack](https://cli.cloudfoundry.org/en-US/cf/update-buildpack.html) in the
_Cloud Foundry CLI Reference Guide_.
## <a id="delete"></a> Delete a Buildpack
To delete a buildpack, run:
```
cf delete-buildpack BUILDPACK [-s STACK] [-f]
```
Where:
* `BUILDPACK` is the buildpack name.
* `STACK` is the stack that the buildpack uses.
For more information about deleting buildpacks, see
[delete-buildpack](https://cli.cloudfoundry.org/en-US/cf/delete-buildpack.html) in the
_Cloud Foundry CLI Reference Guide_.
## <a id="lock"></a> Lock and Unlock a Buildpack
<%= partial "lock_buildpack" %>
## <a id="disabling-custom-buildpacks"></a> Disable Custom Buildpacks
<%= vars.disable_custom_buildpacks %>