Skip to main content

Run in Docker

Project description

Rind (Run in Docker) is a simple command line tool for executing things inside docker containers.

Installation

Whilst Rind is a Python package and can be installed with pip, the preferred method of installed is to download the latest binary release and place it somewhere on the system PATH

Configuration

To rind enable a container a app.rind label needs to be added. Do do this in a docker-compose.yml you would do the following:

services:
    a_service:
        image: an_image
        labels:
            - app.rind

Rind also has the ability to run pre-steps when executing inside the container. For example activating a Python virtualenv.

To enable a pre-step you need to add it as a value to your label.

services:
    a_service:
        image: an_image
        labels:
            app.rind: "source /venv/bin/activate"

This assumes you virtualenv is at /venv within your docker container. It will be combined with the actual command passed in. e.g.: rind /bin/sh would be run in your container as source /venv/bin/activate && /bin/sh

Running

Effectively anything passed as a command line argument is executed directly within the rind enabled container. e.g.

rind ./manage.py migration

Would run the manage.py script in the containers working directory, passing it the migrate argument

If no parameters are passed to rind then the default /bin/sh is used which will give you and interactive terminal.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
rind-0.2.0.tar.gz (3.3 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page