irvinlim / shopify-ess-docker

Dockerfile for Shopify's ESS sandbox to execute untrusted Ruby scripts

Home Page:https://hub.docker.com/r/irvinlim/shopify-ess/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shopify Enterprise Script Service (ESS)

Dockerfile for Shopify/ess (also known as Shopify Scripts) to execute untrusted Ruby scripts in a sandbox.

Usage

In the directory where your script is located, you can simply run the container as follows, assuming that yourscript.rb is the name of the Ruby script you wish to execute:

docker run --rm -v "$PWD:/scripts" irvinlim/shopify-ess:latest pretty yourscript.rb

Alternatively, to pass a script via stdin, run the container in interactive mode with -i:

echo "@output = 25 + 10" | docker run --rm -i irvinlim/shopify-ess:latest pretty

The pretty executable produces prettified output to your terminal. If you need a parseable format, JSON is available through the json command as well.

Alternatively, you can also fall back to the sandbox executable as provided by Shopify, which produces the unformatted Ruby #<struct ...> output.

License

MIT

About

Dockerfile for Shopify's ESS sandbox to execute untrusted Ruby scripts

https://hub.docker.com/r/irvinlim/shopify-ess/


Languages

Language:Ruby 100.0%