Test Node.js Application without redeploying

Sure, shouldn’t be anything too tricky but I have to guess on a few things.

Build It:

cd ~/path/to/codebase

docker build -t mycoolimage:latest .

Run It:

docker run --rm -it -p 8080:8080 mycoolimage:latest

# Then head to http://localhost:8080 in your browser

I’m assuming port 8080 is listening for connections in the container. In other words, whatever is running in the container - your app - is setup to listen for HTTP connections on port 8080 - it might not be!

If you want to share your Dockerfile and fly.toml (redact anything sensitive) - that will help.