From e9f82237cf84ead8e96a7b79083007060700c566 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Thu, 25 Aug 2022 16:36:48 +0200 Subject: [PATCH] added first docker baesd runtime --- build.yaml | 26 ++++++++++++++++++++++++++ julia/descriptor.json | 16 ++++++++++++++++ julia/packer.json | 17 +++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 build.yaml create mode 100644 julia/descriptor.json create mode 100644 julia/packer.json diff --git a/build.yaml b/build.yaml new file mode 100644 index 0000000..e244ad6 --- /dev/null +++ b/build.yaml @@ -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 }}" diff --git a/julia/descriptor.json b/julia/descriptor.json new file mode 100644 index 0000000..5ba6a51 --- /dev/null +++ b/julia/descriptor.json @@ -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" +} diff --git a/julia/packer.json b/julia/packer.json new file mode 100644 index 0000000..651a478 --- /dev/null +++ b/julia/packer.json @@ -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`}}"] + } + ] +}