Skip to content

Instantly share code, notes, and snippets.

@sdevani
Created March 27, 2019 22:51
Show Gist options
  • Save sdevani/8ad2a3ef3764098d439d8bab3245dec7 to your computer and use it in GitHub Desktop.
Save sdevani/8ad2a3ef3764098d439d8bab3245dec7 to your computer and use it in GitHub Desktop.
# This file should live adjacent to the my_target directory.
# To use:
# Submit the build:
# $ gcloud builds submit --timeout=1h --config cloud_build_config.yaml . --project YOUR_PROJECT_NAME
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build',
'-t', 'gcr.io/$PROJECT_ID/example-image-for-pod-operator:latest',
'my_target']
id: 'my-target'
images:
- 'gcr.io/$PROJECT_ID/example-image-for-pod-operator:latest'
# This file belongs in the my_target directory.
# Start from a base image you like.
FROM gcr.io/google-appengine/python
# Run ordinary commands to set up the environment the way you like.
# Read more about Docker to see what else you can do here.
RUN pip install NumPy
USER root
RUN mkdir -p /var/local
COPY startup.sh /var/local
RUN chmod +x /var/local/startup.sh
# This will be the command that is run by this image by default.
CMD ["bash", "-c", "/var/local/startup.sh"]
# This file belongs in the my_target directory.
echo "Hello World"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment