Skip to main content

Simplify use of Docker containers for building software

Project description

SCUBA Build Status codecov.io PyPI Gitter

Simple Container-Utilizing Build Apparatus

SCUBA is a simple tool that makes it easier to use Docker containers in everyday development. It is intended to be used by developers in 'make' or 'scons' based build environments, where the entire build environment is encapsulated in a Docker container.

Its purpose is to lower the barrier to using Docker for everyday builds. SCUBA keeps you from having to remember a complex docker run command line, and turns this

$ docker run -it --rm -v $(pwd):/build:z -w /build -u $(id -u):$(id -g) gcc:5.1 make myprogram

into this:

$ scuba make myprogram

Installation

Install via pip

Scuba is hosted at PyPI.

To install:

$ sudo pip install scuba

To uninstall:

$ sudo pip uninstall scuba

Install from source

Scuba can be built from source on Linux only (due to the fact that scubainit must be compiled):

  1. Run make to build scubainit
  2. Run ./run_nosetests.py to run the unit tests
  3. Run sudo python setup.py install to install scuba
  4. Run ./run_full_tests.py to test the installed version of scuba

If musl-libc is installed, it can be used to reduce the size of scubainit, by overriding the CC environment variable in step 1:

CC=/usr/local/musl/bin/musl-gcc make

Note that installing from source in this manner can lead to an installation with increased startup times for Scbua. See #71 for more details. This can be remedied by forcing a wheel to be installed, as such:

$ export CC=/usr/local/musl/bin/musl-gcc    # (optional)
$ sudo pip install wheel
$ python setup.py bdist_wheel
$ sudo pip install dist/scuba-<version>-py2.py3-none-any.whl

Configuration

Configuration is done using a YAML file named .scuba.yml in the root directory of your project. It is expected that .scuba.yml be checked in to version control. Full documentation on .scuba.yml can be found in doc/yaml-reference.md, and specific examples can be found in the example directory.

An example .scuba.yml file might look like this:

image: gcc:5.1

aliases:
  build: make -j4

In this example, scuba build foo would execute make -j4 foo in a gcc:5.1 container.

Environment

Scuba defines the following environment variables in the container:

  • SCUBA_ROOT the root of the scuba working directory mount; the directory where .scuba.yml was found.

License

This software is released under the MIT License.

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

scuba-2.4.2.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scuba-2.4.2-py2.py3-none-any.whl (47.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file scuba-2.4.2.tar.gz.

File metadata

  • Download URL: scuba-2.4.2.tar.gz
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

File hashes

Hashes for scuba-2.4.2.tar.gz
Algorithm Hash digest
SHA256 2f9537b1b7d9ac62a86f4906752db504977a4df6908ebc26686035aedc986dc3
MD5 d22934a6c6db88b0b666b8d47136873c
BLAKE2b-256 e138ead10c1bcd13e8a155d0626cf801fa5643718a04cddd3453b6cad63d25a7

See more details on using hashes here.

File details

Details for the file scuba-2.4.2-py2.py3-none-any.whl.

File metadata

  • Download URL: scuba-2.4.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 47.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

File hashes

Hashes for scuba-2.4.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e1d39078cdbaaca2f1034693122b3ce7fd9e3b69754ce4317d76b1ae27224a25
MD5 cd7708f00675f27293ea9b8daf1aa6a6
BLAKE2b-256 22504e1b5438d488632624ee0a78631e35d7ecdda8d0ea2863b643df2810c384

See more details on using hashes here.

Supported by

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