-
Install dependencies
npm install
-
Build the docker image.
docker build --pull --rm -f "Dockerfile" -t rheasample:latest "."
-
Run docker in privileged mode so that you can run iptables commands.
docker run --privileged --rm -it rheasample:latest
-
In docker container, run
DEBUG=* \
AMQP_HOST="HOST" \
AMQP_USERNAME="USERNAME" \
AMQP_PASSWORD="PASSWORD" \
RECEIVER_ADDRESS="ADDRESS" \
node index.js
One of two things should happen after the iptables INPUT rule is removed.
- After some time, an error (e.g. ECONNRESET) crashes the process.
- Nothing happens, but the process doesn't exit even though all connections should be closed. (It's possible that waiting a long enough time might cause something to happen).
If you're not seeing an error, you can play with the DURATION
environment variable to change how long the network is in a bad state.
Currently defaulted to 120000 ms (2 minutes).