Learn and Be Curious

C:\Users\tec12>cf ic namespace set myungspace
myungspace

C:\Users\tec12>cf ic myungspace get
FAILED
The IBM Containers CLI must be initialized. Enter "cf ic init" to initialize it.




C:\Users\tec12>cf ic namespace get
FAILED
The client key pair could not be loaded. Enter "cf ic init" to initialize it.



C:\Users\tec12>cf ic cpi vbudi/todosrv1 registry.ng.bluemix.net/$(cf ic namespace get)/todosrv
Incorrect usage.
The command, options, or arguments were specified incorrectly. Review the following usage information and enter the command again.

USAGE:
   cf ic cpi SOURCE_IMAGE_NAME DESTINATION_IMAGE_NAME


C:\Users\tec12>cf ic cpi vbudi/todosrv1 registry.ng.bluemix.net/myungspace/todosrv
FAILED
The IBM Containers CLI must be initialized. Enter "cf ic init" to initialize it.




C:\Users\tec12>cf ic cpi vbudi/todosrv1 registry.ng.bluemix.net/namespace/todosrv
FAILED
The IBM Containers CLI must be initialized. Enter "cf ic init" to initialize it.




C:\Users\tec12>cf ic cpi vbudi/todosrv1 registry.ng.bluemix.net/myungspace/todosrv
FAILED
The IBM Containers CLI must be initialized. Enter "cf ic init" to initialize it.




C:\Users\tec12>cf ic init
Deleting old configuration file...
Generating client certificates for IBM Containers...
Storing client certificates in C:\Users\tec12\.ice\certs\...

Storing client certificates in C:\Users\tec12\.ice\certs\containers-api.ng.bluemix.net\9d450733-342f-47c4-9404-4cd9600100ba...

OK
The client certificates were retrieved.

Checking local Docker configuration...
You are authenticated with the IBM Containers API,
however the local Docker daemon is not reachable to authenticate it
with the IBM Containers registry. You can still run IBM Containers
commands, but you cannot push or pull images unless you start the local Docker daemon.

You can choose from two ways to use the Docker CLI with IBM Containers:


Option 1: This option allows you to use 'cf ic' for managing containers on IBM Containers while still using the Docker CLI directly to manage your loc
al Docker host.
        Use this Cloud Foundry IBM Containers plug-in without affecting the local Docker environment:


        Example Usage:
        cf ic ps
        cf ic images

Option 2: Use the Docker CLI directly. In this shell, override the local Docker environment by setting these variables to connect to IBM Containers. C
opy and paste the following commands:
        Note: Only some Docker commands are supported with this option. Run cf ic help to see which commands are supported.

If you are using the Windows command prompt (cmd.exe), copy and paste the following commands:

        set DOCKER_HOST=tcp://containers-api.ng.bluemix.net:8443
        set DOCKER_CERT_PATH=C:\Users\tec12\.ice\certs\containers-api.ng.bluemix.net\9d450733-342f-47c4-9404-4cd9600100ba
        set DOCKER_TLS_VERIFY=1

If you are using Windows PowerShell, copy and paste the following commands:

        $Env:DOCKER_HOST="tcp://containers-api.ng.bluemix.net:8443"
        $Env:DOCKER_CERT_PATH="C:\Users\tec12\.ice\certs\containers-api.ng.bluemix.net\9d450733-342f-47c4-9404-4cd9600100ba"
        $Env:DOCKER_TLS_VERIFY="1"

If you are using Docker QuickStart Terminal, copy and paste the following commands:

        export DOCKER_HOST=tcp://containers-api.ng.bluemix.net:8443
        export DOCKER_CERT_PATH=C:\Users\tec12\.ice\certs\containers-api.ng.bluemix.net\9d450733-342f-47c4-9404-4cd9600100ba
        export DOCKER_TLS_VERIFY=1

        Example Usage:
        docker ps
        docker images


C:\Users\tec12>cf ic cpi vbudi/todosrv1 registry.ng.bluemix.net/myungspace/todosrv
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM vbudi/todosrv1
latest: Pulling from vbudi/todosrv1
8387d9ff0016: Pull complete
3b52deaaf0ed: Pull complete
4bd501fad6de: Pull complete
a3ed95caeb02: Pull complete
93fd2bf28096: Pull complete
c5515e403af1: Pull complete
Digest: sha256:e6fd811a731070d09e428eee57fa129aa6abba6a95193624bdb1def0f094747c
Status: Downloaded newer image for vbudi/todosrv1:latest
 ---> 851c8cc47727
Successfully built 851c8cc47727
The push refers to a repository [registry.ng.bluemix.net/myungspace/todosrv]
5f70bf18a086: Pushed
ae8c3609d76f: Pushed
bd778046a484: Pushed
0d81735d8272: Pushed
982549bd6b32: Pushed
8698b31c92d5: Pushed
latest: digest: sha256:787f48d7fe9997cd41afa8d356f3c9791321e699058261bd31e24ceef58b8ae2 size: 3842
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context wil
l have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.

