/
stevedore.Rmd
3101 lines (2751 loc) · 66.3 KB
/
stevedore.Rmd
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
---
title: "Using docker with stevedore"
author: "Rich FitzJohn"
date: "2020-01-12"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Using docker with stevedore}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
`stevedore` is an R package for interacting with docker from R.
With `stevedore` you can
* create, run, manage, remove and destroy containers
* build, pull, manage and remove images
* create, destroy and interact with docker networks
* create, destroy and interact with docker volumes
Almost everything that can be done with the docker command line
client (the main exception being that is not possible to send input
to a container as if you were on a terminal).
`stevedore` directly interacts with the docker server over its HTTP
API. This gives a more direct access to docker than going via the
command line.
This vignette quickly walks through the core features of the
package. Because `stevedore` wraps the docker API directly there
are many more arguments that can be used than are covered here.
But this covers the core use.
The main function in the package is `docker_client`; this will
construct an object with which we can talk with the docker server.
By default this will look at a number of environment variables and
try to connect to the correct daemon. See `?docker_client` for
information on controlling creating the connection.
```r
docker <- stevedore::docker_client()
```
The client object looks a lot like an
[`R6`](https://github.com/r-lib/R6/) object (though it is implemented
differently because the interface here is automatically generated
in ways that don't play nicely with R6). But if you are at all
familiar with R6 objects it should seem quite familiar.
```r
docker
```
```
## <docker_client>
## config: Manage docker swarm configs
## container: Work with docker containers
## image: Work with docker images
## network: Work with docker networks
## node: Manage docker swarm nodes
## plugin: Work with docker plugins
## secret: Manage docker swarm secrets
## service: Work with docker services
## swarm: Manage the docker swarm
## task: Work with docker tasks
## volume: Work with docker volumes
## types: Methods for building complex docker types
## api_version()
## connection_info()
## cp(src, dest)
## df()
## events(since = NULL, until = NULL, filters = NULL)
## help(help_type = getOption("help_type"))
## info()
## login(username = NULL, password = NULL, email = NULL,
## serveraddress = NULL)
## ping()
## request(verb, path, query = NULL, body = NULL, headers = NULL,
## stream = NULL)
## version()
```
Each function call (e.g., `ping`) is callable by accessing with
`$`, such as
```r
docker$ping()
```
```
## [1] "OK"
## attr(,"api_version")
## [1] "1.39"
## attr(,"buildkit_version")
## [1] NA
## attr(,"docker_experimental")
## [1] FALSE
```
In addition there are "collection" objects (e.g., `container`)
that are accessed using `$`, like a directory structure
```r
docker$container
```
```
## <docker_container_collection>
## create(image, cmd = NULL, hostname = NULL, domainname = NULL,
## user = NULL, attach_stdin = NULL, attach_stdout = NULL,
## attach_stderr = NULL, ports = NULL, tty = NULL,
## open_stdin = NULL, stdin_once = NULL, env = NULL,
## health_check = NULL, args_escaped = NULL, volumes = NULL,
## working_dir = NULL, entrypoint = NULL, network_disabled = NULL,
## mac_address = NULL, on_build = NULL, labels = NULL,
## stop_signal = NULL, stop_timeout = NULL, shell = NULL,
## host_config = NULL, network = NULL, name = NULL)
## get(id)
## help(help_type = getOption("help_type"))
## list(all = NULL, limit = NULL, size = NULL, filters = NULL)
## prune(filters = NULL)
## remove(id, delete_volumes = NULL, force = NULL, link = NULL)
## run(image, cmd = NULL, ..., detach = FALSE, rm = FALSE,
## stream = stdout(), host_config = NULL)
```
The interface is designed similarly to the command line docker
client (and to the Python docker client), where container commands
are within the `container` collection and image commands are within
the `image` collection and so on (the main difference with the
command line client is that the container commands are not at the
top level, so it is `docker$container$run(...)` not
`docker$run(...)`).
To run a container, the `docker$container$run` command follows the
semantics of the command line client and will
* pull a image if it does not exist
* create the container
* run the container
* fetch the logs
```r
res <- docker$container$run("hello-world")
```
```
## O>
## O> Hello from Docker!
## O> This message shows that your installation appears to be working correctly.
## O>
## O> To generate this message, Docker took the following steps:
## O> 1. The Docker client contacted the Docker daemon.
## O> 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
## O> (amd64)
## O> 3. The Docker daemon created a new container from that image which runs the
## O> executable that produces the output you are currently reading.
## O> 4. The Docker daemon streamed that output to the Docker client, which sent it
## O> to your terminal.
## O>
## O> To try something more ambitious, you can run an Ubuntu container with:
## O> $ docker run -it ubuntu bash
## O>
## O> Share images, automate workflows, and more with a free Docker ID:
## O> https://hub.docker.com/
## O>
## O> For more examples and ideas, visit:
## O> https://docs.docker.com/get-started/
## O>
```
This returns a list with two elements:
```r
names(res)
```
```
## [1] "container" "logs"
```
The "logs" element is the logs themselves:
```r
res$logs
```
```
## O>
## O> Hello from Docker!
## O> This message shows that your installation appears to be working correctly.
## O>
## O> To generate this message, Docker took the following steps:
## O> 1. The Docker client contacted the Docker daemon.
## O> 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
## O> (amd64)
## O> 3. The Docker daemon created a new container from that image which runs the
## O> executable that produces the output you are currently reading.
## O> 4. The Docker daemon streamed that output to the Docker client, which sent it
## O> to your terminal.
## O>
## O> To try something more ambitious, you can run an Ubuntu container with:
## O> $ docker run -it ubuntu bash
## O>
## O> Share images, automate workflows, and more with a free Docker ID:
## O> https://hub.docker.com/
## O>
## O> For more examples and ideas, visit:
## O> https://docs.docker.com/get-started/
## O>
```
This is a `docker_stream` object and codes the output stream using
the `stream` attribute (it can otherwise be treated as a character
vector).
The "container" element is an object that can be used to interact
with a container
```r
res$container
```
```
## <docker_container>
## commit(repo = NULL, tag = NULL, author = NULL, changes = NULL,
## comment = NULL, pause = NULL, hostname = NULL, domainname = NULL,
## user = NULL, attach_stdin = NULL, attach_stdout = NULL,
## attach_stderr = NULL, exposed_ports = NULL, tty = NULL,
## open_stdin = NULL, stdin_once = NULL, env = NULL, cmd = NULL,
## healthcheck = NULL, args_escaped = NULL, image = NULL,
## volumes = NULL, working_dir = NULL, entrypoint = NULL,
## network_disabled = NULL, mac_address = NULL, on_build = NULL,
## labels = NULL, stop_signal = NULL, stop_timeout = NULL,
## shell = NULL)
## cp_in(src, dest)
## cp_out(src, dest)
## diff()
## exec(cmd, stdin = NULL, stdout = TRUE, stderr = TRUE,
## detach_keys = NULL, tty = NULL, env = NULL, privileged = NULL,
## user = NULL, working_dir = NULL, detach = FALSE,
## stream = stdout())
## exec_create(cmd, stdin = NULL, stdout = TRUE, stderr = TRUE,
## detach_keys = NULL, tty = NULL, env = NULL, privileged = NULL,
## user = NULL, working_dir = NULL)
## export()
## get_archive(path, dest)
## help(help_type = getOption("help_type"))
## id()
## image()
## inspect(reload = TRUE)
## kill(signal = NULL)
## labels(reload = TRUE)
## logs(follow = NULL, stdout = TRUE, stderr = TRUE, since = NULL,
## until = NULL, timestamps = NULL, tail = NULL, stream = stdout())
## name()
## path_stat(path)
## pause()
## ports(reload = TRUE)
## put_archive(src, path, no_overwrite_dir_non_dir = NULL)
## reload()
## remove(delete_volumes = NULL, force = NULL, link = NULL)
## rename(name)
## resize(h = NULL, w = NULL)
## restart(t = NULL)
## start(detach_keys = NULL)
## stats()
## status(reload = TRUE)
## stop(t = NULL)
## top(ps_args = NULL)
## unpause()
## update(cpu_shares = NULL, memory = NULL, cgroup_parent = NULL,
## blkio_weight = NULL, blkio_weight_device = NULL,
## blkio_device_read_bps = NULL, blkio_device_write_bps = NULL,
## blkio_device_read_iops = NULL, blkio_device_write_iops = NULL,
## cpu_period = NULL, cpu_quota = NULL, cpu_realtime_period = NULL,
## cpu_realtime_runtime = NULL, cpuset_cpus = NULL,
## cpuset_mems = NULL, devices = NULL, device_cgroup_rules = NULL,
## disk_quota = NULL, kernel_memory = NULL,
## memory_reservation = NULL, memory_swap = NULL,
## memory_swappiness = NULL, nano_cpus = NULL,
## oom_kill_disable = NULL, init = NULL, pids_limit = NULL,
## ulimits = NULL, cpu_count = NULL, cpu_percent = NULL,
## io_maximum_iops = NULL, io_maximum_bandwidth = NULL,
## restart_policy = NULL)
## wait(condition = NULL)
```
For example the function `path_stat` gets some information about
paths on the container:
```r
res$container$path_stat("hello")
```
```
## $name
## [1] "hello"
##
## $size
## [1] 1840
##
## $mode
## [1] 509
##
## $mtime
## [1] "2019-01-01T01:27:56Z"
##
## $linkTarget
## [1] ""
```
The image can also be returned
```r
img <- res$container$image()
img
```
```
## <docker_image>
## export()
## help(help_type = getOption("help_type"))
## history()
## id()
## inspect(reload = TRUE)
## labels(reload = TRUE)
## name()
## reload()
## remove(force = NULL, noprune = NULL)
## short_id()
## tag(repo, tag = NULL)
## tags(reload = TRUE)
## untag(repo_tag)
```
which is another object with methods that can be invoked to find
out about the image, e.g.:
```r
img$history()
```
```
## id
## 1 sha256:fce289e99eb9bca977dae136fbe2a82b6b7d4c372474c9235adc1741675f587e
## 2 <missing>
## created
## 1 1546306167
## 2 1546306167
## created_by
## 1 /bin/sh -c #(nop) CMD ["/hello"]
## 2 /bin/sh -c #(nop) COPY file:f77490f70ce51da25bd21bfc30cb5e1a24b2b65eb37d4af0c327ddc24f0986a6 in /
## tags size comment
## 1 hello-wo.... 0
## 2 1840
```
## Containers
The `$container` object includes methods for interacting with
containers:
```r
docker$container
```
```
## <docker_container_collection>
## create(image, cmd = NULL, hostname = NULL, domainname = NULL,
## user = NULL, attach_stdin = NULL, attach_stdout = NULL,
## attach_stderr = NULL, ports = NULL, tty = NULL,
## open_stdin = NULL, stdin_once = NULL, env = NULL,
## health_check = NULL, args_escaped = NULL, volumes = NULL,
## working_dir = NULL, entrypoint = NULL, network_disabled = NULL,
## mac_address = NULL, on_build = NULL, labels = NULL,
## stop_signal = NULL, stop_timeout = NULL, shell = NULL,
## host_config = NULL, network = NULL, name = NULL)
## get(id)
## help(help_type = getOption("help_type"))
## list(all = NULL, limit = NULL, size = NULL, filters = NULL)
## prune(filters = NULL)
## remove(id, delete_volumes = NULL, force = NULL, link = NULL)
## run(image, cmd = NULL, ..., detach = FALSE, rm = FALSE,
## stream = stdout(), host_config = NULL)
```
`$create` creates a new container (similar to `docker container
create` on the command line) but does not start it.
```r
x <- docker$container$create("hello-world", name = "hello-stevedore")
x
```
```
## <docker_container>
## commit(repo = NULL, tag = NULL, author = NULL, changes = NULL,
## comment = NULL, pause = NULL, hostname = NULL, domainname = NULL,
## user = NULL, attach_stdin = NULL, attach_stdout = NULL,
## attach_stderr = NULL, exposed_ports = NULL, tty = NULL,
## open_stdin = NULL, stdin_once = NULL, env = NULL, cmd = NULL,
## healthcheck = NULL, args_escaped = NULL, image = NULL,
## volumes = NULL, working_dir = NULL, entrypoint = NULL,
## network_disabled = NULL, mac_address = NULL, on_build = NULL,
## labels = NULL, stop_signal = NULL, stop_timeout = NULL,
## shell = NULL)
## cp_in(src, dest)
## cp_out(src, dest)
## diff()
## exec(cmd, stdin = NULL, stdout = TRUE, stderr = TRUE,
## detach_keys = NULL, tty = NULL, env = NULL, privileged = NULL,
## user = NULL, working_dir = NULL, detach = FALSE,
## stream = stdout())
## exec_create(cmd, stdin = NULL, stdout = TRUE, stderr = TRUE,
## detach_keys = NULL, tty = NULL, env = NULL, privileged = NULL,
## user = NULL, working_dir = NULL)
## export()
## get_archive(path, dest)
## help(help_type = getOption("help_type"))
## id()
## image()
## inspect(reload = TRUE)
## kill(signal = NULL)
## labels(reload = TRUE)
## logs(follow = NULL, stdout = TRUE, stderr = TRUE, since = NULL,
## until = NULL, timestamps = NULL, tail = NULL, stream = stdout())
## name()
## path_stat(path)
## pause()
## ports(reload = TRUE)
## put_archive(src, path, no_overwrite_dir_non_dir = NULL)
## reload()
## remove(delete_volumes = NULL, force = NULL, link = NULL)
## rename(name)
## resize(h = NULL, w = NULL)
## restart(t = NULL)
## start(detach_keys = NULL)
## stats()
## status(reload = TRUE)
## stop(t = NULL)
## top(ps_args = NULL)
## unpause()
## update(cpu_shares = NULL, memory = NULL, cgroup_parent = NULL,
## blkio_weight = NULL, blkio_weight_device = NULL,
## blkio_device_read_bps = NULL, blkio_device_write_bps = NULL,
## blkio_device_read_iops = NULL, blkio_device_write_iops = NULL,
## cpu_period = NULL, cpu_quota = NULL, cpu_realtime_period = NULL,
## cpu_realtime_runtime = NULL, cpuset_cpus = NULL,
## cpuset_mems = NULL, devices = NULL, device_cgroup_rules = NULL,
## disk_quota = NULL, kernel_memory = NULL,
## memory_reservation = NULL, memory_swap = NULL,
## memory_swappiness = NULL, nano_cpus = NULL,
## oom_kill_disable = NULL, init = NULL, pids_limit = NULL,
## ulimits = NULL, cpu_count = NULL, cpu_percent = NULL,
## io_maximum_iops = NULL, io_maximum_bandwidth = NULL,
## restart_policy = NULL)
## wait(condition = NULL)
```
`$get` creates a `docker_container` object from an container id or
name:
```r
y <- docker$container$get("hello-stevedore")
x$id()
```
```
## [1] "25ba2590b21fac453aec605af5af7f1595d2169e1324254d97f5a08701b59e6c"
```
```r
y$id()
```
```
## [1] "25ba2590b21fac453aec605af5af7f1595d2169e1324254d97f5a08701b59e6c"
```
`$list()` lists containers (like `docker list` on the command line)
- by default showing only running containers
```r
docker$container$list()
```
```
## [1] id names image image_id
## [5] command created ports size_rw
## [9] size_root_fs labels state status
## [13] host_config network_settings mounts name
## <0 rows> (or 0-length row.names)
```
```r
docker$container$list(all = TRUE, limit = 2)
```
```
## id
## 1 25ba2590b21fac453aec605af5af7f1595d2169e1324254d97f5a08701b59e6c
## 2 e414940048abbea2a66c33fb5191cc881764955ae0b9110ab48ce29cc29ddcce
## names
## 1 hello-st....
## 2 frosty_b....
## image
## 1 hello-world
## 2 sha256:fce289e99eb9bca977dae136fbe2a82b6b7d4c372474c9235adc1741675f587e
## image_id
## 1 sha256:fce289e99eb9bca977dae136fbe2a82b6b7d4c372474c9235adc1741675f587e
## 2 sha256:fce289e99eb9bca977dae136fbe2a82b6b7d4c372474c9235adc1741675f587e
## command created ports size_rw size_root_fs labels state
## 1 /hello 1578823525 characte.... NA NA created
## 2 /hello 1578823523 characte.... NA NA exited
## status host_config network_settings mounts
## 1 Created default list(bri.... characte....
## 2 Exited (0) 1 second ago default list(bri.... characte....
## name
## 1 hello-stevedore
## 2 frosty_banzai
```
`$remove()` removes a container by name or id:
```r
docker$container$remove("hello-stevedore")
```
```
## NULL
```
`$prune()` removes non-running containers (i.e., containers that
have exited or containers that have been created but not yet
started)
```r
docker$container$prune()
```
```
## $containers_deleted
## [1] "e414940048abbea2a66c33fb5191cc881764955ae0b9110ab48ce29cc29ddcce"
##
## $space_reclaimed
## [1] 0
```
### Working with containers
After creating a container object, there are many more methods to
use - all apply to the individual container
```r
x <- docker$container$create("richfitz/iterate", c("1000", "1"))
```
Most are analogues of similarly named `docker` command line
functions.
First, there are some basic query methods - `$id()`, `$name()` and
`$labels()`
```r
x$id()
```
```
## [1] "b553018482d2e4119e20c9ccc54fd7a14e6aa7843f630a5266548f31d755211d"
```
```r
x$name()
```
```
## [1] "angry_snyder"
```
```r
x$labels()
```
```
## stevedore_version
## "0.0.1"
```
More detailed information (**much** more detailed) can be retrieved
with the `$inspect()` method
```r
x$inspect()
```
```
## $id
## [1] "b553018482d2e4119e20c9ccc54fd7a14e6aa7843f630a5266548f31d755211d"
##
## $created
## [1] "2020-01-12T10:05:25.3062459Z"
##
## $path
## [1] "/usr/local/bin/iterate"
##
## $args
## [1] "1000" "1"
##
## $state
## $state$status
## [1] "created"
##
## $state$running
## [1] FALSE
##
## $state$paused
## [1] FALSE
##
## $state$restarting
## [1] FALSE
##
## $state$oom_killed
## [1] FALSE
##
## $state$dead
## [1] FALSE
##
## $state$pid
## [1] 0
##
## $state$exit_code
## [1] 0
##
## $state$error
## [1] ""
##
## $state$started_at
## [1] "0001-01-01T00:00:00Z"
##
## $state$finished_at
## [1] "0001-01-01T00:00:00Z"
##
##
## $image
## [1] "sha256:56b0d98ceb5a402ea61c63ab94a8e7f305cde36e3aa8f080a0b7ab1a8a659e7c"
##
## $resolv_conf_path
## [1] ""
##
## $hostname_path
## [1] ""
##
## $hosts_path
## [1] ""
##
## $log_path
## [1] ""
##
## $node
## NULL
##
## $name
## [1] "/angry_snyder"
##
## $restart_count
## [1] 0
##
## $driver
## [1] "overlay2"
##
## $mount_label
## [1] ""
##
## $process_label
## [1] ""
##
## $app_armor_profile
## [1] ""
##
## $exec_ids
## character(0)
##
## $host_config
## $host_config$cpu_shares
## [1] 0
##
## $host_config$memory
## [1] 0
##
## $host_config$cgroup_parent
## [1] ""
##
## $host_config$blkio_weight
## [1] 0
##
## $host_config$blkio_weight_device
## [1] path weight
## <0 rows> (or 0-length row.names)
##
## $host_config$blkio_device_read_bps
## [1] path rate
## <0 rows> (or 0-length row.names)
##
## $host_config$blkio_device_write_bps
## [1] path rate
## <0 rows> (or 0-length row.names)
##
## $host_config$blkio_device_read_iops
## [1] path rate
## <0 rows> (or 0-length row.names)
##
## $host_config$blkio_device_write_iops
## [1] path rate
## <0 rows> (or 0-length row.names)
##
## $host_config$cpu_period
## [1] 0
##
## $host_config$cpu_quota
## [1] 0
##
## $host_config$cpu_realtime_period
## [1] 0
##
## $host_config$cpu_realtime_runtime
## [1] 0
##
## $host_config$cpuset_cpus
## [1] ""
##
## $host_config$cpuset_mems
## [1] ""
##
## $host_config$devices
## [1] path_on_host path_in_container cgroup_permissions
## <0 rows> (or 0-length row.names)
##
## $host_config$device_cgroup_rules
## character(0)
##
## $host_config$disk_quota
## [1] 0
##
## $host_config$kernel_memory
## [1] 0
##
## $host_config$memory_reservation
## [1] 0
##
## $host_config$memory_swap
## [1] 0
##
## $host_config$memory_swappiness
## [1] NA
##
## $host_config$nano_cpus
## [1] NA
##
## $host_config$oom_kill_disable
## [1] FALSE
##
## $host_config$init
## [1] NA
##
## $host_config$pids_limit
## [1] 0
##
## $host_config$ulimits
## [1] name soft hard
## <0 rows> (or 0-length row.names)
##
## $host_config$cpu_count
## [1] 0
##
## $host_config$cpu_percent
## [1] 0
##
## $host_config$io_maximum_iops
## [1] 0
##
## $host_config$io_maximum_bandwidth
## [1] 0
##
## $host_config$binds
## character(0)
##
## $host_config$container_idfile
## [1] ""
##
## $host_config$log_config
## $host_config$log_config$type
## [1] "json-file"
##
## $host_config$log_config$config
## character(0)
##
##
## $host_config$network_mode
## [1] "default"
##
## $host_config$port_bindings
## NULL
##
## $host_config$restart_policy
## $host_config$restart_policy$name
## [1] ""
##
## $host_config$restart_policy$maximum_retry_count
## [1] 0
##
##
## $host_config$auto_remove
## [1] FALSE
##
## $host_config$volume_driver
## [1] ""
##
## $host_config$volumes_from
## character(0)
##
## $host_config$mounts
## [1] target source type read_only
## [5] consistency bind_options volume_options tmpfs_options
## <0 rows> (or 0-length row.names)
##
## $host_config$cap_add
## character(0)
##
## $host_config$cap_drop
## character(0)
##
## $host_config$dns
## character(0)
##
## $host_config$dns_options
## character(0)
##
## $host_config$dns_search
## character(0)
##
## $host_config$extra_hosts
## character(0)
##
## $host_config$group_add
## character(0)
##
## $host_config$ipc_mode
## [1] "shareable"
##
## $host_config$cgroup
## [1] ""
##
## $host_config$links
## character(0)
##
## $host_config$oom_score_adj
## [1] 0
##
## $host_config$pid_mode
## [1] ""
##
## $host_config$privileged
## [1] FALSE
##
## $host_config$publish_all_ports
## [1] FALSE
##
## $host_config$readonly_rootfs
## [1] FALSE
##
## $host_config$security_opt
## character(0)
##
## $host_config$storage_opt
## NULL
##
## $host_config$tmpfs
## NULL
##
## $host_config$uts_mode
## [1] ""
##
## $host_config$userns_mode
## [1] ""
##
## $host_config$shm_size
## [1] 67108864
##
## $host_config$sysctls
## NULL
##
## $host_config$runtime
## [1] NA
##
## $host_config$console_size
## [1] 0 0
##
## $host_config$isolation
## [1] ""
##
## $host_config$masked_paths
## [1] "/proc/asound" "/proc/acpi" "/proc/kcore"
## [4] "/proc/keys" "/proc/latency_stats" "/proc/timer_list"
## [7] "/proc/timer_stats" "/proc/sched_debug" "/proc/scsi"
## [10] "/sys/firmware"
##
## $host_config$readonly_paths
## [1] "/proc/bus" "/proc/fs" "/proc/irq"
## [4] "/proc/sys" "/proc/sysrq-trigger"
##
##
## $graph_driver
## $graph_driver$name
## [1] "overlay2"
##
## $graph_driver$data
## lower_dir
## "/var/lib/docker/overlay2/2ac2803a954a813a808e9c1d1f63edf0153ef0dbc109d1c12db372dc2c1104d7-init/diff:/var/lib/docker/overlay2/530d1f73dec177ad03a0ee31ad04d0802bf29925cd2eed2b8e5f49258c6824a3/diff:/var/lib/docker/overlay2/e1a21604d525ede2c5e9e6d59ac7dceb33bc7469ad98cc9997477a38c310305c/diff"
## merged_dir
## "/var/lib/docker/overlay2/2ac2803a954a813a808e9c1d1f63edf0153ef0dbc109d1c12db372dc2c1104d7/merged"
## upper_dir
## "/var/lib/docker/overlay2/2ac2803a954a813a808e9c1d1f63edf0153ef0dbc109d1c12db372dc2c1104d7/diff"
## work_dir
## "/var/lib/docker/overlay2/2ac2803a954a813a808e9c1d1f63edf0153ef0dbc109d1c12db372dc2c1104d7/work"
##
##
## $size_rw
## [1] NA
##
## $size_root_fs
## [1] NA
##
## $mounts
## [1] type name source destination driver mode
## [7] rw propagation
## <0 rows> (or 0-length row.names)
##
## $config
## $config$hostname
## [1] "b553018482d2"
##
## $config$domainname
## [1] ""
##
## $config$user
## [1] ""
##
## $config$attach_stdin
## [1] FALSE
##
## $config$attach_stdout
## [1] FALSE
##
## $config$attach_stderr
## [1] FALSE
##
## $config$exposed_ports
## NULL
##
## $config$tty
## [1] FALSE
##
## $config$open_stdin
## [1] FALSE
##
## $config$stdin_once
## [1] FALSE
##
## $config$env
## [1] "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
##
## $config$cmd
## [1] "1000" "1"
##
## $config$healthcheck
## NULL
##
## $config$args_escaped
## [1] NA
##
## $config$image
## [1] "richfitz/iterate"
##
## $config$volumes
## NULL
##
## $config$working_dir
## [1] ""
##
## $config$entrypoint
## [1] "/usr/local/bin/iterate"
##
## $config$network_disabled
## [1] NA
##