$30 off During Our Annual Pro Sale. View Details »

Shipwright Overview

Shingo.Kitayama
September 27, 2021

Shipwright Overview

This slide introduces the overview of "Shipwright", which is a framework for building container images on Kubernetes.

The slide was published at the following event.
[ Kubernetes Meetup Tokyo #45 ]
https://k8sjp.connpass.com/event/223232/

Shingo.Kitayama

September 27, 2021
Tweet

More Decks by Shingo.Kitayama

Other Decks in Technology

Transcript

  1. View Slide

  2. View Slide

  3. View Slide

  4. いらすとや
    $ docker build
    $ docker push
    $ docker run

    View Slide

  5. View Slide

  6. View Slide

  7. ---
    apiVersion: shipwright.io/v1alpha1
    kind: Build
    metadata:
    name: go-tutorial-kaniko
    spec:
    source:
    url: https://github.com/shipwright-io/sample-go
    contextDir: docker-build
    strategy:
    name: kaniko
    kind: ClusterBuildStrategy
    output:
    image: docker.io/${REGISTRY_USER}/${REGISTRY_REPO}/go-tutorial
    credentials:
    name: dockerhub-token

    View Slide

  8. ---
    apiVersion: shipwright.io/v1alpha1
    kind: BuildRun
    metadata:
    generateName: go-tutorial-kaniko-run-
    spec:
    buildRef:
    name: go-tutorial-kaniko
    ## Register the Build Object.
    $ cat ./builds/go-tutorial-kaniko.yaml |envsubst |kubectl apply -f –
    ## Execute Build process by BuildRun
    $ kubectl create -f ./buildruns/go-tutorial-kaniko-run.yaml

    View Slide

  9. View Slide

  10. ---
    apiVersion: shipwright.io/v1alpha1
    kind: ClusterBuildStrategy
    metadata:
    name: kaniko
    spec:
    buildSteps:
    - name: build-and-push
    image: gcr.io/kaniko-project/executor:v1.6.0

    command:
    - /kaniko/executor
    args:
    - --skip-tls-verify=true
    - --dockerfile=$(build.dockerfile)
    - --context=$(params.shp-source-context)
    - --destination=$(params.shp-output-image)
    - --oci-layout-path=/kaniko/oci-image-layout
    - --snapshotMode=redo
    - --push-retry=3

    View Slide

  11. View Slide

  12. View Slide

  13. View Slide