Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.
/ rce-images Public archive

RCE Runtime Images for running user code.

License

Notifications You must be signed in to change notification settings

xosnrdev/rce-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rce-images

Deprecated

Important

This repo is deprecated and has been moved to https://github.com/ToolKitHub/rce-images

Overview

This are runtime docker images used by cexaengine.com to run user code. The images are built using nix which are pinned to a specific nixpkgs commit to create reproducible images. See the overview on how everything is connected.

RCE Runner

The rce-runner is installed in each image which writes the files inside the container, compiles and runs the code and returns the result as a json payload.

Images

Prebuilt images can be found on Docker Hub.

Example

echo '{
  "language": "javascript",
  "files": [{
    "name": "main.js",
    "content": "console.log(\"Hello World!\");"
  }]
}' | docker run --rm -i --read-only --tmpfs /tmp:rw,noexec,nosuid,size=65536k --tmpfs /home/rce:rw,exec,nosuid,uid=1000,gid=1000,size=131072k -u rce -w /home/rce rce/javascript:latest

Result

{ "stdout": "Hello World!\n", "stderr": "", "error": "" }