Skip to content

Instantly share code, notes, and snippets.

@BenHizak
Last active August 19, 2019 15:13
Show Gist options
  • Select an option

  • Save BenHizak/ec8d537706a57a8985efb484900c1e7d to your computer and use it in GitHub Desktop.

Select an option

Save BenHizak/ec8d537706a57a8985efb484900c1e7d to your computer and use it in GitHub Desktop.
Demo of Kaniko build
#!/bin/bash
# note: run this twice. The failure is on the 2nd attempt
gcloud builds submit --config=cloudbuild.yml
# used with kaniko gcr.io/kaniko-project/executor@sha256:78d44ec4e9cb5545d7f85c1924695c89503ded86a59f92c7ae658afa3cff5400
steps:
- name: gcr.io/kaniko-project/executor:debug
args:
- --dockerfile=./Dockerfile
- --destination=gcr.io/cherre-sandbox/kaniko_example
- --cache=true
- --cache-ttl=24h
# - --verbosity=debug
FROM google/cloud-sdk:256.0.0-alpine
RUN apk add --no-cache bash
RUN mkdir -p /usr/my_work_dir
COPY *.sh /usr/my_work_dir/
RUN ls -l /workspace/
RUN ls -l /usr/my_work_dir/
RUN bash /usr/my_work_dir/file1.sh
RUN bash /usr/my_work_dir/file2.sh
#!/bin/bash
echo "this is file 1"
#!/bin/bash
echo "this is file 2"
#!/bin/bash
echo "this is a test"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment