Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 2.26 KB

README.md

File metadata and controls

50 lines (32 loc) · 2.26 KB

Compiler-Explorer-Docker

Host your own Compiler Explorer instance in docker container!

Requirements

Note

Hyper-V Windows feature is not really required if you use process isolation for both the image build & runtime.

How to

Important

If using Docker Desktop - first make sure you have switched to Containers for Windows. If you are CLI user and have client & daemon headless, then use appropriate windows build context.

Containers for Windows

Build and run

Clone the repository

git clone https://github.com/Devsh-Graphics-Programming/Compiler-Explorer-Docker.git

enter the cloned directory, build the image

docker build --isolation "process" -t godbolt/nano .

Tip

I highly recommend to build the image without virtualization (process isolation) to use all host resources, HyperV isolation will assign 1/2 CPUs + 1GB of RAM by default hence the result could be < 10x slower build without assigning cpu resources by hand. If you get an error and can't use process isolation it's because your host kernel version is too low - update your OS or switch to HyperV (skip --process "isolation" flag).

Tip

The image is built with default set of options, there are a few you can override (eg. NodeJS version, remote & sha of CE). See Dockerfile code for more details.

run the container

docker run -p 80:10240 -it godbolt/nano

and open your browser with http://localhost.

Important

You should use produced image as base to provide your own compilers (installation binaries) & configuration files for CE to use them. By default we run it without any compilers.