docker_available: Test if docker available

Description Usage Arguments Details Value Examples

View source: R/docker_available.R

Description

Test if we can construct a docker client and confirm that we can communicate with it. This is intended to help in debug connection issues, and also for use in tests. For example, you might implement a testthat skip test that skips if stevedore::docker_available() returns FALSE to conditionally use stevedore/docker within tests.

Usage

1

Arguments

...

Passed through to docker_client (e.g., api_version, host).

verbose

Logical, indicating if information should be printed about failures to connect. If FALSE (the default) the function runs silently.

Details

Reasons for failure to connect might include:

If versose is TRUE then some diagnostic information will be printed.

Value

Logical scalar, TRUE if docker_client(...) would succeed.

Examples

1
2
# Is docker available on your system?
stevedore::docker_available()

richfitz/stevedore documentation built on Jan. 18, 2020, 11:26 p.m.