https://github.com/rainoffallingstar/dockerr
https://github.com/rainoffallingstar/dockerr
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/rainoffallingstar/dockerr
- Owner: rainoffallingstar
- License: other
- Created: 2024-03-18T13:58:05.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T04:07:30.000Z (over 2 years ago)
- Last Synced: 2025-02-16T17:49:21.430Z (over 1 year ago)
- Language: R
- Size: 1.38 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### dockerR

This is an R package wirtten for managing docker images and containers under R, warping most the docker cli commands.
install by:
``` r
pak::pak("rainoffallingstar/dockerR")
```
#### Dependences(now & future)
- docker
- docker compose
- podman(support by parameter {"use_podman = TRUE"})
#### Feature
- %\>% pipline eg. image_rmi("diygod/rsshub") %\>% image_pull() %\>% image_tag("fall/rsshub").
- Full workflow with docker image pull,container creatation, container control and container update.
- docker compose supoort.
#### Functions
- lscontainer : list all the containers
- lsimage : list all the images
- image_rmi : remove imges
- image_pull : pull images
- image_tag : change the tags of image
- image_build : build an image from dockerfile
- image_push: push build images to dockerhub
- image_save : save images as tar format
- image_load: load/import image from a tar file
- container_run : run/create a container with all parameters
- container_control: control the statue of containers by stop, start ,restart and delete(rm)
- container_update : update the container when the upstream image changes
- container_updateParameter : update the parameter of a running container
- container_exec : run commands inside the container
- container_dockercompose: run/initial a container by a yaml file with docker compose
- docker_info: show docker info
- docker_version : show docker version
- docker_stats: show container stats under running
#### Tips
- How to schdule a rscript in windows/macos/linux
> by run the following commands in the terminal as an example
``` bash
# in win
schtasks /create /tn "Run R Script at 6 AM" /tr "C:\Program Files\R\R-4.3.3\bin\x64\Rscript.exe D:\fallingstarGitcode\dockerR\dev\example\container-autoupdate.R" /sc daily /st 06:00
# in macos & linux
crontab -e
0 6 * * * /usr/bin/Rscript /path/to/your/script.R
```
#### RoadMap
- clean the code (a bit mass now but runs well ,lol)
- better test examples
- more features with the docker cli commands