Org babel extension to build docker images based on org babel source blocks.
- docker
Please refer to this page for more information on installing docker
.
Recommended install via use-package and quelpa.
(use-package ob-docker-build
:ensure-system-package docker
:ensure t
:defer t
:quelpa ((ob-docker-build :fetcher github :repo "ifitzpat/ob-docker-build") :upgrade t)
:config
(add-to-list 'org-babel-load-languages '(docker-build . t))
(org-babel-do-load-languages 'org-babel-load-languages org-babel-load-languages)
)
Calling C-c C-c
on dockerfile source blocks calls docker build
on that block. Use the :dir
header argument to specify the build
context (i.e., where your source files are). Optionally provide the :push
header argument to push your image to the specified registry following build.
#+begin_src docker-build :dir "/path/to/source" :push hub.docker.com/username/imagename:tagname :tag my-image:latest FROM ubuntu:18.04 #+end_src
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are extremely appreciated.
- Fork the Project
- Create your Feature Branch (git checkout -b feature/AmazingFeature)
- Commit your Changes (git commit -m ‘Add some AmazingFeature’)
- Push to the Branch (git push origin feature/AmazingFeature)
- Open a Pull Request
Distributed under the GPLv3. See LICENSE for more information.
Dr. Ian FitzPatrick - @ifitzpat - [email protected]
Project Link: https://github.com/fitzpat/ob-docker-build