---
# System prepended metadata

title: Compiling Firefox
tags: [builder, pwn, Firefox, docker]

---

# Compiling Firefox
###### tags: `Firefox` `pwn`  `builder` `docker`

## DockerFile
```
FROM ubuntu:latest
LABEL maintainer="James Turner"

ENV SHELL /bin/bash

ENV PATH="/root/.cargo/bin:${PATH}"

RUN apt-get update && \
    apt-get install -y wget python clang llvm python3 python python3-pip

RUN wget -q https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py -O /tmp/bootstrap.py

RUN pip3 install mercurial

WORKDIR /usr/local/src/firefox
```

## Execution Steps:
```
1) Once compiled, cd /tmp.

2) Run "python3 bootstrap.py"

3) ./mach configure

4) ./mach build

5) /tmp/mozilla-unified/obj-debug-x86_64-pc-linux-gnu/dist/bin/js is output


```

## Updated ghetto-iongraph.py

```
https://raw.githubusercontent.com/cddc12346/RandomCTFs/master/Some%20notes%20on%20IonMonkey/FF-91/ghetto-iongraph.py

Changes: remove the option -s strict mode
```

## mozconfig
```
# Build only the SpiderMonkey JS test shell
ac_add_options --enable-application=js

ac_add_options --enable-jitspew

ac_add_options --disable-debug

ac_add_options --enable-optimize

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@

```

## 