2 Managing Docker Containers and Images
(require remote-shell/docker) | package: remote-shell-lib |
Added in version 1.3 of package remote-shell-lib.
procedure
(docker-build #:name name #:content content) → void? name : string? content : path-string?
procedure
(docker-create #:name name #:image-name image-name [ #:network network #:volumes volumes #:memory-mb memory-mb #:swap-mb swap-mb #:replace? replace?]) → string? name : string? image-name : string? network : (or/c #f string?) = #f
volumes : (listof (list/c path-string? string? (or/c 'ro 'rw))) = '() memory-mb : (or/c #f exact-positive-integer?) = #f swap-mb : (or/c #f exact-positive-integer?) = #f replace? : boolean? = #f
If network is a string, then the created container uses that network.
The volumes argument supplies a mapping of host directories to container directory paths, where the path on the container maps to the host directory in the indicated mode: 'ro for read-only or 'rw for read–write.
The memory-mb and swap-mb arguments determine the amount of memory that the container can use in megabytes (MB), where memory-mb is “real” memory and swap-mb is additional swap space. If only one of the numbers is provided, the default for the other is the same (i.e., by default, the total amount of memory available including swap space is twice the provided value). If neither is provided as a number, no specific limit is imposed on the container.
Changed in version 1.5 of package remote-shell-lib: Added #:memory-mb and #:swap-mb.
procedure
(docker-exec #:name name command arg ... [ #:mode mode]) → (or/c boolean? void?) name : string? command : path-string? arg : path-string? mode : (or/c 'error 'result) = 'error
The mode argument determines how failure of the command is
handled—
procedure
(docker-copy #:name name #:src src #:dest dest [ #:mode mode]) → (or/c boolean? void?) name : string? src : path-string? dest : path-string? mode : (or/c 'error 'result) = 'error
The mode argument determines how failure of the copy is
handled—