From 883b48361f4f28ec6aa11951c13d3c44e0805742 Mon Sep 17 00:00:00 2001 From: nunix Date: Tue, 12 Feb 2019 15:32:22 +0100 Subject: [PATCH] adding the initial CNAB files --- README.md | 1 + cnab/app/run | 2 ++ porter.yaml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 README.md create mode 100755 cnab/app/run create mode 100755 porter.yaml diff --git a/README.md b/README.md new file mode 100644 index 0000000..a295fd8 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# wslcnab diff --git a/cnab/app/run b/cnab/app/run new file mode 100755 index 0000000..608b0eb --- /dev/null +++ b/cnab/app/run @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +exec /cnab/app/porter-runtime run -f /cnab/app/porter.yaml diff --git a/porter.yaml b/porter.yaml new file mode 100755 index 0000000..04f21b1 --- /dev/null +++ b/porter.yaml @@ -0,0 +1,60 @@ +# This is the configuration for Porter +# You must define steps for each action, but the rest is optional +# Uncomment out the sections below to take full advantage of what Porter can do! + +mixins: + - exec + +name: WSLDISTRO +version: 0.1.0 +description: "Build WSL distros from Docker containers" +invocationImage: wsl-distro:latest + +install: + - description: "Export the Docker container to TAR file" + exec: + command: "/mnt/c/Program Files/Docker/Docker/Resources/bin/docker.exe" + arguments: + - export + - --output + - ./alpine.tar + - alpine + + - description: "Install a new WSL distro" + exec: + command: /mnt/c/WINDOWS/system32/wsl.exe + arguments: + - --import + - "wslcustom" + - "./wslcustom" + - "./alpine.tar" + +uninstall: + - description: "Uninstall a WSL distro" + exec: + command: /mnt/c/WINDOWS/system32/wsl.exe + arguments: + - --unregister + - "wslcustom" + +parameters: + - name: distro_name + type: string + default: wslcustom + + - name: distro_path + type: string + default: "/mnt/c/github/wslcustom" + + - name: distro_source + type: string + default: "/mnt/c/github/ubuntu1904.tar" + +#dependencies: +# - name: mysql +# parameters: +# database-name: wordpress + +#credentials: +# - name: kubeconfig +# path: /root/.kube/config