-
Notifications
You must be signed in to change notification settings - Fork 108
/
Copy pathbuildpacks.html.md.erb
124 lines (83 loc) · 3.56 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
117
118
119
120
121
122
123
124
---
title: Managing custom buildpacks in Cloud Foundry
owner: Buildpacks
---
<%# Reset page title based on platform type %>
<% if vars.platform_code != 'CF' %>
<% set_title("Managing custom buildpacks in", vars.app_runtime_abbr) %>
<% end %>
You can manage additional buildpacks in <%= vars.app_runtime_abbr %> by using the Cloud Foundry Command Line Interface
tool (cf CLI).
If your app uses a language
or framework that the <%= vars.app_runtime_full %>
(<%= 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> 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:
<ul>
<li><code>BUILDPACK</code> specifies the buildpack name.</li>
<li><code>PATH</code> specifies the location of the buildpack. <code>PATH</code> can point to a ZIP file, the URL of a ZIP file, or a local
directory.</li>
<li><code>POSITION</code> specifies where to place the buildpack in the detection priority list.</li>
</ul>
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:
Using cf CLI v7+ run:
```
cf update-buildpack --rename BUILDPACK-NAME NEW-BUILDPACK-NAME
```
Where:
<ul>
<li><code>BUILDPACK-NAME</code> is the original buildpack name.</li>
<li><code>NEW-BUILDPACK-NAME</code> is the new buildpack name.</li>
</ul>
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:
```console
cf update-buildpack BUILDPACK [-p PATH] [-i POSITION] [-s STACK][--enable|--disable] [--lock|--unlock] [--rename NEW_NAME]
```
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.
If you are using cf CLI v6, use the <code>cf rename-buildpack</code> command instead of the
<code>--rename</code> flag.
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:
```console
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> Deactivate custom buildpacks
<%= vars.disable_custom_buildpacks %>