| 1 |
# todo: use a more lightweight base, e.g., Alpine Linux |
| 2 |
FROM ubuntu:18.04 |
| 3 |
|
| 4 |
ENV LANG en_US.UTF-8 |
| 5 |
ENV LANGUAGE en_US.UTF-8 |
| 6 |
ENV TERM screen-256color |
| 7 |
|
| 8 |
# install mitmproxy, asciinema, and dependencies |
| 9 |
RUN apt-get update && apt-get install --no-install-recommends -y \ |
| 10 |
asciinema \ |
| 11 |
autoconf \ |
| 12 |
automake \ |
| 13 |
autotools-dev \ |
| 14 |
bison \ |
| 15 |
curl \ |
| 16 |
git \ |
| 17 |
libevent-dev \ |
| 18 |
libtool \ |
| 19 |
locales \ |
| 20 |
m4 \ |
| 21 |
make \ |
| 22 |
ncurses-dev \ |
| 23 |
pkg-config \ |
| 24 |
python3-pip \ |
| 25 |
python3 \ |
| 26 |
python3-setuptools \ |
| 27 |
wget \ |
| 28 |
xterm \ |
| 29 |
&& locale-gen --purge "en_US.UTF-8" \ |
| 30 |
&& update-locale "LANG=en_US.UTF-8" \ |
| 31 |
&& pip3 install --no-cache-dir libtmux curl requests mitmproxy \ |
| 32 |
&& rm -rf /var/lib/apt/lists/* |
| 33 |
|
| 34 |
# install latest tmux (to support popups) |
| 35 |
RUN git clone --depth 1 https://github.com/tmux/tmux.git \ |
| 36 |
&& cd tmux \ |
| 37 |
&& sh autogen.sh \ |
| 38 |
&& ./configure && make && make install \ |
| 39 |
&& cd ../ \ |
| 40 |
&& rm -rf tmux |
| 41 |
|
| 42 |
WORKDIR /root/clidirector |
| 43 |
|
| 44 |
COPY ./docker/tmux.conf ../.tmux.conf |
| 45 |
COPY clidirector.py screenplays.py record.py ./ |
| 46 |
|
| 47 |
RUN echo 'PS1="[tutorial@mitmproxy] $ "' >> /root/.bashrc |
| 48 |
|
| 49 |
ENTRYPOINT [ "./record.py" ] |