PackageCompiler.jl doesn't work in Docker when compiling HTTP.jl

LoadError: could not find a compiler, looked for gcc and clang when I try to compile HTTP.jl

using Pkg;
Pkg.add("HTTP")
Pkg.add("PackageCompiler")

using PackageCompiler
create_sysimage(["HTTP"]; sysimage_path="/ExampleSysimage.so")

The Docker I run this from is FROM julia:latest

What command do I need to add to my Dockerfile to install a compiler?

apt-get update && apt-get install -y gcc

1 Like
RUN apt-get update -y && \
    apt-get install clang -y

I ended up adding these lines to my Dockerfile if you prefer Clang (which is LLVM?)