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

**URL:** <https://discourse.julialang.org/t/packagecompiler-jl-doesnt-work-in-docker-when-compiling-http-jl/95329>\
**Category:** Web Stack\
**Created:** [February 28, 2023, 12:57pm UTC](https://discourse.julialang.org/t/packagecompiler-jl-doesnt-work-in-docker-when-compiling-http-jl/95329 "2023-02-28T12:57:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [February 28, 2023, 12:57pm UTC](https://discourse.julialang.org/t/packagecompiler-jl-doesnt-work-in-docker-when-compiling-http-jl/95329/1 "2023-02-28T12:57:40Z")

</div>

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

```julia
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?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [February 28, 2023, 1:00pm UTC](https://discourse.julialang.org/t/packagecompiler-jl-doesnt-work-in-docker-when-compiling-http-jl/95329/2 "2023-02-28T13:00:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [February 28, 2023, 1:11pm UTC](https://discourse.julialang.org/t/packagecompiler-jl-doesnt-work-in-docker-when-compiling-http-jl/95329/3 "2023-02-28T13:11:13Z")

</div>

```julia
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?)
