added first docker baesd runtime
This commit is contained in:
commit
e9f82237cf
|
@ -0,0 +1,26 @@
|
||||||
|
- hosts: localhost
|
||||||
|
tasks:
|
||||||
|
# Create folder for execution
|
||||||
|
- name: Create dir
|
||||||
|
file:
|
||||||
|
state: directory
|
||||||
|
path: "/tmp/{{ runtime }}"
|
||||||
|
|
||||||
|
# Pull repository
|
||||||
|
- name: pull repository
|
||||||
|
git:
|
||||||
|
repo: "{{ repository }}"
|
||||||
|
version: "{{ version }}"
|
||||||
|
dest: "/tmp/{{ runtime }}"
|
||||||
|
|
||||||
|
# Packer build
|
||||||
|
- name: build
|
||||||
|
command: packer build build.json
|
||||||
|
args:
|
||||||
|
chdir: "/tmp/{{ runtime }}"
|
||||||
|
|
||||||
|
# Destroy folder for execution
|
||||||
|
- name: Destroy build folder
|
||||||
|
file:
|
||||||
|
state: absent
|
||||||
|
path: "/tmp/{{ runtime }}"
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"id":"30f71218-82e8-4d5f-8c98-54ea6e3ae696",
|
||||||
|
"active":true,
|
||||||
|
"name":"julia",
|
||||||
|
"description":"A Julia container based on latest Julia Docker image",
|
||||||
|
"keywords":[
|
||||||
|
"Julia",
|
||||||
|
"Docker"
|
||||||
|
],
|
||||||
|
"responsible":{
|
||||||
|
"name":"Marco Lettere",
|
||||||
|
"email":"m.lettere@gmail.com"
|
||||||
|
},
|
||||||
|
"type":"docker",
|
||||||
|
"image":"julia"
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"builders": [
|
||||||
|
{
|
||||||
|
"type": "docker",
|
||||||
|
"name": "{{ user `name`}}",
|
||||||
|
"image": "julia",
|
||||||
|
"commit" : true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"provisioners": [],
|
||||||
|
"post-processors": [
|
||||||
|
{
|
||||||
|
"type": "shell-local",
|
||||||
|
"inline": ["docker tag {{ user `image`}}:latest {{ user `image`}}:{{ user `runtime`}}"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue