Skip to content

Instantly share code, notes, and snippets.

@jbayer
Created December 14, 2015 06:19
Show Gist options
  • Save jbayer/d0d54d82561edf66aa1c to your computer and use it in GitHub Desktop.
Save jbayer/d0d54d82561edf66aa1c to your computer and use it in GitHub Desktop.
cf docker support using docker image root user
$ cf push ubuntu -o library/ubuntu -u none -c "nc -l 8080"
Creating app ubuntu in org local.micropcf.io-org / space dev as admin...
OK
Creating route ubuntu.local.micropcf.io...
OK
Binding ubuntu.local.micropcf.io to ubuntu...
OK
Starting app ubuntu in org local.micropcf.io-org / space dev as admin...
Creating container
Successfully created container
Staging...
Staging process started ...
Staging process finished
Exit status 0
Staging Complete
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running
App started
OK
App ubuntu was started using this command `nc -l 8080`
Showing health and status for app ubuntu in org local.micropcf.io-org / space dev as admin...
OK
requested state: started
instances: 1/1
usage: 1G x 1 instances
urls: ubuntu.local.micropcf.io
last uploaded: Mon Dec 14 06:15:28 UTC 2015
stack: cflinuxfs2
buildpack: unknown
state since cpu memory disk details
#0 running 2015-12-13 10:16:32 PM 0.0% 0 of 1G 0 of 1G
$ cf ssh -k ubuntu
root@7tgn7relgrc:~# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.1 0.1 8312 4312 ? S<l 06:16 0:00 initd -dropCapabilities=true -title="wshd: 7tgn7relgrc"
root 10 0.0 0.0 4448 760 ? S< 06:16 0:00 /bin/sh -c nc -l 8080
root 14 0.0 0.0 9132 804 ? S< 06:16 0:00 nc -l 8080
root 15 0.1 0.1 11220 7408 ? S<l 06:16 0:00 /tmp/lifecycle/diego-sshd -address=0.0.0.0:2222 -hostKey=-----BEGIN RSA PRIVATE KEY----- MIICXQIBAAKBgQCwYq9plE6wVfn102Ljhn1ugvc5u95gdEi/N0xpp3XaTTUXUM/+ CkL4M2nx8iXjDN6fa
root 20 0.0 0.0 18192 3336 pts/0 S<s 06:16 0:00 /bin/bash
root 32 0.0 0.0 15572 2160 pts/0 R<+ 06:16 0:00 ps aux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment