https://github.com/yoctol/ansible-dockerfile
https://github.com/yoctol/ansible-dockerfile
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yoctol/ansible-dockerfile
- Owner: Yoctol
- License: mit
- Created: 2016-05-20T08:10:29.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-04-08T14:16:06.000Z (about 8 years ago)
- Last Synced: 2025-02-27T00:16:14.161Z (over 1 year ago)
- Size: 12.7 KB
- Stars: 1
- Watchers: 13
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Role Name
=========
Role to render dockerfile with ease.
Requirements
------------
Ansible >= 1.2
Role Variables
--------------
```yaml
# Required, the path where dockerfile to be rendered on the host.
dest: ~/Dockerfile
# Opitonal, whether to show the details of role in comments. Default true.
show_role_comment: true
# Required, the image to be used in FROM instruciton as the base image.
from: scratch
# Optional, the maintainer to be used in MAINTAINER instruction.
maintainer: ''
# Optional, other instructions to be written in dockerfile.
# It would fail if invalid instruction type is used.
instructions: []
# Optional template arguments, which are the args of template module except `src`.
# If not set, default template settings are used.
# Check http://docs.ansible.com/ansible/template_module.html.
owner:
group:
mode:
backup:
force:
validate:
selevel:
serole:
setype:
seuser:
```
Example Playbook
----------------
```yaml
- hosts: servers
roles:
- role: dockerfile
dest: ~/docker/Dockerfile
template_options: owner=root mode=u=rw,g=r,o=r
show_role_comment: true
from: python:latest
matainer: me
instructions:
- ADD /my/app /to/app/path
- CMD /init.sh
```
License
-------
MIT
Author Information
------------------
Yoctol Info Inc.