Skip to content

Commit

Permalink
Porter skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyrickard committed Aug 21, 2019
1 parent 5c5e87d commit 2911540
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .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
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
Dockerfile
cnab/
17 changes: 17 additions & 0 deletions 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
46 changes: 46 additions & 0 deletions 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.
53 changes: 53 additions & 0 deletions 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

0 comments on commit 2911540

Please sign in to comment.