forked from ibm-cloud-docs/containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontainer_cli_reference_cfic.html
4698 lines (4610 loc) · 375 KB
/
container_cli_reference_cfic.html
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html><html lang="en-us" xml:lang="en-us">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta name="dcterms.date" content="2017-11-10">
<meta name="dcterms.rights" content="© Copyright IBM Corporation 2014, 2018">
<meta name="description" content="Refer to these commands to create and manage single and scalable containers.">
<meta name="keywords" content="containers, cli, bx ic, commands, reference, options, IBM Containers, cloud foundry, cf, versions, states, status, docker, supported, docker compose, cf ic">
<meta name="geo.country" content="ZZ">
<script>
digitalData = {
page: {
pageInfo: {
language: "en-us",
version: "v18",
ibm: {
country: "ZZ",
type: "CT701"
}
}
}
};
</script><!-- Licensed Materials - Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css">
<title>CLI reference for managing single and scalable containers in IBM Cloud Container Service</title>
</head>
<body><main role="main"><div><article class="nested0" role="article" aria-labelledby="d15041e6" id="container_cli_reference"><h1 class="topictitle1" id="d15041e6">CLI reference for managing <span class="ph">single and scalable containers</span> in <span class="keyword">IBM
Cloud Container Service</span> (Deprecated)</h1>
<div class="abstract"><div class="shortdesc">Refer to these commands to create and manage <span class="ph">single and scalable containers</span>. </div>
<div class="p"><div class="note attention"><span class="attentiontitle">Attention:</span> Single and scalable containers are deprecated. Support
will continue in IBM Cloud Public until 5 December 2017 and in IBM Cloud Local and Dedicated until
20 June 2018. Start using Kubernetes clusters today to deploy secure, highly available apps. <a href="https://www.ibm.com/blogs/bluemix/2017/07/deprecation-single-scalable-group-container-service-bluemix-public/" rel="external" target="_blank" title="(Opens in a new tab or window)">Learn more about Kubernetes and how to migrate your
apps</a>.</div>
</div>
<div class="p">In this
page:<div class="lines"> • <a href="container_cli_reference_cfic.html#container_cli_reference_cfic" title="With the IBM Cloud Container Service plug-in, refer to these commands to create and manage containers."><span class="ph"><samp class="ph codeph">bx ic</samp></span> commands</a><br>
• <a href="container_cli_reference_cfic.html#container_cli_reference_cfic_quick">Quick reference</a><br>
• <a href="container_cli_reference_cfic.html#container_cli_reference_cfic_versions" title="Review the changes associated with each version of the IBM Cloud Container Service plug-in (bx ic). You might be prompted to update the plug-in periodically to use new features.">Version history</a><br>
• <a href="container_cli_reference_cfic.html#container_cli_reference_cfic_states" title="You can view the current container state by running the bx ic inspect command and locating the Status field. The container state can give you additional information about the availability of the container instances and problems that might have occurred.">Container states</a><br>
• <a href="container_cli_reference_cfic.html#container_cli_reference_native-docker" title="With the IBM Cloud Container Service plug-in (bx ic), some docker commands are supported for use in place of bx ic commands. When you log in to the plug-in, configure the environment variables to use the Docker CLI commands. Then, you can run docker commands instead of bx ic commands whenever possible. For example, instead of using bx ic images to see the images in your private Cloud registry, run docker images.">Supported native Docker commands</a><br>
• <a href="container_cli_reference_cfic.html#container_cli_reference_docker-compose" title="Refer to these commands to run and manage your multi-container deployment with the IBM Cloud Container Service plug-in (bx ic).">Docker Compose commands</a><br>
• <a href="container_cli_reference_cfic.html#container_cli_reference_versions">Supported CLIs</a><br>
• <a href="container_cli_reference_cfic.html#container_cli_reference_cfic_deprecated" title="With the IBM Cloud Container Service Cloud Foundry plug-in, refer to these commands to create and manage containers.">(Deprecated) cf ic commands</a><br>
• <a href="container_cli_reference_cfic.html#container_cli_reference_cfic_migrate" title="When you change the deprecated cf ic commands to bx ic commands, note that some multi-word commands are different. For example, some multi-word commands are flipped and some include hyphens (-).">Migrating cf ic to bx ic commands</a></div>
</div>
</div>
<aside role="complementary" aria-labelledby="d15041e6"></aside><article class="topic reference nested1" role="article" aria-labelledby="d15041e238" id="container_cli_reference_cfic"><h2 class="topictitle2" id="d15041e238"><span class="ph" id="title"><span class="keyword">IBM
Cloud Container Service</span> plug-in
(<span class="ph"><samp class="ph codeph">bx ic</samp></span>) commands for managing <span class="ph">single and scalable containers</span></span></h2>
<div class="body refbody" id="refbody"><p class="shortdesc"><span class="ph" id="shortdesc">With the <span class="keyword">IBM
Cloud Container Service</span> plug-in, refer to these commands to
create and manage containers. </span></p>
<div id="container_cli_reference_cfic__section_rrd_4h1_4z"><div class="note note" data-hd-status="deprecated"><span class="notetitle">The cf ic CLI has been deprecated:</span> Instead of using
the <span class="keyword">IBM
Cloud Container Service</span> plug-in for Cloud Foundry
(<samp class="ph codeph">cf ic</samp>), use the <span class="keyword">IBM
Cloud Container Service</span> plug-in for <span class="keyword">Cloud</span>. You can
continue to use the <samp class="ph codeph">cf ic</samp> CLI until 01 January 2018.<div class="p">To start using the <span class="keyword">IBM
Cloud Container Service</span> plug-in for <span class="keyword">Cloud</span> instead, refer to the following topics.<ul><li><a href="https://clis.ng.bluemix.net/ui/home.html" rel="external" target="_blank" title="(Opens in a new tab or window)">Installing
the CLI</a></li>
<li><a href="container_cli_cfic_install.html">Installing the <span class="ph">bx ic</span> plug-in</a></li>
<li><a href="container_cli_reference_cfic.html"><span class="ph">bx ic</span> plug-in reference</a></li>
</ul>
</div>
</div>
You can run any of these commands without any
options to review help information. You can also run <samp class="ph codeph"><span class="ph"><samp class="ph codeph">bx ic</samp></span> --help</samp> to view a list of these
commands.</div><div id="container_cli_reference_cfic__section_o1n_hh1_4z"><div class="p"><div class="tablenoborder"><table summary="" id="container_cli_reference_cfic__cli_service_mgmt" class="defaultstyle"><caption><span class="tablecap">Table 1. Commands for managing the CLI and your service on <span class="keyword">Cloud</span></span></caption><thead><tr><th colspan="4" id="d15041e347" class="thleft">Commands for managing the CLI and your service on <span class="keyword">Cloud</span></th>
</tr>
</thead>
<tbody><tr><td headers="d15041e347 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__info"><span class="ph">bx ic</span> info</a></td>
<td headers="d15041e347 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__init"><span class="ph">bx ic</span> init</a></td>
<td headers="d15041e347 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__namespace"><span class="ph">bx ic</span> namespace</a></td>
<td headers="d15041e347 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__reprovision"><span class="ph">bx ic</span> reprovision</a></td>
</tr>
<tr><td headers="d15041e347 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__unprovision"><span class="ph">bx ic</span> unprovision</a></td>
<td headers="d15041e347 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__upgrade">bx ic update</a></td>
<td headers="d15041e347 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__version">bx ic version</a></td>
<td headers="d15041e347 "> </td>
</tr>
</tbody>
</table>
</div>
</div>
</div><div id="container_cli_reference_cfic__section_p1n_hh1_4z"><div class="p"><div class="tablenoborder"><table summary="" id="container_cli_reference_cfic__container__commands" class="defaultstyle"><caption><span class="tablecap">Table 2. Commands for creating and managing containers on </span></caption><thead><tr><th colspan="5" id="d15041e402" class="thleft">Commands for creating and managing containers on <span class="keyword">Cloud</span></th>
</tr>
</thead>
<tbody><tr><td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__attach"><span class="ph">bx ic</span> attach</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__cp"><span class="ph">bx ic</span> cp</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__exec"><span class="ph">bx ic</span> exec</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__group_create"><span class="ph">bx ic</span> group-create</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__group_inspect"><span class="ph">bx ic</span> group-inspect</a></td>
</tr>
<tr><td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__group_instances"><span class="ph">bx ic</span> group-instances</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__group_rm"><span class="ph">bx ic</span> group-remove</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__group_update"><span class="ph">bx ic</span> group-update</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__groups"><span class="ph">bx ic</span> groups</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__inspect"><span class="ph">bx ic</span> inspect</a></td>
</tr>
<tr><td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__ip_bind"><span class="ph">bx ic</span> ip-bind</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__ip_release"><span class="ph">bx ic</span> ip-release</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__ip_request"><span class="ph">bx ic</span> ip-request</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__ip_unbind"><span class="ph">bx ic</span> ip-unbind</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__ips"><span class="ph">bx ic</span> ips</a></td>
</tr>
<tr><td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__kill"><span class="ph">bx ic</span> kill</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__logs"><span class="ph">bx ic</span> logs</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__pause"><span class="ph">bx ic</span> pause</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__port"><span class="ph">bx ic</span> port</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__ps"><span class="ph">bx ic</span> ps</a></td>
</tr>
<tr><td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__rename"><span class="ph">bx ic</span> rename</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__restart"><span class="ph">bx ic</span> restart</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__rm"><span class="ph">bx ic</span> rm</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__route_map"><span class="ph">bx ic</span> route-map</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__route_unmap"><span class="ph">bx ic</span> route-unmap</a></td>
</tr>
<tr><td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__run"><span class="ph">bx ic</span> run</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__service-bind"><span class="ph">bx ic</span> service-bind</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__service-unbind"><span class="ph">bx ic</span> service-unbind</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__start"><span class="ph">bx ic</span> start</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__stats"><span class="ph">bx ic</span> stats</a></td>
</tr>
<tr><td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__stop"><span class="ph">bx ic</span> stop</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__top"><span class="ph">bx ic</span> top</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__unpause"><span class="ph">bx ic</span> unpause</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__wait"><span class="ph">bx ic</span> wait</a></td>
<td headers="d15041e402 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__wait-status"><span class="ph">bx ic</span> wait-status</a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div><div id="container_cli_reference_cfic__section_q1n_hh1_4z"><div class="p"><div class="tablenoborder"><table summary="" id="container_cli_reference_cfic__image_commands" class="defaultstyle"><caption><span class="tablecap">Table 3. Commands for managing images on <span class="keyword">Cloud</span></span></caption><thead><tr><th colspan="5" id="d15041e606" class="thleft">Commands for managing images on <span class="keyword">Cloud</span></th>
</tr>
</thead>
<tbody><tr><td headers="d15041e606 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__build"><span class="ph">bx ic</span> build</a></td>
<td headers="d15041e606 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__cpi"><span class="ph">bx ic</span> cpi</a></td>
<td headers="d15041e606 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__images"><span class="ph">bx ic</span> images</a></td>
<td headers="d15041e606 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__inspect"><span class="ph">bx ic</span> inspect</a></td>
<td headers="d15041e606 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__namespace"><span class="ph">bx ic</span> namespace-get</a></td>
</tr>
<tr><td headers="d15041e606 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__namespace"><span class="ph">bx ic</span> namespace-set</a></td>
<td headers="d15041e606 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__rmi"><span class="ph">bx ic</span> rmi</a></td>
<td headers="d15041e606 "> </td>
<td headers="d15041e606 "> </td>
<td headers="d15041e606 "> </td>
</tr>
</tbody>
</table>
</div>
</div>
</div><div id="container_cli_reference_cfic__section_r1n_hh1_4z"><div class="p"><div class="tablenoborder"><table summary="" id="container_cli_reference_cfic__volume_commands" class="defaultstyle"><caption><span class="tablecap">Table 4. Commands for storage for containers on <span class="keyword">Cloud</span></span></caption><thead><tr><th colspan="5" id="d15041e668" class="thleft">Commands for storage for containers on <span class="keyword">Cloud</span></th>
</tr>
</thead>
<tbody><tr><td headers="d15041e668 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__volume_create"><span class="ph">bx ic</span> volume-create</a></td>
<td headers="d15041e668 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__volume_fscreate"><span class="ph">bx ic</span> volume-fs-create</a></td>
<td headers="d15041e668 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__volume_fsflavorlist"><span class="ph">bx ic</span> volume-fs-flavors</a></td>
<td headers="d15041e668 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__volume_fsinspect"><span class="ph">bx ic</span> volume-fs-inspect</a></td>
<td headers="d15041e668 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__volume_fslist">bx ic volume-fs</a></td>
</tr>
<tr><td headers="d15041e668 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__volume_fsrm"><span class="ph">bx ic</span> volume-fs-remove</a></td>
<td headers="d15041e668 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__volume_inspect"><span class="ph">bx ic</span> volume-inspect</a></td>
<td headers="d15041e668 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__volume_rm"><span class="ph">bx ic</span> volume-remove</a></td>
<td headers="d15041e668 "><a href="container_cli_reference_cfic.html#container_cli_reference_cfic__volume_list"><span class="ph">bx ic</span> volumes</a></td>
<td headers="d15041e668 "> </td>
</tr>
</tbody>
</table>
</div>
</div>
</div><section role="region" aria-labelledby="d15041e722" id="container_cli_reference_cfic__attach"><h3 class="sectiontitle" id="d15041e722"><samp class="ph codeph"><span class="ph"><samp class="ph codeph">bx ic</samp></span> attach [--no-stdin] [--sig-proxy]</samp> CONTAINER </h3>
<dl><dt class="dlterm">Purpose</dt>
<dd>Control a running container or view its output. Use CTRL+C to exit and stop the container. For
more information, see the <a href="https://docs.docker.com/engine/reference/commandline/attach/" rel="external" target="_blank" title="(Opens in a new tab or window)">attach</a> command in the Docker help.</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm">--no-stdin</dt>
<dd class="pd">(Optional) Do not include the standard input. </dd>
<dt class="pt dlterm">--sig-proxy</dt>
<dd class="pd">(Optional) The default is <span class="keyword option">true</span>.</dd>
<dt class="pt dlterm"><var class="keyword varname">CONTAINER</var></dt>
<dd class="pd">(Required) A container name or ID.</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to attach to the container
<var class="keyword varname">my_container</var>.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> attach <var class="keyword varname">my_container</var></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e783" id="container_cli_reference_cfic__build"><h3 class="sectiontitle" id="d15041e783"><span class="ph"><samp class="ph codeph">bx ic</samp></span> build -t
TAG [--no-cache] [--pull] [-q] DOCKERFILE_LOCATION </h3>
<dl><dt class="dlterm">Purpose</dt>
<dd><span class="ph" id="container_cli_reference_cfic__build_purpose">Build a Docker image locally or in the private <span class="keyword">Cloud</span> images registry.</span> For more
information, see the <a href="https://docs.docker.com/engine/reference/commandline/build/" rel="external" target="_blank" title="(Opens in a new tab or window)">build</a> command in the Docker help.</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm"><a name="container_cli_reference_cfic__build_dockerfile"><!-- --></a><var class="keyword varname">DOCKERFILE_LOCATION</var></dt>
<dd class="pd">(Required) The path to the <span class="ph filepath">Dockerfile</span> and context on the local host.</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__build_nocache"><!-- --></a>--no-cache</dt>
<dd class="pd">(Optional) When an image is built for the first time, the layers for the image are cached for an
entire organization. When you build subsequent versions of the image, these cached versions of the
image are used to speed up the build process. By including the <samp class="ph codeph">--no-cache</samp> option
when you build a new version of the image, you can ensure that each layer of the image is re-built
too.</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__build_pull"><!-- --></a>--pull</dt>
<dd class="pd">(Optional) By default, the base image is only pulled from the registry if it isn't already in
your organization's image cache. By including this option, you can ensure that latest version of the
base image is used to build the new image.</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__build_quiet"><!-- --></a>-q, --quiet</dt>
<dd class="pd">(Optional) Suppress the verbose output that is generated by the containers. The default is
<span class="keyword option">false</span>.</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__build_tag"><!-- --></a>-t <var class="keyword varname">TAG</var>, --tag <var class="keyword varname">TAG</var></dt>
<dd class="pd">(Required) The path to your private images registry to apply to the image that is created.</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd><span class="ph" id="container_cli_reference_cfic__build_example">The following example is a request to build an image that is named
<samp class="ph codeph">myimage</samp>. The <span class="ph filepath">Dockerfile</span> and other artifacts to use in the
build are in the same directory that the command is run from. Because the registry and namespace are
included with the image name, the image is built in your organization's private <span class="keyword">Cloud</span> images registry.</span>
<div class="note tip"><span class="tiptitle">Tip:</span> <span class="ph">Run <samp class="ph codeph"><span class="ph">bx ic</span> namespace-get</samp> to retrieve
your namespace and replace <var class="keyword varname"><my_namespace></var> with your namespace information.</span></div>
<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> build -t registry.<span class="keyword" data-hd-keyref="DomainName">DomainName</span>/<var class="keyword varname"><my_namespace></var>/<var class="keyword varname">myimage</var> .</code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e892" id="container_cli_reference_cfic__cp"><h3 class="sectiontitle" id="d15041e892"><span class="ph"><samp class="ph codeph">bx ic</samp></span> cp SRC_PATH CONTAINER:DEST_PATH | <span class="ph"><samp class="ph codeph">bx ic</samp></span> cp CONTAINER:SRC_PATH DEST_PATH </h3>
<dl><dt class="dlterm">Purpose</dt>
<dd><span class="ph">Copy a file or folder from a running or stopped single container to your local machine and
vice versa. For more information, see the <a href="https://docs.docker.com/engine/reference/commandline/cp/" rel="external" target="_blank" title="(Opens in a new tab or window)">cp</a> command in the Docker help.</span><div class="steps note"><span class="notetitle">Note:</span> This command is supported to be used with single containers
only. When you want to copy files from or to a container group, you must copy the files from or to
each container instance of the group. </div>
</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm">DEST_PATH</dt>
<dd class="pd">(Required) The path to the file or folder on your local machine or container where you want to
copy the information from the source path. The file or folder must exist on your local machine or
the container before you can start copying. If you want to copy to your local machine, you can use
the absolute or relative path. If you want to copy to your single container, <span class="ph" id="container_cli_reference_cfic__cp_container_path">you must include the name of the container, the delimiter <span class="q">":"</span>, and the
path to the destination file or folder. The path must be relative to the root directory of the
container. </span></dd>
</dl>
<dl class="parml"><dt class="pt dlterm">SRC_PATH</dt>
<dd class="pd">(Required) The path to the file or folder that you want to copy. If the file or folder is on
your local machine, you can use the absolute or relative path. If the file or folder is in your
single container, you must include the name of the container, the delimiter <span class="q">":"</span>, and the path
to the file or folder that you want to copy. The path must be relative to the root directory of the
container. <div class="steps note"><span class="notetitle">Note:</span> You cannot copy certain system files that are stored under the
<span class="ph filepath">/dev</span>, <span class="ph filepath">/etc</span>, <span class="ph filepath">/proc</span> and
<span class="ph filepath">/sys</span> folder of your container.</div>
</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>This example command copies a file that is named <span class="ph filepath">config.txt</span> from the
current directory of your local machine to the <span class="ph filepath">config</span> directory of a single
container that is named <var class="keyword varname">my_container</var>.</dd>
<dd class="ddexpand"><pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> cp <span class="ph filepath">./config.txt</span> <span class="ph filepath">my_container:/config</span></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e979" id="container_cli_reference_cfic__cpi"><h3 class="sectiontitle" id="d15041e979"><span class="ph"><samp class="ph codeph">bx ic</samp></span> cpi SRC DST </h3>
<dl><dt class="dlterm">Purpose</dt>
<dd><span class="ph" id="container_cli_reference_cfic__cpi_purpose">Access a Docker Hub image or an image from your local registry and copy it
to your private <span class="keyword">Cloud</span> images
registry.</span><div class="steps note"><span class="notetitle">Note:</span> This command is an alternative to using <samp class="ph codeph">docker pull</samp> and
<samp class="ph codeph">docker push</samp> together to add an image to your <span class="keyword">Cloud</span> images registry. If you prefer to use
<samp class="ph codeph">docker pull</samp> and <samp class="ph codeph">docker push</samp>, see <a href="../services/Registry/registry_images_.html#registry_images_pulling" title="You can pull an image from Docker Hub or your private registry, modify it locally, and push it to your organization's private Cloud registry.">Pushing local images to your private Cloud registry from the command line</a>.</div>
</dd>
<dt class="dlterm">Parameters</dt>
<dd id="container_cli_reference_cfic__cpi_parameters"><dl class="parml"><dt class="pt dlterm">DST</dt>
<dd class="pd">(Required) The private <span class="keyword">Cloud</span>
images registry URL, which includes the namespace, and the destination image name. A tag for the
image is optional.</dd>
</dl>
<dl class="parml"><dt class="pt dlterm">SRC</dt>
<dd class="pd">(Required) The source repository and image name.</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd><pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> cpi <var class="keyword varname">source_repository</var>/<var class="keyword varname">source_image_name</var> <var class="keyword varname">private_registry_URL</var>/<var class="keyword varname">destination_image_name</var>:<var class="keyword varname">tag</var></code></pre>
<div class="note tip"><span class="tiptitle">Tip:</span> <span class="ph">Run <samp class="ph codeph"><span class="ph">bx ic</span> namespace-get</samp> to retrieve
your namespace and replace <var class="keyword varname"><my_namespace></var> with your namespace information.</span></div>
<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> cpi <var class="keyword varname">training/sinatra</var> registry.<span class="keyword" data-hd-keyref="DomainName">DomainName</span>/<var class="keyword varname"><my_namespace></var>/<var class="keyword varname">mysinatra</var>:<var class="keyword varname">v1</var></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e1102" id="container_cli_reference_cfic__exec"><h3 class="sectiontitle" id="d15041e1102"><span class="ph" id="container_cli_reference_cfic__exec_cmd"><span class="ph"><samp class="ph codeph">bx ic</samp></span> exec [-d] [-it] [-u USER] CONTAINER CMD </span></h3>
<dl><dt class="dlterm">Purpose</dt>
<dd>Execute a command within a container. For more information, see the <a href="https://docs.docker.com/engine/reference/commandline/exec/" rel="external" target="_blank" title="(Opens in a new tab or window)">exec</a> command in the Docker help.</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm"><var class="keyword varname">CMD</var></dt>
<dd class="pd">(Required) The command to execute within the container or containers specified.</dd>
</dl>
<dl class="parml"><dt class="pt dlterm"><var class="keyword varname">CONTAINER</var></dt>
<dd class="pd">(Required) A container name or ID.</dd>
</dl>
<dl class="parml"><dt class="pt dlterm">-d , --detach </dt>
<dd class="pd">(Optional) Run the specified command in the background.</dd>
</dl>
<dl class="parml"><dt class="pt dlterm">-it</dt>
<dd class="pd">(Optional) Interactive mode. Keep the standard input display. Type <kbd class="ph userinput">exit</kbd>
to exit.</dd>
</dl>
<dl class="parml"><dt class="pt dlterm">-u <var class="keyword varname">USER</var>, --user <var class="keyword varname">USER</var></dt>
<dd class="pd">(Optional) A user name.</dd>
</dl>
</dd>
<dt class="dlterm">Examples</dt>
<dd><span class="ph" id="container_cli_reference_cfic__exec_example_1">This example command runs an interactive bash terminal in the container
<var class="keyword varname">my_container</var>.</span></dd>
<dd class="ddexpand"><pre class="codeblock" id="container_cli_reference_cfic__exec_example_1_code"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> exec -it <var class="keyword varname">my_container</var> bash</code></pre>
</dd>
<dd class="ddexpand"><span class="ph" id="container_cli_reference_cfic__exec_example_2">This example command runs the date command in the container
<var class="keyword varname">my_container</var>. </span></dd>
<dd class="ddexpand"><pre class="codeblock" id="container_cli_reference_cfic__exec_example_2_code"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> exec <var class="keyword varname">my_container</var> date</code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e1200" id="container_cli_reference_cfic__group_create"><h3 class="sectiontitle" id="d15041e1200"><span class="ph" id="container_cli_reference_cfic__group_create_cmdname"><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-create [--anti] [--auto] [-d DOMAIN] [--desired DESIRED] [-e ENV] [--env-file
ENVFILE]<span class="ph"> [--http_monitor_enabled] [--http_monitor_path] [--http_monitor_rc_list] [--ip
IP_ADDRESS]</span> [-m MEMORY] [--max MAX] [--min MIN] [-n HOST] --name NAME [-p PORT] [--session-affinity] [--volume VOLUME:/DIRECTORY_PATH] IMAGE [CMD] </span></h3>
<dl><dt class="dlterm">Purpose</dt>
<dd><span class="ph" id="container_cli_reference_cfic__group_create_purpose">Create a scaling group.</span> By default, containers in <span class="keyword">Cloud</span> run in detached mode.</dd>
<dt class="dlterm">Parameters</dt>
<dd id="container_cli_reference_cfic__group_create_param"><dl class="parml"><dt class="pt dlterm"><a name="container_cli_reference_cfic__group_create_anti"><!-- --></a>--anti</dt>
<dd class="pd">(Optional) Use anti-affinity to make your container group more highly available. The
<samp class="ph codeph">--anti</samp> option forces every container instance in your group to be placed on a
separate physical compute node, which reduces the odds of all containers in a group crashing due to
a hardware failure. <span class="ph" id="container_cli_reference_cfic__group_create_anti_failure">You might not be able to use this option with
larger group sizes because each <span class="keyword">Cloud</span>
region and organization has a limited set of compute nodes available for deployment. If your
deployment does not succeed, either reduce the number of container instances in the group or remove
the <samp class="ph codeph">--anti</samp> option.</span></dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__group_create_auto"><!-- --></a>--auto</dt>
<dd class="pd">(Optional) <span class="ph">When automatic recovery is enabled for a container group and the group has
been running for 10 minutes, the group's load balancer starts to regularly check the health of each
container instance in the group via HTTP requests. If a container instance does not respond within
100 seconds, it is marked as inactive. Inactive container instances are removed from the group and
re-created by auto-recovery. Auto-recovery attempts to recover container instances in a group 3
times. After the third attempt, auto-recovery does not recover any container instances in the group
for 60 minutes. After 60 minutes, the auto-recovery process starts again.</span> For
more information about the health check, see the <samp class="ph codeph">--http_monitor_enabled</samp> option.</dd>
<dt class="pt dlterm"><var class="keyword varname">CMD</var></dt>
<dd class="pd"><span class="ph" id="container_cli_reference_cfic__group_create_cmd">(Optional) The command and arguments are passed to the container group
to execute. This command must be a long-running command. Do not use a short-lived command, for
example, <span class="keyword cmdname">/bin/date</span>, because it might cause the container to crash.</span><div class="p">Example
long-running commands using the <span class="keyword option">ibmnode</span> image that is provided by <span class="keyword">IBM
Cloud Container Service</span>:<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-create --name <var class="keyword varname">my_container_group</var> registry.<span class="keyword" data-hd-keyref="DomainName">DomainName</span>/<var class="keyword varname">ibmnode</var> ping localhost</code></pre>
<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-create --name <var class="keyword varname">my_container_group</var> registry.<span class="keyword" data-hd-keyref="DomainName">DomainName</span>/<var class="keyword varname">ibmnode</var> -- tail -f /dev/null</code></pre>
<div class="steps note"><span class="notetitle">Note:</span> The
CMD and its arguments must come at the end of the <samp class="ph codeph"><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-create</samp> command
line.</div>
</div>
</dd>
<dt class="pt dlterm">-d <var class="keyword varname">DOMAIN</var>, --domain <var class="keyword varname">DOMAIN</var></dt>
<dd class="pd">(Optional) The default system domain is <samp class="ph codeph"><span class="keyword" data-hd-keyref="APPDomain">AppDomainName</span></samp> and already provides a SSL
certificate, so you can access your container groups with HTTPS without any additional
configuration. To use a custom domain, you must register the custom domain on a public DNS server,
configure the custom domain in <span class="keyword">Cloud</span>,
and then map the custom domain to the <span class="keyword">Cloud</span> system domain on the public DNS server.
After your custom domain is mapped to the <span class="keyword">Cloud</span> system domain, requests for your custom
domain are routed to your application in <span class="keyword">Cloud</span>. When you create a custom domain, do not
include underscores (_) in the domain name. For more information about custom domains, see <a href="../apps/updapps.html">Creating and using a custom
domain</a>. To make your custom domain secure, <a href="../apps/secapps.html#ssl_certificate">upload a SSL
certificate</a>, so your container groups can be accessed with HTTPS. <p>The host and the domain
combined form the full public route URL, such as <samp class="ph codeph">http://mycontainerhost.<span class="keyword" data-hd-keyref="APPDomain">AppDomainName</span></samp> and must be unique within
<span class="keyword">Cloud</span>. When you review the details of
a container group with the <samp class="ph codeph"><span class="ph"><samp class="ph codeph">bx ic</samp></span>
group-inspect</samp> command, the host and the domain are listed together as the route.</p>
</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__group_create_desired"><!-- --></a>--desired <var class="keyword varname">DESIRED</var></dt>
<dd class="pd">(Optional) The number of instances in your group. The default is <span class="keyword option">2</span>. <span class="ph">The number of container group instances that your app requires depends
on the expected workload and the time in which a request can be processed by the app. For example,
multi-tasking or network connectivity affects how many instances might be required for your app.</span>
<span class="ph">To determine the number of desired instances, deploy a single
container in <span class="keyword">Cloud</span> that runs your app
and perform a load test on this container. If the app can handle, for example, 100 requests per
second, but you are expecting an average workload of 300 requests per second, then the desired
number of instances for the container group is 3.</span>
<span class="ph">To make your
container group highly available and more resilient to failure, consider including extra instances
than the minimum to handle the expected workload. Extra instances can handle the workload in case
another instance crashes. To ensure automatic recovery of a failed instance without affecting the
workload, include one extra instance. For protection against two simultaneous failures, include two
extra instances. This set up is an <var class="keyword varname">N+2</var> pattern, where <var class="keyword varname">N</var> is the
number of instances to handle the requests and <var class="keyword varname">+2</var> is an extra two instances.</span><div class="note important"><span class="importanttitle">Important:</span> A container group should include at least 2 container
instances. If you include only 1 instance in the group and that instance becomes unavailable, your
users can experience downtime for the app.</div>
</dd>
<dt class="pt dlterm">-e <var class="keyword varname">ENV</var>, --env <var class="keyword varname">ENV</var></dt>
<dd class="pd"><span class="ph" id="container_cli_reference_cfic__group_create_env">(Optional)<span class="ph" id="container_cli_reference_cfic__group_create_env_desc"> Set the environment variable
where <span class="keyword option">ENV</span> is a <samp class="ph codeph">key=value</samp> pair. List multiple keys separately and
if you include quotation marks, include them around both the environment variable name and the
value. Example: <samp class="ph codeph">-e <span class="q">"<var class="keyword varname">key1</var>=<var class="keyword varname">value1</var>"</span> -e
<span class="q">"<var class="keyword varname">key2</var>=<var class="keyword varname">value2a</var>,<var class="keyword varname">value2b</var>"</span> -e
<span class="q">"<var class="keyword varname">key3</var>=<var class="keyword varname">value3</var>"</span></samp></span></span><div class="p"><div class="tablenoborder"><table summary="" id="container_cli_reference_cfic__env_keys" class="defaultstyle"><caption><span class="tablecap">Table 5. Suggested environment variables</span></caption><thead><tr><th id="d15041e1454" class="thleft">Environment variable</th>
<th id="d15041e1456" class="thleft">Description</th>
</tr>
</thead>
<tbody><tr><td headers="d15041e1454 "><div class="lines"><samp class="ph codeph">CCS_BIND_APP=</samp><br>
<samp class="ph codeph"><var class="keyword varname"><appname></var></samp></div>
</td>
<td headers="d15041e1456 ">Some <span class="keyword">Cloud</span> services do not
support direct binding to a container. In this case, you need to create a Cloud Foundry app and bind
the <span class="keyword">Cloud</span> service to it. Then, you
bind the app to your container by using <samp class="ph codeph">CCS_BIND_APP</samp>. The Cloud Foundry app acts as
a bridge and allows <span class="keyword">Cloud</span> to inject
your bridge app’s VCAP_SERVICES information into the running container instance. </td>
</tr>
<tr><td headers="d15041e1454 "><div class="lines"><samp class="ph codeph">CCS_BIND_SRV=</samp><br>
<samp class="ph codeph"><var class="keyword varname"><service_instance_name1>,</var></samp><br>
<samp class="ph codeph"><var class="keyword varname"><service_instance_name2></var></samp></div>
<div class="steps note"><span class="notetitle">Note:</span> When a service does not support the use of the <samp class="ph codeph">CCS_BIND_SRV=</samp> environment
variable, use <samp class="ph codeph">CCS_BIND_APP=</samp> instead.</div>
</td>
<td headers="d15041e1456 ">To bind a <span class="keyword">Cloud</span> service
directly to a container without using a bridge app, use <samp class="ph codeph">CCS_BIND_SRV</samp>. This binding
allows <span class="keyword">Cloud</span> to inject the
VCAP_SERVICES information into the running container instance. To list multiple <span class="keyword">Cloud</span> services, include them as part of the
same environment variable.</td>
</tr>
<tr><td headers="d15041e1454 "><div class="lines">(Deprecated) <samp class="ph codeph">CCS_SSH_KEY=</samp><br>
<samp class="ph codeph"><var class="keyword varname"><public_ssh_key> </var></samp></div>
</td>
<td headers="d15041e1456 "><div class="note note" data-hd-status="deprecated"><span class="notetitle">This environment variable has been deprecated:</span> Use <span class="ph"><samp class="ph codeph">bx ic</samp></span>
<samp class="ph codeph">exec</samp> or <span class="ph"><samp class="ph codeph">bx ic</samp></span>
<samp class="ph codeph">attach</samp> for external access to your containers instead. For more information, see
<a href="container_security.html#container_cli_login_exec" title="If you must log in to your running container, you can use bx ic exec.">Logging in to a container with exec</a>.</div>
<span class="ph">To add an SSH
key to a container when you create it, you can use <samp class="ph codeph">CCS_API_KEY</samp>.</span></td>
</tr>
<tr><td headers="d15041e1454 "><div class="lines"><samp class="ph codeph">LOG_LOCATIONS=</samp><br>
<samp class="ph codeph"><var class="keyword varname"><path_to_file> </var></samp></div>
</td>
<td headers="d15041e1456 "><span class="ph" id="container_cli_reference_cfic__log_locations_desc">To add a log file to be monitored in the container, include the
<samp class="ph codeph">LOG_LOCATIONS</samp> environment variable with a path to the log file.</span></td>
</tr>
</tbody>
</table>
</div>
Example:<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-create -e CCS_BIND_SRV=<var class="keyword varname"><service_instance_name></var> --name <var class="keyword varname"><container_name></var> registry.<span class="keyword" data-hd-keyref="DomainName">DomainName</span>/<var class="keyword varname"><my_namespace></var>/<var class="keyword varname"><image_name></var></code></pre>
</div>
</dd>
<dt class="pt dlterm">--env-file <var class="keyword varname">ENVFILE</var></dt>
<dd class="pd">(Optional) Import environment variables from a file where <var class="keyword varname">ENVFILE</var> is the path
to your file on your local directory. Every line in the file represents one
<samp class="ph codeph">key=value</samp> pair. <p>Example</p>
<pre class="codeblock"><code>KEY1=VALUE1
KEY2=VALUE2</code></pre>
</dd>
<dt class="pt dlterm">--http_monitor_enabled</dt>
<dd class="pd">(Optional) The default value is <samp class="ph codeph">true</samp>. <span class="ph">When automatic recovery is enabled for a container group and the group has
been running for 10 minutes, the group's load balancer starts to regularly check the health of each
container instance in the group via HTTP requests. If a container instance does not respond within
100 seconds, it is marked as inactive. Inactive container instances are removed from the group and
re-created by auto-recovery. Auto-recovery attempts to recover container instances in a group 3
times. After the third attempt, auto-recovery does not recover any container instances in the group
for 60 minutes. After 60 minutes, the auto-recovery process starts again.</span> Some apps might not
require an HTTP health check, such as an app that uses TCP for communication instead of HTTP. To
disable the HTTP monitor, set the option to <samp class="ph codeph">false</samp>. Example:
<samp class="ph codeph">--http_monitor_enabled=false</samp></dd>
<dt class="pt dlterm">--http_monitor_path</dt>
<dd class="pd">(Optional) The default value is <samp class="ph codeph">/</samp>. When <samp class="ph codeph">--http_monitor_enabled</samp>
is enabled, you can use this option to set a custom path for the health check, such as
<samp class="ph codeph">--http_monitor_path=<span class="q">"/health/path"</span></samp>.</dd>
<dt class="pt dlterm">--http_monitor_rc_list</dt>
<dd class="pd">(Optional) When <samp class="ph codeph">--http_monitor_enabled</samp> is enabled, you can specify the list of
response codes for the health check. The default value includes the <samp class="ph codeph">200, 201, 202, 204, 300,
301, 302, 401, 403,</samp> and <samp class="ph codeph">404</samp> codes. Any response not in the list of valid
responses changes the container instance's state to <samp class="ph codeph">INACTIVE</samp> by the load balancer.
An inactive container does not receive any load and the state of the container group changes to
HAS_INACTIVE_INSTANCES. If none of the containers are <samp class="ph codeph">ACTIVE</samp>, then the state of the
container group changes to <samp class="ph codeph">NO_ACTIVE_INSTANCES</samp>. To learn more about states, see
<a href="container_cli_reference_cfic.html#container_cli_reference_cfic_states" title="You can view the current container state by running the bx ic inspect command and locating the Status field. The container state can give you additional information about the availability of the container instances and problems that might have occurred.">Container states in IBM Cloud Container Service</a>.</dd>
<dt class="pt dlterm"><var class="keyword varname">IMAGE</var></dt>
<dd class="pd"><span class="ph" id="container_cli_reference_cfic__group_create_image">(Required) The image to include in each container instance in the
container group. You can list commands after the image, but do not put any options after the image;
include all options before you specify an image.</span><p>If you are using an image in your
organization's private <span class="keyword">Cloud</span> images
registry, specify the image in the following format: <samp class="ph codeph">registry.<span class="keyword" data-hd-keyref="DomainName">DomainName</span>/<var class="keyword varname">NAMESPACE</var>/<var class="keyword varname">IMAGE</var></samp></p>
<p>If you are using an image
that is provided by <span class="keyword">IBM
Cloud Container Service</span>, do not
include your organization's namespace. Specify the image in the following format:
<samp class="ph codeph">registry.<span class="keyword" data-hd-keyref="DomainName">DomainName</span>/<var class="keyword varname">IMAGE</var></samp></p>
</dd>
<dt class="pt dlterm"> --ip <var class="keyword varname">IP_ADDRESS</var></dt>
<dd class="pd">(Optional) If you have an available IP address, bind a public IP address to your container
group. You must also expose the port with the <samp class="ph codeph">-p</samp> flag. A container group can have
either a public route or a public IP address but not both. To unbind the IP address and return the
IP to the space's quota, remove the container group and recreate the group without the IP address.
To request an IP address prior to creating a container group, run <samp class="ph codeph"><span class="ph"><samp class="ph codeph">bx ic</samp></span> ip-request</samp>.<div class="steps note"><span class="notetitle">Note:</span> Binding a public IP
address does not include a SSL certificate which encrypts the data that are sent to and from your
container group. If your app requires SSL encryption, you can either implement your own SSL solution
or map a public route to your container group instead of binding a public IP address. Public routes
already include a SSL certificate, so you can access your container group with HTTPS without any
additional configuration.</div>
</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__group_create_memory"><!-- --></a>-m <var class="keyword varname">MEMORY</var>, --memory <var class="keyword varname">MEMORY</var></dt>
<dd class="pd">(Optional) <span class="ph" id="container_cli_reference_cfic__memory_desc">Enter a memory limit for your container in MB. The memory limit
is part of the container size that defines the maximum amount of memory and disk space a container
gets on the compute host during runtime. After a container size is assigned, the value cannot be
changed.</span> Available sizes in <span class="keyword">IBM
Cloud Container Service</span> are: <ul data-hd-audience="yellow" id="container_cli_reference_cfic__ul_s1n_hh1_4z"><li>Pico (64 MB memory, 4 GB disk space)</li>
<li>Nano (128 MB memory, 8 GB disk space)</li>
<li>Micro (256 MB memory, 16 GB disk space)</li>
<li>Tiny (512 MB memory, 32 GB disk space)</li>
<li>Small (1024 MB memory, 64 GB disk space)</li>
<li>Medium (2048 MB memory, 128 GB disk space)</li>
<li>Large (4096 MB memory, 256 GB disk space)</li>
<li>X-Large (8192 MB memory, 512 GB disk space)</li>
<li>2X-Large (16384 MB memory, 1 TB disk space) </li>
</ul>
If you do not set a size for your container, each container instance is created with
<span class="keyword option">256</span> MB. <div class="note important"><span class="importanttitle">Important:</span> Enter the container memory in MB without the unit
label. For example, if you want to create a pico container, enter <samp class="ph codeph">-m 64</samp>.</div>
</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__group_create_max"><!-- --></a>--max <var class="keyword varname">MAX</var></dt>
<dd class="pd">(Optional) The maximum number of instances. The default is <span class="keyword option">2</span>.</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__group_create_min"><!-- --></a>--min <var class="keyword varname">MIN</var></dt>
<dd class="pd">(Optional) The minimum number of instances. The default is <span class="keyword option">1</span>.</dd>
<dt class="pt dlterm"> -n <var class="keyword varname">HOST</var>, --hostname <var class="keyword varname">HOST</var></dt>
<dd class="pd">(Optional) The host name, such as <var class="keyword varname">mycontainerhost</var>. Do not include underscores
(_) in the host name. The host and the domain combined form the full public route URL, such as
<samp class="ph codeph">http://mycontainerhost.<span class="keyword" data-hd-keyref="APPDomain">AppDomainName</span></samp>. When you review the details of a container group with the <samp class="ph codeph"><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-inspect</samp> command, the host and
the domain are listed together as the route.</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__group_create_name"><!-- --></a>--name <var class="keyword varname">NAME</var></dt>
<dd class="pd">(Required) Assign a name to the group. <samp class="ph codeph">-n</samp> is deprecated.<div class="note tip" id="container_cli_reference_cfic__container_name"><span class="tiptitle">Tip:</span> The container name must start with a letter, and then can include
uppercase letters, lowercase letters, numbers, periods (.), underscores (_), or hyphens
(-).</div>
</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__group_create_port"><!-- --></a>-p <var class="keyword varname">PORT</var>, --publish <var class="keyword varname">PORT</var></dt>
<dd class="pd"><p>(Required) Expose the port for HTTP and private network traffic. If you do not expose a port,
the container group runs, but the container group cannot be accessed through the group load balancer
on either the public or private network.</p>
<p>For container groups, you cannot include multiple
ports. If multiple ports are listed, only the last listed port is exposed. The other ports are
ignored by the command. </p>
<span class="ph" id="container_cli_reference_cfic__https">When you bind a route, containers in your group must
listen for HTTP traffic on the group's exposed port. Non-HTTP ports cannot be exposed publicly. When
HTTPS traffic arrives on the exposed port, the (Go)Router completes the HTTPS termination. Then, the
HTTP protocol is used on the private virtual network between the (Go)Router and the containers. </span>
<span class="ph">When you bind an IP address, containers in your group can listen for HTTP or
HTTPs traffic, but you can still expose only one port.</span><div class="p">If a port is specified in the Dockerfile for the image that you are using, include
that port.<div class="note tip"><span class="tiptitle">Tip:</span> <ul id="container_cli_reference_cfic__d10229e232"><li>For the IBM certified Liberty Server image or a modified
version of this image, enter the port <kbd class="ph userinput">9080</kbd>.</li>
<li>For the IBM certified Node.js image or a modified version
of this image, enter any port, such as port <kbd class="ph userinput">8000</kbd>.</li>
</ul>
</div>
</div>
</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__session_affinity"><!-- --></a>--session_affinity</dt>
<dd class="pd"><p>(Optional) The default value is <samp class="ph codeph">false</samp>. When
<samp class="ph codeph">--http_monitor_enabled</samp> is set to <kbd class="ph userinput">true</kbd>, you can set the
<samp class="ph codeph">--session_affinity</samp> option to <kbd class="ph userinput">true</kbd> to allow <span class="keyword">IBM
Cloud Container Service</span> to create and manage a session cookie on
behalf of the app. This option is not available if <samp class="ph codeph">--http_monitor_enabled</samp> is set to
<kbd class="ph userinput">false</kbd> or if you are using TCP for communication instead of HTTP. </p>
</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__group_create_volume"><!-- --></a>--volume <var class="keyword varname">VOLUME</var>:<var class="keyword varname">/DIRECTORY_PATH</var>[:ro]</dt>
<dd class="pd">(Optional) Attach a volume to a container by specifying the details in the following format
<samp class="ph codeph">VOLUME:/DIRECTORY_PATH[:ro]</samp>.<ul id="container_cli_reference_cfic__ul_u1n_hh1_4z"><li><var class="keyword varname">VOLUME</var>: The volume ID or name.</li>
<li><var class="keyword varname">DIRECTORY_PATH</var>: The absolute path to the directory in the container.</li>
<li><samp class="ph codeph">ro</samp>: Optional. Specifying <samp class="ph codeph">ro</samp> makes the volume read-only instead
of the default read/write.</li>
</ul>
</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to create a scaling group with a public
route.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-create --auto -d <span class="keyword" data-hd-keyref="APPDomain">AppDomainName</span> -n <var class="keyword varname">mycontainerhost</var> --name <var class="keyword varname">my_container_group</var> -p <var class="keyword varname">9080</var> registry.<span class="keyword" data-hd-keyref="DomainName">DomainName</span>/<var class="keyword varname">ibmliberty</var></code></pre>
</dd>
<dd class="ddexpand">The following example is a request to create a scaling group with a public IP
address.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-create --auto --ip <var class="keyword varname">198.51.100.27</var> --name <var class="keyword varname">my_container_group</var> -p <var class="keyword varname">9080</var> registry.<span class="keyword" data-hd-keyref="DomainName">DomainName</span>/<var class="keyword varname">ibmliberty</var></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2010" id="container_cli_reference_cfic__group_inspect"><h3 class="sectiontitle" id="d15041e2010"><span class="ph" id="container_cli_reference_cfic__group_inspect_cmdname"><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-inspect GROUP </span></h3>
<dl><dt class="dlterm">Purpose</dt>
<dd id="container_cli_reference_cfic__group_inspect_purpose">See the detailed information that was specified for a container group
when it was created, such as the environment variables, ports, or memory. Also, run this command to
see the public route that is assigned to the group.</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm"><a name="container_cli_reference_cfic__group_inspect_group"><!-- --></a><var class="keyword varname">GROUP</var></dt>
<dd class="pd">(Required) The group ID or name.</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to inspect the group
<var class="keyword varname">my_container_group</var>.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-inspect <var class="keyword varname">my_container_group</var></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2050" id="container_cli_reference_cfic__group_instances"><h3 class="sectiontitle" id="d15041e2050"><span class="ph" id="container_cli_reference_cfic__group_instances_cmdname"><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-instances GROUP </span></h3>
<dl><dt class="dlterm">Purpose</dt>
<dd id="container_cli_reference_cfic__group_instances_purpose">List all containers with their ID, name, IP address and public port
that are part of a container group.</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm"><var class="keyword varname">GROUP</var></dt>
<dd class="pd">(Required) The group ID or name.</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to retrieve all containers of the group
<var class="keyword varname">my_container_group</var>.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-instances <var class="keyword varname">my_container_group</var></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2090" id="container_cli_reference_cfic__group_rm"><h3 class="sectiontitle" id="d15041e2090"><span class="ph" id="container_cli_reference_cfic__group_remove_cmdname"><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-remove [-f] GROUP [GROUP]</span></h3>
<dl><dt class="dlterm">Purpose</dt>
<dd id="container_cli_reference_cfic__group_rm_purpose">Remove one or more container groups from a space.</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm"><a name="container_cli_reference_cfic__group_rm_force"><!-- --></a>-f, --force</dt>
<dd class="pd">(Optional) Forces the removal of a running or failed container.</dd>
</dl>
<dl class="parml"><dt class="pt dlterm"><a name="container_cli_reference_cfic__group_rm_group"><!-- --></a>GROUP</dt>
<dd class="pd">(Required) The group ID or name of at least one container group.</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to remove a container group, where
<var class="keyword varname">my_container_group</var> is the name of the
group.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-remove <var class="keyword varname">my_container_group</var></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2136" id="container_cli_reference_cfic__group_update"><h3 class="sectiontitle" id="d15041e2136"><span class="ph" id="container_cli_reference_cfic__group_update_cmdname"><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-update [--desired DESIRED] [-e
<span class="q">"<var class="keyword varname">KEY</var>=<var class="keyword varname">VALUE</var>"</span>]<span class="ph"> [--max MAX] [--min
MIN]</span> GROUP </span></h3>
<dl><dt class="dlterm">Purpose</dt>
<dd id="container_cli_reference_cfic__group_update_purpose">Use the <samp class="ph codeph"><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-update</samp> command to perform the
following updates on your group. <ul id="container_cli_reference_cfic__ul_v1n_hh1_4z"><li>Update the desired number of instances that run in your container group.</li>
<li>Add new environment variables to the group. </li>
<li>Update the value of an existing environment variable.</li>
</ul>
<div class="steps note"><span class="notetitle">Note:</span> You can perform one update at a time only.</div>
</dd>
<dd class="ddexpand"><div class="note tip"><span class="tiptitle">Tip:</span> To update the host name or domain for a container group, use <a href="container_cli_reference_cfic.html#container_cli_reference_cfic__route_map">bx ic route-map [-d DOMAIN] [-n HOST] GROUP</a>.</div>
</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml" id="container_cli_reference_cfic__group_update_parameters"><dt class="pt dlterm">--desired <var class="keyword varname">DESIRED</var></dt>
<dd class="pd">(Optional) The number of instances that you require. The default is <span class="keyword option">2</span>.</dd>
<dt class="pt dlterm">-e <span class="q">"<var class="keyword varname">KEY</var>=<var class="keyword varname">VALUE</var>"</span></dt>
<dd class="pd">(Optional) Add a new environment variable to the container group or change the value of an
existing environment variable. </dd>
<dt class="pt dlterm">--max <var class="keyword varname">MAX</var></dt>
<dd class="pd">(Optional) The maximum number of instances. The default is <span class="keyword option">2</span>.</dd>
<dt class="pt dlterm">--min <var class="keyword varname">MIN</var></dt>
<dd class="pd">(Optional) The minimum number of instances. The default is <span class="keyword option">1</span>.</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to update the desired number of container instances in a
container group named
<var class="keyword varname">my_container_group</var>.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-update --desired <var class="keyword varname">5</var> <var class="keyword varname">my_container_group</var></code></pre>
</dd>
<dd class="ddexpand">The following example is a request to add a new environment variable
<var class="keyword varname">environment</var> with the value <var class="keyword varname">Linux</var> to a container group that is
named
<var class="keyword varname">my_container_group</var>.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-update -e <span class="q">"<var class="keyword varname">environment</var>=<var class="keyword varname">Linux</var>"</span> <var class="keyword varname">my_container_group</var></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2271" id="container_cli_reference_cfic__groups"><h3 class="sectiontitle" id="d15041e2271"><span class="ph" id="container_cli_reference_cfic__group_list_cmdname"><span class="ph"><samp class="ph codeph">bx ic</samp></span> groups [-q] </span></h3>
<dl><dt class="dlterm">Purpose</dt>
<dd id="container_cli_reference_cfic__group_list_purpose">List the container groups in a space.</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm">-q</dt>
<dd class="pd">(Optional) List the container group ID of each container group only. </dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd><pre class="codeblock"><code><span class="ph"><span class="ph"><samp class="ph codeph">bx ic</samp></span> groups [-q] </span></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2305" id="container_cli_reference_cfic__images"><h3 class="sectiontitle" id="d15041e2305"><span class="ph"><samp class="ph codeph">bx ic</samp></span> images [-a] [-f CONDITION] [--no-trunc] [q]</h3>
<dl><dt class="dlterm">Purpose</dt>
<dd>See a list of all the available images in the organization's private <span class="keyword">Cloud</span> images registry. For more information,
see the <a href="https://docs.docker.com/engine/reference/commandline/images" rel="external" target="_blank" title="(Opens in a new tab or window)">images</a> command in the Docker help.</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm">-a, --all</dt>
<dd class="pd">(Optional) Includes all of the image layers for each image in your organization's registry, not
just the most recent layer.</dd>
</dl>
<dl class="parml"><dt class="pt dlterm">-f, --filter <var class="keyword varname">CONDITION</var></dt>
<dd class="pd">(Optional) Filter the list of images by the condition provided.</dd>
</dl>
<dl class="parml"><dt class="pt dlterm">--no-trunc</dt>
<dd class="pd">(Optional) Do not truncate the output.</dd>
</dl>
<dl class="parml"><dt class="pt dlterm">-q, --quiet</dt>
<dd class="pd">(Optional) Display the numeric IDs only.</dd>
</dl>
</dd>
<dt class="dlterm"><a name="container_cli_reference_cfic__images_responses"><!-- --></a>Responses</dt>
<dd>You receive a list of images that includes the image ID, the created date, and the image
name.</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to receive a list of available images for the
organization.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> images</code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2373" id="container_cli_reference_cfic__info"><h3 class="sectiontitle" id="d15041e2373"><samp class="ph codeph"><span class="ph"><samp class="ph codeph">bx ic</samp></span> info [--json]</samp></h3>
<dl><dt class="dlterm"><a name="container_cli_reference_cfic__info_purpose"><!-- --></a>Purpose</dt>
<dd>Receive a set of information that describes the state of the container cloud service
instance.</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm"><var class="keyword varname">--json</var></dt>
<dd class="pd">(Optional) Structure the output of the command in JSON format.</dd>
</dl>
</dd>
<dt class="dlterm"><a name="container_cli_reference_cfic__info_responses"><!-- --></a>Responses</dt>
<dd>You receive a readout that includes information about the containers limit, containers usage,
containers that are running, memory limit, memory usage, floating IP limit, floating IP usage, CCS
host URL, registry host URL, and debug mode status.</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to receive information about the container cloud service
instance.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> info</code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2413" id="container_cli_reference_cfic__init"><h3 class="sectiontitle" id="d15041e2413"><span class="ph"><span class="ph"><samp class="ph codeph">bx ic</samp></span> init </span></h3>
<dl><dt class="dlterm">Purpose</dt>
<dd>Initialize the <span class="keyword">IBM
Cloud Container Service</span> CLI. <div class="steps note" id="container_cli_reference_cfic__login_prereq"><span class="notetitle">Note:</span> Before logging in, you must ensure that the Cloud Foundry command tool (cf) is
installed, as well as the Docker CLI (docker), and that they are both configured in your environment
path.</div>
<div class="note tip" id="container_cli_reference_cfic__region"><span class="tiptitle">Tip:</span> To switch to another region, specify the API endpoint for
that region when you log in to the Cloud Foundry CLI, not the <span class="keyword">IBM
Cloud Container Service</span> CLI.<ul id="container_cli_reference_cfic__ul_zc3_dxl_nz"><li>US South:<pre class="codeblock"><code>bx login -a api.ng.bluemix.net</code></pre>
</li>
<li>United Kingdom:<pre class="codeblock"><code>bx login -a api.eu-gb.bluemix.net</code></pre>
</li>
</ul>
</div>
</dd>
<dt class="dlterm">Example</dt>
<dd><pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> init</code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2465" id="container_cli_reference_cfic__inspect"><h3 class="sectiontitle" id="d15041e2465"><span class="ph" id="container_cli_reference_cfic__inspect_cmdname"><span class="ph"><samp class="ph codeph">bx ic</samp></span> inspect [IMAGE | images | CONTAINER] </span></h3>
<dl><dt class="dlterm">Purpose</dt>
<dd><span class="ph" id="container_cli_reference_cfic__inspect_purpose">Retrieve information about one or more containers or container
images.</span> Only one of IMAGE, images, or CONTAINER options can be specified at a time. For more
information, see the <a href="https://docs.docker.com/engine/reference/commandline/inspect" rel="external" target="_blank" title="(Opens in a new tab or window)">inspect</a> command in the Docker help.</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm"><a name="container_cli_reference_cfic__inspect_container"><!-- --></a><var class="keyword varname">CONTAINER</var></dt>
<dd class="pd">(Required) Get detailed information about a specific container by specifying the container name
or ID. You can retrieve information for multiple containers by listing their names or IDs in the
command with a space in between. </dd>
</dl>
<dl class="parml"><dt class="pt dlterm"><var class="keyword varname">IMAGE</var></dt>
<dd class="pd">(Required) Get detailed information about a specific image by specifying the full private
<span class="keyword">Cloud</span> registry path to your image.
You can retrieve information for multiple images by listing each registry path in the command with a
space in between </dd>
</dl>
<dl class="parml"><dt class="pt dlterm">images</dt>
<dd class="pd">(Required) Get detailed information about all of the images in your registry.</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to inspect a container that is named
<kbd class="ph userinput">my_container</kbd>.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> inspect <var class="keyword varname">my_container</var></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2529" id="container_cli_reference_cfic__ip_bind"><h3 class="sectiontitle" id="d15041e2529"><span class="ph"><samp class="ph codeph">bx ic</samp></span> ip-bind ADDRESS CONTAINER </h3>
<dl><dt class="dlterm"><a name="container_cli_reference_cfic__bind_purpose"><!-- --></a>Purpose</dt>
<dd>Bind an available floating IP address to a single container. <div class="steps note"><span class="notetitle">Note:</span> To bind a
floating IP address to a container group, use the <samp class="ph codeph">--ip</samp> flag in the <a href="container_cli_reference_cfic.html#container_cli_reference_cfic__group_create"><samp class="ph codeph"><span class="ph"><samp class="ph codeph">bx ic</samp></span> group-create</samp></a> command.</div>
</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm"><a name="container_cli_reference_cfic__bind_address"><!-- --></a><var class="keyword varname">ADDRESS</var></dt>
<dd class="pd">(Required) The IP address to bind to the single container.</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__bind_container"><!-- --></a><var class="keyword varname">CONTAINER</var></dt>
<dd class="pd">(Required) The container ID or name to bind to the IP address.</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to bind the IP address 192.0.2.23 to the container with name
<var class="keyword varname">my_container</var>.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> ip-bind <var class="keyword varname">192.0.2.23</var> <var class="keyword varname">my_container</var></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2589" id="container_cli_reference_cfic__ip_release"><h3 class="sectiontitle" id="d15041e2589"><span class="ph"><samp class="ph codeph">bx ic</samp></span> ip-release ADDRESS </h3>
<dl><dt class="dlterm"><a name="container_cli_reference_cfic__ip_release_purpose"><!-- --></a>Purpose</dt>
<dd>Release a floating IP address. After a floating IP address is released, it cannot be bound to a
single container or container group in the space. </dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm"><a name="container_cli_reference_cfic__ip_release_address"><!-- --></a><var class="keyword varname">ADDRESS</var></dt>
<dd class="pd">(Required) The IP address to release.</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to release the IP address
192.0.2.23<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> ip-release <var class="keyword varname">192.0.2.23</var></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2626" id="container_cli_reference_cfic__ip_request"><h3 class="sectiontitle" id="d15041e2626"><span class="ph"><samp class="ph codeph">bx ic</samp></span> ip-request [-q]</h3>
<dl><dt class="dlterm"><a name="container_cli_reference_cfic__ip_request_purpose"><!-- --></a>Purpose</dt>
<dd>Request a new floating IP.</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm">-q</dt>
<dd class="pd">(Optional) Only the IP address is displayed in the command output. No message text is
included.</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request for a new floating IP
address.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> ip-request</code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2659" id="container_cli_reference_cfic__ip_unbind"><h3 class="sectiontitle" id="d15041e2659"><span class="ph"><samp class="ph codeph">bx ic</samp></span> ip-unbind ADDRESS CONTAINER </h3>
<dl><dt class="dlterm"><a name="container_cli_reference_cfic__ip_unbind_purpose"><!-- --></a>Purpose</dt>
<dd>Unbind a floating IP address from a single container. <div class="steps note"><span class="notetitle">Note:</span> To unbind the IP
address from a container group, remove the container group and recreate the group without the IP
address.</div>
</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm"><a name="container_cli_reference_cfic__ip_unbind_address"><!-- --></a><var class="keyword varname">ADDRESS</var></dt>
<dd class="pd">(Required) The IP address that is being unbound.</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__ip_unbind_container"><!-- --></a><var class="keyword varname">CONTAINER</var></dt>
<dd class="pd">(Required) The container ID or name that is being unbound.</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to unbind the IP address 192.0.2.23 from the container with
name
<var class="keyword varname">my_container</var>.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> ip-unbind <var class="keyword varname">192.0.2.23</var> <var class="keyword varname">my_container</var></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2709" id="container_cli_reference_cfic__ips"><h3 class="sectiontitle" id="d15041e2709"><span class="ph"><samp class="ph codeph">bx ic</samp></span> ips [-q] </h3>
<dl><dt class="dlterm"><a name="container_cli_reference_cfic__ip_list_purpose"><!-- --></a>Purpose</dt>
<dd>List the available floating IP addresses for the organization and the IDs for the single
containers or groups that are bound to those IP addresses.</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm">-q</dt>
<dd class="pd">(Optional) List only the IP addresses, without the IDs for the single containers that are bound
to those IP addresses.</dd>
</dl>
</dd>
<dt class="dlterm"><a name="container_cli_reference_cfic__ip_list_responses"><!-- --></a>Responses</dt>
<dd>You receive a list of IP addresses and the ID of the single container they are linked to. If the
IP address is unused, no container ID is shown.</dd>
<dt class="dlterm">Example</dt>
<dd><span class="ph" id="container_cli_reference_cfic__ip_list_example">The following example is a request to receive a list of all IP
addresses for the organization, whether they are available to use or
not.</span><pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> ip-list -q</code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2748" id="container_cli_reference_cfic__kill"><h3 class="sectiontitle" id="d15041e2748"><span class="ph"><samp class="ph codeph">bx ic</samp></span> kill [-s
CMD] CONTAINER [CONTAINER] </h3>
<dl><dt class="dlterm">Purpose</dt>
<dd>Stop a running process in one or more containers without stopping the container. For more
information, see the <a href="https://docs.docker.com/engine/reference/commandline/kill/" rel="external" target="_blank" title="(Opens in a new tab or window)">kill</a> command in the Docker help.</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm"><var class="keyword varname">CONTAINER</var></dt>
<dd class="pd">(Required) The container ID or name of at least one container. You can run this command with
multiple containers by listing their names or IDs in the command with a space in between.</dd>
<dt class="pt dlterm">-s, --signal <var class="keyword varname">CMD</var></dt>
<dd class="pd">(Optional) Send any command to the process that is running in the container.</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to kill the process in a container that is named
<var class="keyword varname">my_container</var>.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> kill <var class="keyword varname">my_container</var></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2797" id="container_cli_reference_cfic__logs"><h3 class="sectiontitle" id="d15041e2797"><span class="ph"><samp class="ph codeph">bx ic</samp></span> logs [-f | --since TIMESTAMP | --tail
STRING | -t] CONTAINER </h3>
<dl><dt class="dlterm">Purpose</dt>
<dd><span class="ph" id="container_cli_reference_cfic__logs_purpose">Show the output or error logs for a running container.</span> For more
information, see the <a href="https://docs.docker.com/engine/reference/commandline/logs" rel="external" target="_blank" title="(Opens in a new tab or window)">logs</a> command in the Docker help.</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm"><a name="container_cli_reference_cfic__logs_container"><!-- --></a><var class="keyword varname">CONTAINER</var></dt>
<dd class="pd">(Required) The container name or ID.</dd>
<dt class="pt dlterm">-f, --follow</dt>
<dd class="pd"><p>(Optional) Include new output from the <samp class="ph codeph">STDOUT</samp> and <samp class="ph codeph">STDERR</samp> log
files for the container.</p>
</dd>
<dt class="pt dlterm">--since TIMESTAMP</dt>
<dd class="pd">(Optional) Show all logs since the timestamp. </dd>
<dt class="pt dlterm">--tail STRING</dt>
<dd class="pd">(Optional) Specify the number of the most recent lines of logs to show. The default is to show
all logs.</dd>
<dt class="pt dlterm">-t, --timestamps</dt>
<dd class="pd">(Optional) Display timestamps on the logs.</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to get the output log for a container that is named
<var class="keyword varname">my_container</var>.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> logs -o <var class="keyword varname">my_container</var></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2868" id="container_cli_reference_cfic__namespace"><h3 class="sectiontitle" id="d15041e2868"><span class="ph"><samp class="ph codeph">bx ic</samp></span> namespace-[get | set] NAME</h3>
<dl><dt class="dlterm"><a name="container_cli_reference_cfic__namespace_purpose"><!-- --></a>Purpose</dt>
<dd>Set or retrieve the name of the private <span class="keyword">Cloud</span> image registry for the organization that
the user has logged in with. </dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm"><a name="container_cli_reference_cfic__namespace_get"><!-- --></a>get</dt>
<dd class="pd">(Optional) Request the namespace for your organization's private images registry.</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__namespace_set"><!-- --></a>set <var class="keyword varname">NAME</var></dt>
<dd class="pd">(Optional) A one-time only function to set the namespace for your organization's private image
registry, if it is not already set. After you set the namespace, log out and in to the <span class="keyword">IBM
Cloud Container Service</span> CLI before you continue. <div class="note restriction"><span class="restrictiontitle">Restriction:</span> You cannot use a hyphen (-) in the name of your registry namespace.</div>
</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to query the namespace for the organization that the user
logged in
to.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> namespace-get</code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2922" id="container_cli_reference_cfic__pause"><h3 class="sectiontitle" id="d15041e2922"><span class="ph"><samp class="ph codeph">bx ic</samp></span> pause CONTAINER [CONTAINER] </h3>
<dl><dt class="dlterm">Purpose</dt>
<dd><span class="ph" id="container_cli_reference_cfic__pause_purpose">Pause all processes within one or more running containers.</span> For more
information, see the <a href="https://docs.docker.com/engine/reference/commandline/pause" rel="external" target="_blank" title="(Opens in a new tab or window)">pause</a> command in the Docker help. To start the container again, run the <a href="container_cli_reference_cfic.html#container_cli_reference_cfic__unpause">unpause</a> command.</dd>
<dt class="dlterm">Parameters</dt>
<dd><dl class="parml"><dt class="pt dlterm"><a name="container_cli_reference_cfic__pause_container"><!-- --></a><var class="keyword varname">CONTAINER</var></dt>
<dd class="pd">(Required) The container name or ID of at least one container. You can run this command with
multiple containers by listing their names or IDs in the command with a space in between.</dd>
</dl>
</dd>
<dt class="dlterm">Example</dt>
<dd>The following example is a request to pause a container that is named
<var class="keyword varname">my_container</var>.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> pause <var class="keyword varname">my_container</var></code></pre>
</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e2969" id="container_cli_reference_cfic__port"><h3 class="sectiontitle" id="d15041e2969"><span class="ph" id="container_cli_reference_cfic__port_cmdname"><span class="ph"><samp class="ph codeph">bx ic</samp></span> port
CONTAINER</span> [PRIVATE_PORT[/PROTOCOL]]</h3>
<dl><dt class="dlterm">Purpose</dt>
<dd><span class="ph" id="container_cli_reference_cfic__port_purpose">List all port mappings for a container or retrieve the public port and IP
address that is mapped to your private port. </span>For more information, see the <a href="https://docs.docker.com/engine/reference/commandline/port" rel="external" target="_blank" title="(Opens in a new tab or window)">port</a> command in the Docker help.</dd>
</dl>
<dl><dt class="dlterm">Parameters</dt>
<dd id="container_cli_reference_cfic__port_param"><dl class="parml"><dt class="pt dlterm"><var class="keyword varname">CONTAINER</var></dt>
<dd class="pd">(Required) The container ID or name.</dd>
<dt class="pt dlterm"><var class="keyword varname">PRIVATE PORT</var></dt>
<dd class="pd">(Optional) The private port for which you want to look up the assigned public port and IP
address. </dd>
<dt class="pt dlterm"><var class="keyword varname">PROTOCOL</var></dt>
<dd class="pd">(Optional) The protocol that was assigned to your private port. It can be either
<var class="keyword varname">tcp</var> or <var class="keyword varname">udp</var>.</dd>
</dl>
</dd>
</dl>
<dl><dt class="dlterm">Example</dt>
<dd id="container_cli_reference_cfic__port_example">The following example is a request to list all port and IP mappings for a
container that is named
<var class="keyword varname">my_container</var>.<pre class="codeblock"><code><span class="ph"><samp class="ph codeph">bx ic</samp></span> port <var class="keyword varname">my_container</var></code></pre>
</dd>
<dt class="dlterm">System Output</dt>
<dd><pre class="codeblock"><code><samp class="ph systemoutput">9080/tcp -> 192.0.2.25:9080</samp></code></pre>
</dd>
<dd class="ddexpand">In this example, <samp class="ph systemoutput">9080/tcp</samp> is your private port that is using the
TCP/IP protocol. It is mapped to the public IP address <samp class="ph systemoutput">192.0.2.25</samp> and
public port <samp class="ph systemoutput">9080</samp>.</dd>
</dl>
</section><section role="region" aria-labelledby="d15041e3055" id="container_cli_reference_cfic__ps"><h3 class="sectiontitle" id="d15041e3055"><span class="ph" id="container_cli_reference_cfic__ps_cmdname"><span class="ph"><samp class="ph codeph">bx ic</samp></span> <span class="ph" id="container_cli_reference_cfic__ps_docker">ps [-a] [--filter
env=<var class="keyword varname">SEARCH_CRITERIA</var>] [-l <var class="keyword varname">NUM</var>] [-q] [-s]</span></span></h3>
<dl><dt class="dlterm">Purpose</dt>
<dd><span class="ph" id="container_cli_reference_cfic__ps_purpose">Retrieve a list of containers that are running in the space. By default,
only running containers are displayed.</span> For more information, see the <a href="https://docs.docker.com/engine/reference/commandline/ps" rel="external" target="_blank" title="(Opens in a new tab or window)">ps</a> command in the Docker help.</dd>
<dt class="dlterm">Parameters</dt>
<dd id="container_cli_reference_cfic__ps_param"><dl class="parml"><dt class="pt dlterm"><a name="container_cli_reference_cfic__ps_all"><!-- --></a>-a, --all</dt>
<dd class="pd">(Optional) Show all containers in the space, both running and stopped. </dd>
<dt class="pt dlterm">--filter env=<var class="keyword varname">SEARCH_CRITERIA</var></dt>
<dd class="pd">(Optional) Search containers that have a specific environment variable value. You can filter
your containers by any environment variable key or value that is listed in the
<var class="keyword varname">Env</var> section of your CLI response when you inspect a container. Replace
<var class="keyword varname">SEARCH_CRITERIA</var> with the key or value you are looking for. Your search criteria
does not need to be an exact match. </dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__ps_limit"><!-- --></a>-l <var class="keyword varname">NUM</var>, --limit <var class="keyword varname">NUM</var></dt>
<dd class="pd">(Optional) List the most recently created containers, where <var class="keyword varname">NUM</var> is the number
of the most recently created containers that you want to return. <p>For example, if you created
containers node1 through to node5 sequentially, the option <samp class="ph codeph">--limit 2</samp> returns node4
and node5 because they are the last two containers that were created.</p>
</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__ps_quiet"><!-- --></a>-q, --quiet</dt>
<dd class="pd">(Optional) Display only container IDs.</dd>
<dt class="pt dlterm"><a name="container_cli_reference_cfic__ps_size"><!-- --></a>-s, --size</dt>
<dd class="pd">(Optional) List the sizes of the containers.</dd>
</dl>