FROM node:20.18.1 # If iproute2 is not installed, # node can't figure out what address to bind 0.0.0.0 to RUN apt-get update && apt-get install iproute2 python3 --yes \ && git clone https://github.com/httptoolkit/httptoolkit-ui WORKDIR httptoolkit-ui RUN git checkout a0dbb8e1cd38b346fe411b03de0c5191ff06c669 \ && npm i && npm run server:setup ARG DOCKER_HOST=localhost # This gets sent to the browser as a server URL, # so it is important that it is set to the domain / ip of the server. RUN sed -i "s/127.0.0.1/${DOCKER_HOST}/" src/model/proxy-store.ts \ && npm run build:default # Can take a long time CMD npm exec static-server ./dist -o