docker build -t us.gcr.io/tl-jvu4eyij9cslnrj0msep/trreports:0.0.3
flags -it
let you work on the docker image interactively
flags --entrypoint
lets you overwrite the Rscript
inside the
Dockerfile.
docker run -it --entrypoint bash us.gcr.io/tl-jvu4eyij9cslnrj0msep/trreports:0.0.3
Within R
> source('try_docker.R', max = Inf, echo = TRUE)
Go into the /inst/
and check the logs and HTMLS
docker push us.gcr.io/tl-jvu4eyij9cslnrj0msep/trreports:0.0.3
gcloud container clusters
get-credentials
gke-services --region us-central1
--project tl-jvu4eyij9cslnrj0msep
Run your kube cron job on the cluster
kubectl apply -f config.yaml
Delete the cron job IF it doesn't work
kubectl delete cronjob.batch/trreports