techthinkerorg/script-runner

By techthinkerorg

Updated over 2 years ago

It will run any sh script file from any public url.

Image
Integration & delivery
API management
Developer tools
2

968

techthinkerorg/script-runner repository overview

Script-Runner

It will run script from any public url or local file.

Environment Variables:

  • SCRIPT_URL: Is used to specify script url.
  • SCRIPT_PATH: Is used to specify local script file.

How to use?

Using Docker:
  • Create Dockerfile
FROM techthinkerorg/script-runner:latest
WORKDIR /script
COPY ./your-script.sh /script/
ENV SCRIPT_PATH "your-script.sh"

or

FROM techthinkerorg/script-runner:latest
ENV SCRIPT_URL "script-location-url.sh"
  • Run docker build -f ./Dockerfile -t your-image-name .
  • Run docker run your-image-name
Using Docker run:
  • Create myscript.sh file, then execute this command.
docker run --rm -v "./myscript.sh:/script/myscript.sh" -e SCRIPT_PATH=myscript.sh techthinkerorg/script-runner:latest
Using Docker Compose:
  • Create docker-compose.yaml
version: "3"
services:
  script:
    container_name: script-runner
    image: techthinkerorg/script-runner:latest
    environment:
      - SCRIPT_URL=script-location-url.sh
  • Run compose file docker-compose up
Using Kubernetes:
  • Create your-deployment-corn.yaml
apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: your-deployment-cron
  namespace: your-name-space
spec:
  schedule: "*/5 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: your-deployment-cron
              image: techthinkerorg/script-runner:latest
              env:
                - name: SCRIPT_URL
                  value: "script-location-url.sh"
          restartPolicy: OnFailure
  • Run command kubectl apply -f your-deployment-cron.yaml

Tag summary

Content type

Image

Digest

sha256:5996c9421

Size

4.1 MB

Last updated

over 2 years ago

docker pull techthinkerorg/script-runner:1.2.2