Skip to main content

Tool to automate running commands in docker.

Project description

Moby is a tool to automate running scripts in a docker container. This can be used to run tests or other stuff that depend on binaries or other stuff you don’t want to install.

Usage

Moby assumes there is a Dockerfile in the current directory. Currently there is no way to configure otherwise. So there should be a Dockerfile.

Create a file called moby.yml, this is the configuration file moby will search for. Example:

envlist: [test, build]

test:
  before:
    push:
      - tests
      - tox.ini
    run:
      - apt-get install -y tox
  run:
    - tox

build:
  run:
    - ./build.sh
  after:
    pull:
      - dist

Then run moby.

When the example is ran, moby builds and launches the container from the Dockerfile. The test environment is ran first. The tests directory and the tox.ini file are pushed to the running container (to the working dir). Then apt-get install -y tox is ran. Lastly, tox is executed. Then the build environment is ran. ./build.sh is executed and the dist directory is downloaded from the container to the current directory. After all this, the container is shut down.

Configuration reference

after

An environment can have an after entry. This entry is considered an environment that is ran after the environment is ran.

before

An environment can have an after entry. This entry is considered an environment that is ran before the environment is ran.

envlist

envlist is a required entry, it states which environments are to be run.

environment

An environment is created at the root with an arbitrary name. An environment only requires a run entry.

push

An environment can have a push entry. This states which files to push to the container.

pull

An environment can have a pull entry. This states which files to pull from the container.

Project details


Download files

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

Source Distribution

moby-0.0.3.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

moby-0.0.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file moby-0.0.3.tar.gz.

File metadata

  • Download URL: moby-0.0.3.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for moby-0.0.3.tar.gz
Algorithm Hash digest
SHA256 033fd52a89cbfa26e9962cf01baa3430f555b05f77cbfee80ada4c85684786c9
MD5 8db57c23f6abd50503a020249d6621f0
BLAKE2b-256 058452d2c554fae23c0bef751737c5dbbc6df383372534f1c2f6413b0eda2daa

See more details on using hashes here.

File details

Details for the file moby-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for moby-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ba3501c18948e88d3da76772e82ca3a66ffe703804cb91cfccdd6058bc46be42
MD5 1ebe51c3ec67088b0906b83ea597a475
BLAKE2b-256 b7bff7e083d48f247c111dd142d4c4be5b46f8699745da6b9f204646758ff444

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page