diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..2919244 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +# See https://docs.docker.com/engine/reference/builder/#dockerignore-file +# Put files here that you don't want copied into your bundle's invocation image +.gitignore +Dockerfile.tmpl diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a658259 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +Dockerfile +cnab/ diff --git a/Dockerfile.tmpl b/Dockerfile.tmpl new file mode 100644 index 0000000..f3fc866 --- /dev/null +++ b/Dockerfile.tmpl @@ -0,0 +1,17 @@ +FROM quay.io/deis/lightweight-docker-go:v0.2.0 +FROM debian:stretch +COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt + +ARG BUNDLE_DIR + +# This is a template Dockerfile for the bundle's invocation image +# You can customize it to use different base images, install tools and copy configuration files. +# +# Porter will use it as a template and append lines to it for the mixins +# and to set the CMD appropriately for the CNAB specification. +# +# Add the following line to porter.yaml to instruct Porter to use this template +# dockerfile: Dockerfile.tmpl + +# Use the BUNDLE_DIR build argument to copy files into the bundle +# COPY . $BUNDLE_DIR diff --git a/README.md b/README.md new file mode 100644 index 0000000..7c69389 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# My First Bundle + +This is an empty bundle that porter has created to get you started! + +# Contents + +## porter.yaml + +This is the porter manifest. See https://porter.sh/authoring-bundles/ for +details on every field and how to configure your bundle. This is a required +file. + +## README.md + +This explains the files created by `porter create`. It is not used by porter and +can be deleted. + +## Dockerfile.tmpl + +This is a template Dockerfile for the bundle's invocation image. You can +customize it to use different base images, install tools and copy configuration +files. Porter will use it as a template and append lines to it for the mixin and to set +the CMD appropriately for the CNAB specification. You can delete this file if you don't +need it. + +Add the following line to **porter.yaml** to enable the Dockerfile template: + +```yaml +dockerfile: Dockerfile.tmpl +``` + +By default, the Dockerfile template is disabled and Porter automatically copies +all of the files in the current directory into the bundle's invocation image. When +you use a custom Dockerfile template, you must manually copy files into the bundle +using COPY statements in the Dockerfile template. + +## .gitignore + +This is a default file that we provide to help remind you which files are +generated by Porter, and shouldn't be committed to source control. You can +delete it if you don't need it. + +## .dockerignore + +This is a default file that controls which files are copied into the bundle's +invocation image by default. You can delete it if you don't need it. \ No newline at end of file diff --git a/porter.yaml b/porter.yaml new file mode 100644 index 0000000..b5fe43d --- /dev/null +++ b/porter.yaml @@ -0,0 +1,53 @@ +# This is the configuration for Porter +# You must define steps for each action, but the rest is optional +# See https://porter.sh/authoring-bundles for documentation on how to configure your bundle +# Uncomment out the sections below to take full advantage of what Porter can do! + +name: HELLO +version: 0.1.0 +description: "An example Porter configuration" +invocationImage: porter-hello:latest +tag: deislabs/porter-hello-bundle:latest + +# Uncomment out the line below to use a template Dockerfile for your invocation image +#dockerfile: Dockerfile.tmpl + +mixins: + - exec + +install: + - exec: + description: "Install Hello World" + command: bash + arguments: + - -c + - echo Hello World + +upgrade: + - exec: + description: "World 2.0" + command: bash + arguments: + - -c + - echo World 2.0 + +uninstall: + - exec: + description: "Uninstall Hello World" + command: bash + arguments: + - -c + - echo Goodbye World + + +# See https://porter.sh/authoring-bundles/#dependencies +#dependencies: +# mysql: +# tag: deislabs/porter-mysql:latest +# parameters: +# database-name: wordpress + +# See https://porter.sh/wiring/#credentials +#credentials: +# - name: kubeconfig +# path: /root/.kube/config