diff --git a/.docs/shipwright-logo-stacked-lightbg.svg b/.docs/shipwright-logo-stacked-lightbg.svg new file mode 100644 index 0000000000..3f9b279dfb --- /dev/null +++ b/.docs/shipwright-logo-stacked-lightbg.svg @@ -0,0 +1,141 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index e3afe14f65..c63d4bc8c6 100644 --- a/README.md +++ b/README.md @@ -15,19 +15,26 @@ SPDX-License-Identifier: Apache-2.0 # Shipwright +

+ +

+ Shipwright is an extensible framework for building container images on Kubernetes. ## Why? With Shipwright developers get a simplified approach for building container images, by defining a minimal YAML that does not require -any previous knowledge of containers or containers tooling. All you need is your source code in git and access to a container registry. +any previous knowledge of containers or container tooling. All you need is your source code in git and access to a container registry. -Shipwright can support any tool that can build container images, such as [Kaniko](https://github.com/GoogleContainerTools/kaniko), -[Cloud Native Buildpacks](https://buildpacks.io/), and [Buildah](https://buildah.io/). See [default strategies](#build-strategies) for more information. +Shipwright supports any tool that can build container images in Kubernetes clusters, such as: + +- [Kaniko](https://github.com/GoogleContainerTools/kaniko) +- [Cloud Native Buildpacks](https://buildpacks.io/) +- [Buildah](https://buildah.io/) ## Try It! -* We assume you already have a Kubernetes cluster (v1.18+). If you don't, you can use Kind. +* We assume you already have a Kubernetes cluster (v1.18+). If you don't, you can use [Kind](/hack/install-kind.sh). * We also require a Tekton installation (v1.19+). To install the latest version, run: @@ -38,22 +45,22 @@ Shipwright can support any tool that can build container images, such as [Kaniko * Install the necessary deployments and strategies: ```bash - $ kubectl apply --filename https://github.com/shipwright-io/build/releases/download/v0.4.0/release.yaml - $ kubectl apply --filename https://github.com/shipwright-io/build/releases/download/v0.4.0/default_strategies.yaml + $ kubectl apply --filename https://github.com/shipwright-io/build/releases/download/nightly/nightly-2021-03-03-1614768199.yaml #TODO: we dont have an asset here + $ kubectl apply --filename https://github.com/shipwright-io/build/releases/download/v0.3.0/default_strategies.yaml #TODO: we dont have an asset here ``` -* Add a push secret to your container image repository, such as one on Docker Hub or quay.io: +* Generate a secret to access your container registry, such as one on [Docker Hub](https://hub.docker.com/) or [Quay.io](https://quay.io/): ```bash - $ kubectl create secret generic push-secret \ - --from-file=.dockerconfigjson=$HOME/.docker/config.json \ - --type=kubernetes.io/dockerconfigjson + $ REGISTRY_SERVER=https://index.docker.io/v1/ REGISTRY_USER= REGISTRY_PASSWORD= + $ kubectl create secret docker-registry push-secret --docker-server=$REGISTRY_SERVER --docker-username=$REGISTRY_USER --docker-password=$REGISTRY_PASSWORD --docker-email=me@here.com ``` -* Create a Build object, replacing `` with the registry username your `push-secret` have access to: +* Create a Build object, replacing `` with the registry username your `push-secret` secret have access to: ```bash - $ kubectl apply -f - < + $ cat </nodejs:latest + image: docker.io/${REGISTRY_ORG}/nodejs:latest credentials: name: push-secret EOF ``` -* Check your build status: - ```bash $ kubectl get builds NAME REGISTERED REASON BUILDSTRATEGYKIND BUILDSTRATEGYNAME CREATIONTIME @@ -83,7 +88,7 @@ Shipwright can support any tool that can build container images, such as [Kaniko * Submit your buildrun: ```bash - $ kubectl create -f - < +$ cat < REGISTRY_PASSWORD= +$ kubectl create secret docker-registry tutorial-secret --docker-server=$REGISTRY_SERVER --docker-username=$REGISTRY_USER --docker-password=$REGISTRY_PASSWORD --docker-email=me@here.com +``` + +For more information about authentication, please refer to the related [docs](/docs/development/authentication.md). + +### Ensure all Build strategies exist + +Execute the following script from the root directory of this repository: + +```sh +make install-strategies +``` + +The default installation includes these [buildstrategies](docs/buildstrategies.md): + +* [Source-to-Image](docs/buildstrategies.md#source-to-image) +* [Buildpacks-v3](docs/buildstrategies.md#buildpacks-v3) +* [Buildah](docs/buildstrategies.md#buildah) +* [Kaniko](docs/buildstrategies.md#kaniko) +* [ko](docs/buildstrategies.md#ko) + +## Building with a Dockerfile-based strategy + +In this section we will provide an example on how to Build an application from a Dockerfile. + +Because of the Dockerfile presence, we require a Dockerfile-based strategy. + +### Example with Kaniko + +Let´s see how to [build with Kaniko](/docs/tutorials/building_with_kaniko.md). + +## Building with a Dockerfile-less strategy + +In this section we will provide an example on how to Build an application that knows nothing about docker. + +For this we require a Dockerfile-less strategy. + +Let´s see how to [build with Paketo](/building_with_paketo.md).