Enable you to run your command line tasks in containers.
# Create a new task
# Params are `name`, `image` and `command`
task = Elder::Task.new 'sample', 'ruby', 'ruby'
# Start the task passing params to the command and ENV variables
task.start '-v'
# Wait until the task is finished
sleep 1
# Return it results
task.logs
# Remove the docker container used in this operation
task.clean
- Enable more options to the task (like
links
,volumes
,network
). - Create a method
:wait
for theElders::Task
, this will block the main thread until the task is completed. - Doc the
Elders::Stack
usage.
- Running tests:
- Build the Docker image:
docker build -t elders .
- Run the RSpec:
docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock elders bundle exec rspec
- Build the Docker image:
Interactive mode in the conteiner.
docker run --rm -it -v (PWD):/elders -v /var/run/docker.sock:/var/run/docker.sock elders /bin/bash