All Projects → bhaskarvk → docker

bhaskarvk / docker

Licence: other
R Package For Accessing Docker via Docker APIs

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to docker

AutoMeter-API
AutoMeter-API是一款针对分布式服务,微服务API功能和性能一体的自动化测试平台,一站式解决应用,服务,API,环境管理,用例,条件,测试场景,计划,测试报告,功能/性能测试兼容支持的一体化工作平台
Stars: ✭ 105 (+356.52%)
Mutual labels:  api-client, test-automation
InstaLite
Instagram api not official easy-to-use class, minimal number of features
Stars: ✭ 72 (+213.04%)
Mutual labels:  api-client
upcloud-python-api
Python client for UpCloud's API
Stars: ✭ 51 (+121.74%)
Mutual labels:  api-client
software-testing-resource-pack
Various files useful for manual testing and test automation etc.
Stars: ✭ 38 (+65.22%)
Mutual labels:  test-automation
request
http requests DSL for R
Stars: ✭ 36 (+56.52%)
Mutual labels:  r-stats
google-photos-api-client-go
Google photos api client in go
Stars: ✭ 35 (+52.17%)
Mutual labels:  api-client
extensiveautomation-server
Extensive Automation server
Stars: ✭ 19 (-17.39%)
Mutual labels:  test-automation
ebics-java-client
Java open source EBICS client - Support for French, German and Swiss banks
Stars: ✭ 30 (+30.43%)
Mutual labels:  api-client
robotframework-excel
Robot-framework auto-test excel
Stars: ✭ 15 (-34.78%)
Mutual labels:  test-automation
notion-sdk-net
A Notion SDK for .Net
Stars: ✭ 71 (+208.7%)
Mutual labels:  api-client
mercury-parserpy
python api wrapper for https://mercury.postlight.com/web-parser/
Stars: ✭ 16 (-30.43%)
Mutual labels:  api-client
ninja automator
Acquire data with honour and wisdom — using the way of the ninja.
Stars: ✭ 21 (-8.7%)
Mutual labels:  api-client
intellij-ui-test-robot
The library allows you to write and execute UI tests among IntelliJ IDEA. You can test your Plugin.
Stars: ✭ 60 (+160.87%)
Mutual labels:  test-automation
transip-api
Python implementation for the TransIP API
Stars: ✭ 23 (+0%)
Mutual labels:  api-client
SketchwareAPI
Sketchware API Multiplatform Library
Stars: ✭ 26 (+13.04%)
Mutual labels:  api-client
jusibe
📲 JavaScript client for Jusibe.com SMS API service. http://jusibe.com
Stars: ✭ 24 (+4.35%)
Mutual labels:  api-client
IO-TESTER
A functional test framework
Stars: ✭ 32 (+39.13%)
Mutual labels:  test-automation
pylistenbrainz
A simple ListenBrainz client library for Python
Stars: ✭ 17 (-26.09%)
Mutual labels:  api-client
ksoftapi.py
Official API Wrapper for KSoft.Si API
Stars: ✭ 31 (+34.78%)
Mutual labels:  api-client
private-packagist-api-client
Private Packagist API Client
Stars: ✭ 28 (+21.74%)
Mutual labels:  api-client

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Last-changedate License: MIT keybase verified Travis-CI Build Status AppVeyor Build Status minimal R version packageversion CRAN_Status_Badge

docker: An R Package for Docker

The docker R package provides access to the docker API to programmatically control a docker engine from R. The docker engine could be running either locally or remotely. The docker package uses the reticulate R package to invoke the Python SDK for docker. Using the Python SDK allows the docker package to have a very minimal foot-print and yet allow complete docker API access. The package has been tested against docker engine running on Linux and Microsoft Windows and should also work under MacOS.

Controlling a docker engine from withing R can be useful for ...

  • Writing automated unit/integration tests for R packages against running services in docker containers. The package author can start a docker container, execute the tests, and tear the container down, all from withing the R code of the test.
  • Another use case is easy access to containerized services as part of a researchers reproducible research workflow. Having access to a containerized service ensures that the research code executes identically regardless of where it's run.

Installation

Release version

install.packages('docker')

OR development version

if(!require(devtools)) {
  install.packages("devtools")
}
devtools::install_github('bhaskarvk/docker')

Setup

Before you can use this package you need to have Python 2.x (>=2.7) or Python 3.x (>=3.4) with the docker Python module which provides Python SDK for docker. A simple way to do this is using a virtual environment. virtualenvwrapper makes setting up Python modules quite painless.

Once you have installed Python and setup virtualenvwrapper you need to create a new virtual environment and install the docker Python module in it.

mkvirtualenv --python=/usr/bin/python3 docker
workon docker
pip install docker

# Test the SDK againsts a locally running docker
# You should have a locally running docker for this.
python -c 'import docker; print(docker.from_env().version())'

You should see something like below, provided you had a locally running docker engine.

{'Os': 'linux', 'Arch': 'amd64', 'KernelVersion': '4.10.0-24-generic', 'GitCommit': '02c1d87', 'Version': '17.06.0-ce', 'BuildTime': '2017-06-23T21:19:04.990631145+00:00', 'MinAPIVersion': '1.12', 'GoVersion': 'go1.8.3', 'ApiVersion': '1.30'}

Example

reticulate::use_virtualenv("docker")
library(docker)
client <- docker$from_env()
s <- client$containers$run("alpine", 'echo -n "Hello World!"', remove=TRUE)
print(s$decode("UTF-8"))
#> [1] "Hello World!"

Usage

After you have a successful 'Hellow World!' displayed above, you can call every API supported by the Python SDK using reticulate. Please consult the documents for the SDK and the reticulate R package in the links given above.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].