C:\Users\tec12>cf ic images
REPOSITORY                                            TAG                 IMAGE ID            CREATED             SIZE
registry.ng.bluemix.net/ibm_wa_agent                  latest              3d38f3e80fd7        3 weeks ago         434.9 MB
registry.ng.bluemix.net/ibmliberty                    microProfile        50854bcc98c3        9 weeks ago         237.3 MB
registry.ng.bluemix.net/ibmliberty                    latest              96285b81d9df        9 weeks ago         314.1 MB
registry.ng.bluemix.net/ibmliberty                    javaee7             96285b81d9df        9 weeks ago         314.1 MB
registry.ng.bluemix.net/ibmliberty                    webProfile7         6b2b8341fa32        9 weeks ago         276 MB
registry.ng.bluemix.net/ibmnode                       v4                  acec21732cb5        6 weeks ago         192.5 MB
registry.ng.bluemix.net/ibmnode                       latest              acec21732cb5        6 weeks ago         192.5 MB
registry.ng.bluemix.net/ibmnode                       v1.1                fd4d70c5451b        6 weeks ago         181.5 MB
registry.ng.bluemix.net/ibmnode                       v1.2                640ed14065df        6 weeks ago         187.7 MB
registry.ng.bluemix.net/ibm-websphere-extreme-scale   latest              f98d12aad014        2 weeks ago         465.8 MB
registry.ng.bluemix.net/ibmliberty                    webProfile6         211f521035a2        9 weeks ago         267.6 MB
registry.ng.bluemix.net/ibm-node-strong-pm            latest              3fc4ae24eb0e        5 weeks ago         259.1 MB
registry.ng.bluemix.net/ibm-integration-bus           latest              ec198557875c        6 weeks ago         683.4 MB
registry.ng.bluemix.net/ibm-backup-restore            latest              4b5d9037c97a        6 weeks ago         207.9 MB
registry.ng.bluemix.net/ibm-mq                        latest              f099132ebc16        7 days ago          782.4 MB
registry.ng.bluemix.net/myungspace/todosrv            latest              851c8cc47727        9 months ago        404.1 MB

C:\Users\tec12>cf ic run -m 512 -p9080:9080 -p9443:9443 -p7276:7276 -p5432:5432 --name integration registry.ng.bluemix.net/myungspace/todosrv
cd7b583c-4e06-4045-ac55-28407cbf6b88

C:\Users\tec12>









C:\Users\tec12>cf ic ip request
OK
The IP address "169.46.21.18" was obtained.

C:\Users\tec12>cf ip bind 169.46.21.18 integration
'ip' is not a registered command. See 'cf help'

C:\Users\tec12>cf ic ip bind 169.46.21.18 integration
FAILED

Exception binding floating ip 169.46.21.18 of type ntype to container cd7b583c-4e06-4045-ac55-28407cbf6b88 for space_guid=9d450733-342f-47c4-9404-4cd9
600100ba, user_doc_otherattrs=['api_key', 'cloud_backend', 'created_date', 'crypto', 'get_fields', 'has_field', 'id', 'last_bm_bearer_token', 'last_bm
_login', 'last_bm_refresh_token', 'last_bm_roleset', 'namespace', 'openstack_password', 'openstack_userid', 'org_uuid', 'pw_encryption_enabled', 'rev'
, 'service_uuid', 'space_uuid', 'tenant_id', 'tenant_name', 'tls_user_cert', 'tls_user_key', 'type', 'updated_date', 'user_email', 'user_family_name',
 'user_given_name', 'user_id', 'user_is_ibm', 'user_locale'], tenant_id=e53bbebdaf1f4263a17bc3ef842d10bb, tenant_name=BM_9d450733-342f-47c4-9404-4cd96
00100ba_700ec452a61ac477, creds_otherkeys=['user_doc', 'auth_token', 'auth_url', 'image_endpoint', 'provided_tenant', 'tenant_user', 'tenant', 'heat_e
ndpoint', 'tenant_id', 'tenant_password', 'network_endpoint'], openstack_userid=f53ae186e7d9ec70-1c9be200-3f46-415c-a2d0-20cd4377329f: floating ip not
 found




C:\Users\tec12>cf ic ip request
OK
The IP address "169.46.21.20" was obtained.

C:\Users\tec12>cf ic ip bind 169.46.21.20 integration
OK
The IP address was bound successfully.





















'Cloud > Bluemix' 카테고리의 다른 글

111  (0) 2017.03.28
2-1일  (0) 2017.03.27
day2  (0) 2017.03.21
Azure CDN  (0) 2017.03.19
Bluemix essentials  (0) 2017.03.18