问题描述
apt-buildpack 是实验性的,尚未用于生产.我想这就是为什么也没有文档的原因.
The apt-buildpack is experimental and not yet intended for production use. I guess that's why also no documentation.
Creating container
Successfully created container
Downloading app package...
Downloaded app package (862.7K)
Warning: this buildpack can only be run as a supply buildpack, it can not be run alone
Failed to compile droplet: Failed to compile droplet: exit status 1
Destroying container
Exit status 223
Stopping instance abdfc8d0-699e-4834-9f2d-2b8aec218423
Successfully destroyed container
您能举个例子,介绍如何推送cf-env
示例应用并安装例如 rtorrent 和/或 openvpn .
Can you give me example how to push cf-env
sample app and install for example rtorrent and/or openvpn. Is it possible to install gnome for testing purposes?
推荐答案
就用法而言,它非常简单,您只需要在应用程序的根目录中包含Aptfile
即可.该目录应包含要安装的软件包的列表,每行一个软件包.
As far as usage goes it's pretty simple, you just need to include an Aptfile
in the root directory of your app. That should contain a list of packages to install, one package on each line.
例如:
$ cat Aptfile
ascii
rtorrent
openvpn
此消息:
告诉您Apt buildpack仅用于提供二进制文件.它实际上并不知道如何运行您的应用程序或任何应用程序.有关供应脚本的更多信息,请在此处查看文档
Is telling you that the Apt buildpack only functions to supply binaries. It doesn't actually know how to run your app or any application. For more on the supply script, check out the docs here.
使其生效的诀窍是您需要使用多buildpack支持.可以在此处中找到执行此操作的说明.这适用于大多数应用,但是有一个简单的示例此处.
The trick to making it work is that you need to use multi buildpack support. Instructions for doing that can be found here. This should work with most apps, but there's a simple example here.
一旦您的应用登台&开始,您可以通过运行cf ssh apt-test -t -c "/tmp/lifecycle/launcher /home/vcap/app bash ''"
确认您的软件包已安装.安装的所有内容都应该在路径上,但是如果您想查看安装位置,它将位于/home/vcap/deps/<buildpack-number>/
下.
Once your app stages & starts, you can confirm that your packages were installed by running cf ssh apt-test -t -c "/tmp/lifecycle/launcher /home/vcap/app bash ''"
. Anything that was installed should be on the path, but if you want to see where things are installed it'll be under the /home/vcap/deps/<buildpack-number>/
.
应该就可以了.希望有帮助!
That should be about it. Hope that helps!
这篇关于如何从cloudfoundry回购中使用apt-buildpack的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!