{
"info": {
"author": "Richard Cook",
"author_email": "rcook@rcook.org",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2.7"
],
"description": "IBT: Isolated Build Tool\n========================\n\n|View on PyPI| |Licence|\n\nProject- and build-oriented tool for working with\n`Docker `__ images and containers\n\nWhat's the point of this tool?\n------------------------------\n\nDocker is great for building isolated environments for builds or\napplications. For my tastes, however, there are a few usability issues\nassociated with it:\n\n- The commands are fiddly to use and difficult to remember\n- Docker containers run as root by default resulting in files created\n on the host as the root user, instead of the current user\n- It's too easy to leave intermediate images and containers lying\n around\n\nNote that this is a very personal list of perceived shortcomings. If\nthese aren't issues for you, then don't use this tool!\n\nIBT makes Docker images and containers more development- and\nproject-focused. It encourages the following workflows:\n\n- Editing of source files is carried out predominantly on the *host*\n machine\n- Building, running and debugging of targets is always carried out\n within the Docker container\n- Source code will typically be under the control of a VCS such as Git\n- Source files should not be copied *en masse* into the container\n- Output files from builds etc. should be exposed directly to the host\n\nYou'll notice that the commands strongly resemble those of\n`Vagrant `__. This is not completely\naccidental. The workflows described above strongly resemble Vagrant\nworkflows where ``up``, ``destroy``, ``run`` correspond closely to\n``up``, ``destroy`` and ``ssh``.\n\nInstallation\n------------\n\nEnsure you have a working `Python\n2.7 `__ installation:\n\n.. code:: bash\n\n pip install --user ibt\n\nYou can also clone from this repository and perform a dev install:\n\n.. code:: bash\n\n git clone https://github.com/rcook/ibt.git\n cd ibt\n pip install --user -e .\n\nNote that Pip installs scripts to ``$HOME/.local/bin`` by default\n(varies based on platform), so make sure that this path is available on\nthe system search path (via the ``PATH`` environment variable). You can\ndo this by appending this in your ``.bashrc`` or other shell\nconfiguration script:\n\n.. code:: bash\n\n echo 'export PATH=$HOME/.local/bin:$PATH' >> ~/.bashrc\n\nStandard commands\n-----------------\n\n- ``destroy``: destroys the project's Docker image\n- ``help``: display help\n- ``info``: shows system and project information\n- ``run``: runs a command inside a Docker container\n- ``script``: runs a script inside a Docker container\n- ``shell``: runs an interactive shell inside a Docker container\n- ``up``: creates Docker image for the project after optionally\n building base Docker image\n\nAll commands have available to them the following environment variables:\n\n- ``IBTALIASARGS``: additional arguments passed on the command line to\n aliases\n- ``IBTPROJECTDIR``: the current project directory in the container\n- ``IBTUSER`` and ``USER``: the user name\n\n``Ibtfile`` settings\n--------------------\n\nConfiguration for any given project is driven by the contents of the\n``Ibtfile`` settings file which should be placed in the root directory\nof the project. Alternatively, an ``.ibtprojects`` file placed in the\nuser's home directory can be used to specify the location of the\n``Ibtfile`` for zero or more project root directories for situations\nwhere the IBT configuration must be kept out of the source tree.\n\n- ``aliases``: (optional) one or more project-specific command aliases\n- ``docker``: specifies base Docker image information for project\n including\n- ``env_vars``: (optional) one or more environment variables to define\n inside container ``image`` and ``build``\n- ``ports``: (optional) one or more host port-container port pairs to\n- ``container-project-dir``: (optional) specifies directory to which\n project directory is mapped in container configure port forwarding\n- ``volumes``: (optional) one or more additional volumes to mount\n inside container\n\nEnvironment variable settings\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe environment section contain multiple environment variables to be set\nin the container. The key represents the environment variable to be\ncreated. The value contains either the value or a reference to a\nsubstitution. A Substitution value starts with a ``$`` and is resolved\nagainst the environment variable map. If the variable is not found, the\nenvironment variable is looked up on the host.\n\n.. code:: yaml\n\n env_vars:\n ARTIFACTORY_APIKEY: $ARTIFACTORY_APIKEY\n ARTIFACTORY_USER: BOB_THE_BUILDER\n COMPOSITE_KEY: $ARTIFACTORY_USER@$HOST\n\nVolumes settings\n~~~~~~~~~~~~~~~~\n\nThe volume section contains multiple keys and values. The key refers to\na path on the host and the value contains the path in the container.\n\n.. code:: yaml\n\n volumes: \n host-path: container-path\n\nKey and values support variable expansion like the environment\nvariables.\n\n.. code:: yaml\n\n volumes: \n $HOME/.kube: /home/$USER/.kube\n $HOME/.aws: /home/$USER/.aws\n\nSample project\n--------------\n\nCreate Docker images\n~~~~~~~~~~~~~~~~~~~~\n\nAll build commands will run inside a fully isolated Debian-based Docker\ncontainer as specified by the project configuration in ``Ibtfile``.\nFirst, create the base Docker images:\n\n.. code:: bash\n\n cd docker\n pushd debian-gcc\n make build\n popd\n pushd debian-gcc-python\n make build\n popd\n pushd debian-gcc6\n make build\n popd\n docker images\n\nThis creates ``debian-gcc`` which contains basic build tools, CMake and\ngdb and ``debian-gcc-python`` which extends this with the addition of\nPython 2.7. ``debian-gcc6`` includes the GCC 6 toolchain. The last\ncommand will list locally available Docker images which will now include\n``ibt/debian-gcc`` and ``ibt/debian-gcc-python`` etc.\n\nAliases\n~~~~~~~\n\nOnce this is done, the following commands (configured as aliases in\n``Ibtfile``) can be run to configure/make/run the project code:\n\n- ``ibt cmake``: generates CMake build directory\n- ``ibt make``: runs ``make`` inside CMake build directory\n- ``ibt exec``: runs target binary\n- ``ibt debug``: starts gdb and loads target binary\n\nExample workflow\n~~~~~~~~~~~~~~~~\n\nSee contents of ``example`` subdirectory.\n\n.. code:: bash\n\n $ cd example/\n $ ibt up\n Building Docker image ibt-789dbc504a0690d786ddd43474dfbcc5\n $ ibt cmake\n -- The C compiler identification is GNU 6.3.0\n -- The CXX compiler identification is GNU 6.3.0\n -- Check for working C compiler: /usr/bin/cc\n -- Check for working C compiler: /usr/bin/cc -- works\n -- Detecting C compiler ABI info\n -- Detecting C compiler ABI info - done\n -- Detecting C compile features\n -- Detecting C compile features - done\n -- Check for working CXX compiler: /usr/bin/g++\n -- Check for working CXX compiler: /usr/bin/g++ -- works\n -- Detecting CXX compiler ABI info\n -- Detecting CXX compiler ABI info - done\n -- Detecting CXX compile features\n -- Detecting CXX compile features - done\n -- Configuring done\n -- Generating done\n -- Build files have been written to: /example/build\n $ ibt make\n Scanning dependencies of target hello-world\n [ 50%] Building CXX object CMakeFiles/hello-world.dir/hello-world.cpp.o\n [100%] Linking CXX executable hello-world\n [100%] Built target hello-world\n $ ibt exec first second third\n Hello world\n argc=4\n argv[0] = ./hello-world\n argv[1] = first\n argv[2] = second\n argv[3] = third\n $ ibt info\n IBT: Isolated Build Tool\n https://github.com/rcook/ibt\n\n System information:\n Docker: installed\n\n Context information:\n Working directory: /home/user/src/ibt/example\n User: user (1002)\n Group: group (1003)\n\n Project information:\n Project directory: /home/user/src/ibt/example\n Project ID: 789dbc504a0690d786ddd43474dfbcc5\n Configuration file: /home/user/src/ibt/example/Ibtfile\n Temporary directory: /home/user/src/ibt/example/.ibt\n\n Project user information:\n User: user (1002)\n Group: group (1003)\n\n Docker container information:\n Docker image ID: ibt-789dbc504a0690d786ddd43474dfbcc5\n Project directory: /example\n Temporary directory: /example/.ibt\n Docker base image: ibt/debian-gcc6\n\n IBT status:\n Temporary directory: exists\n Docker image: built\n\n Project aliases:\n cmake = run 'cd $IBTPROJECTDIR && mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug ..'\n debug = shell /bin/sh -c 'cd $IBTPROJECTDIR/build && gdb ./hello-world'\n exec = run 'cd $IBTPROJECTDIR/build && ./hello-world'\n make:\n - cd $IBTPROJECTDIR/build\n - make\n $ ibt destroy\n Destroying Docker image ibt-789dbc504a0690d786ddd43474dfbcc5\n\nDeveloper guide\n---------------\n\n`See developer guide `__\n\nLicence\n-------\n\nReleased under MIT License\n\nCopyright \u00a9 2016, Richard Cook. All rights reserved.\n\n.. |View on PyPI| image:: https://img.shields.io/pypi/v/ibt.svg\n :target: https://pypi.python.org/pypi/ibt\n.. |Licence| image:: https://img.shields.io/badge/license-MIT-blue.svg\n :target: https://raw.githubusercontent.com/rcook/ibt/master/LICENSE",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/rcook/ibt",
"keywords": "",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "ibt",
"package_url": "https://pypi.org/project/ibt/",
"platform": "",
"project_url": "https://pypi.org/project/ibt/",
"project_urls": {
"Homepage": "https://github.com/rcook/ibt"
},
"release_url": "https://pypi.org/project/ibt/0.7/",
"requires_dist": null,
"requires_python": "",
"summary": "Simple wrappers around Docker etc. for fully isolated build environments",
"version": "0.7"
},
"last_serial": 4173749,
"releases": {
"0.1": [
{
"comment_text": "",
"digests": {
"md5": "b71f46f9edf5c2d00eb5a657cb42072d",
"sha256": "5eaf45158ce23c84034efb61aac7c46a76e42bd3fa713dcd8eb5fb2c5849d6c4"
},
"downloads": -1,
"filename": "ibt-0.1.tar.gz",
"has_sig": false,
"md5_digest": "b71f46f9edf5c2d00eb5a657cb42072d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12144,
"upload_time": "2017-10-30T19:06:09",
"url": "https://files.pythonhosted.org/packages/03/06/0bf4803ad7ff4dc7b52250a782c556c42a1976a0ccd11ba7945c0293637a/ibt-0.1.tar.gz"
}
],
"0.2": [
{
"comment_text": "",
"digests": {
"md5": "0258e988ab4168101426fda980844c23",
"sha256": "8b25c7060a573b3fbf5be70d1c67a97b8f69ab9fe5876a543466109e954e55bd"
},
"downloads": -1,
"filename": "ibt-0.2.tar.gz",
"has_sig": false,
"md5_digest": "0258e988ab4168101426fda980844c23",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11876,
"upload_time": "2018-08-09T17:34:17",
"url": "https://files.pythonhosted.org/packages/6e/08/4b3296c50f5b7e83e9e96d5e2ae5996ddffa6e3e15d259875aa167149a97/ibt-0.2.tar.gz"
}
],
"0.3": [
{
"comment_text": "",
"digests": {
"md5": "0dd81c4d03fa0b2e32b991ac39817fa5",
"sha256": "217c8b4fc7ba9289a7c69016bc61dd0829a6e21631844238e7ee0e657d9b3f19"
},
"downloads": -1,
"filename": "ibt-0.3.tar.gz",
"has_sig": false,
"md5_digest": "0dd81c4d03fa0b2e32b991ac39817fa5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15572,
"upload_time": "2018-08-14T03:53:48",
"url": "https://files.pythonhosted.org/packages/9a/fd/f16d75d0d3838f39688da27074ae4623291ba57b708a90a906e43fb4e6f7/ibt-0.3.tar.gz"
}
],
"0.4": [
{
"comment_text": "",
"digests": {
"md5": "9744d7c23eeead25eb92de2e9ca2d87d",
"sha256": "6f77d5ce6418426312b62fa60a9e3c71a61850b833492923fc6093f109d13b64"
},
"downloads": -1,
"filename": "ibt-0.4.tar.gz",
"has_sig": false,
"md5_digest": "9744d7c23eeead25eb92de2e9ca2d87d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12045,
"upload_time": "2018-08-14T21:06:56",
"url": "https://files.pythonhosted.org/packages/9f/11/6bc4174c3b4c5645786529fe28949bd0c82d8d2b4c726056e2619b517fc9/ibt-0.4.tar.gz"
}
],
"0.5": [
{
"comment_text": "",
"digests": {
"md5": "01d8694929f741ba12aa5198fdb6fc4a",
"sha256": "0ce79901c0465b25f641f50c89e871de87426dace6dfd70a29662e043f3b9265"
},
"downloads": -1,
"filename": "ibt-0.5.tar.gz",
"has_sig": false,
"md5_digest": "01d8694929f741ba12aa5198fdb6fc4a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13067,
"upload_time": "2018-08-14T21:16:24",
"url": "https://files.pythonhosted.org/packages/10/dd/2388d506653fb2a8c66b86839523a2cc1a701f635dae47f45d5eca64a95e/ibt-0.5.tar.gz"
}
],
"0.6": [
{
"comment_text": "",
"digests": {
"md5": "ce12e71e83534473fe83301a48c8a0d6",
"sha256": "5561387474c11e939d75e3b6c0f0c31efb7827b4ef4ade7b1d02cc75156c425b"
},
"downloads": -1,
"filename": "ibt-0.6.tar.gz",
"has_sig": false,
"md5_digest": "ce12e71e83534473fe83301a48c8a0d6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13161,
"upload_time": "2018-08-14T21:29:36",
"url": "https://files.pythonhosted.org/packages/0c/f8/384424b7702c996dede2202c1ad82a9bdb919aa20e5cde6b0b2da01ef7d4/ibt-0.6.tar.gz"
}
],
"0.7": [
{
"comment_text": "",
"digests": {
"md5": "c655fd6a2048f2e0bca52b039f86c250",
"sha256": "002c706ec6b6d80960e1ff87146d516312e5b4a2cb35de4dac481fb1a733133e"
},
"downloads": -1,
"filename": "ibt-0.7.tar.gz",
"has_sig": false,
"md5_digest": "c655fd6a2048f2e0bca52b039f86c250",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13644,
"upload_time": "2018-08-15T16:57:00",
"url": "https://files.pythonhosted.org/packages/8a/36/d973d4ee760fbb12ffa8dc241ee7c9139a7cd63afd6e49aa57c4b3377e1b/ibt-0.7.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "c655fd6a2048f2e0bca52b039f86c250",
"sha256": "002c706ec6b6d80960e1ff87146d516312e5b4a2cb35de4dac481fb1a733133e"
},
"downloads": -1,
"filename": "ibt-0.7.tar.gz",
"has_sig": false,
"md5_digest": "c655fd6a2048f2e0bca52b039f86c250",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13644,
"upload_time": "2018-08-15T16:57:00",
"url": "https://files.pythonhosted.org/packages/8a/36/d973d4ee760fbb12ffa8dc241ee7c9139a7cd63afd6e49aa57c4b3377e1b/ibt-0.7.tar.gz"
}
]
}