Sign inSign up

alcoding/compiler_store

By alcoding

Updated about 7 years ago

A dockerfile that contains a script to compile code in C, C++, Python and Java.

Image
0

10K+

alcoding/compiler_store repository overview

compiler_store

A dockerfile that contains a script to compile code in C, C++, Python and Java.

Description

The image is based off alpine linux base image, and contains necessary tools to compile code in C, C++, python(2 and 3) and Java. It also contains a script that compiles code according to parameters specified in a JSON file. More details below.

Building
  1. Option 1: Build the image from source.
  • Clone this repo, and cd into it.
  • Run docker build -t alcoding/compiler_store . to build the image with the appropriate name
  1. Option 2: Pull image from Docker Hub
  • Run docker pull alcoding/compiler_store.
Running
  1. Create an JSON file with appropriate parameters (Mentioned below)
  2. Create and run the container in interactive mode and pass the JSON file as stdin.
    Example docker run --rm -i alcoding/compiler_store < example.json

Options

Input json
AttributeOptionsDefaultDescription
languagestringnoneSpecifies one of the supported languages. (Refer the table below)
stdinstring""Specifies the standard input for the program. Note: This overrides 'testCases'.
testCasesarray(strings)[""]Specifies the test cases to run.
timeoutstring0Specifies the timeout before program is killed. timeout is a floating point number with an optional suffix: 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days. A duration of 0 disables the associated timeout.
filesarray(object)[]Specifies files to compile and run.
files:[object]json object{}Contains two parameters: "name" of the file and "content" of that specific file.
Supported languages
CodenameLanguage
cC language
cppC++11
pythonPython3.6
python3Python3.6
python2Python2.7
javaJava(openjdk8)

Tag summary

Content type

Image

Digest

Size

148.3 MB

Last updated

about 7 years ago

docker pull alcoding/compiler_store