I've created an example of how to wrap up a simple node.js into a docker container. I'm indebted to William Blankenship's very clear article on how to do this. In fact I suggest you read that article first.
Firstly I've used the dotenv library to read a .env file from your local checkout. This file can contain all your Twitter api keys etc.
Secondly I've changed the Dockerfile slightly so that command line arguments can be passed to the script, using the ENTRYPOINT directive. Here's the Dockerfile in full:
ADD package.json package.json
RUN npm install
ADD . .
ENTRYPOINT simply allows command line arguments to be tacked onto the docker run at runtime. In this case I use it to specify the search term.
More details are available in the project's README.