{"id":828,"date":"2019-08-23T19:32:16","date_gmt":"2019-08-23T11:32:16","guid":{"rendered":"https:\/\/woohuiren.me\/blog\/?p=828"},"modified":"2019-08-23T19:32:24","modified_gmt":"2019-08-23T11:32:24","slug":"cloudfoundry-ssh-with-environment","status":"publish","type":"post","link":"https:\/\/woohuiren.me\/blog\/cloudfoundry-ssh-with-environment\/","title":{"rendered":"Cloudfoundry SSH with environment"},"content":{"rendered":"\n<p>The default cf ssh without parameters allows users to access their containers or virtual machine just fine. However, there are limitations to this.<\/p>\n\n\n\n<p>In PHP buildpacks, the default SSH will not load dynamic libraries such as curl. The following commands will resolve this issue by loading the environment into the bash command.<\/p>\n\n\n\n<p>For cf ssh:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cf ssh \"&lt;app-name>\" -t -c \"\/tmp\/lifecycle\/launcher \/home\/vcap\/app bash ''\"<\/code><\/pre>\n\n\n\n<p>For cf v3-ssh (apps deployed using v3-push):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cf v3-ssh \"&lt;app-name>\" -t -c \"\/tmp\/lifecycle\/launcher \/home\/vcap\/app bash ''\"<\/code><\/pre>\n\n\n\n<p>As a reminder, changing contents within the container or virtual machine does not persist. Hence, making persistent changes through SSH is not recommended.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The default cf ssh without parameters allows users to access their containers or virtual machine just fine. However, there are limitations to this. In PHP buildpacks, the default SSH will not load dynamic libraries such as curl. The following commands will resolve this issue by loading the environment into the bash command. For cf ssh: &hellip; <a href=\"https:\/\/woohuiren.me\/blog\/cloudfoundry-ssh-with-environment\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Cloudfoundry SSH with environment&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[2,4,5],"tags":[30,182],"class_list":["post-828","post","type-post","status-publish","format-standard","hentry","category-information-technology","category-it-softwares","category-programming","tag-php","tag-pivotal-cloud-foundry"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/posts\/828"}],"collection":[{"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/comments?post=828"}],"version-history":[{"count":1,"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/posts\/828\/revisions"}],"predecessor-version":[{"id":829,"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/posts\/828\/revisions\/829"}],"wp:attachment":[{"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/media?parent=828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/categories?post=828"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/woohuiren.me\/blog\/wp-json\/wp\/v2\/tags?post=828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}