Sometimes, I invoke the super flash docker like this:
docker run -dt --rm --entrypoint ./app/run.sh --name same-name -v $(pwd):/app -p 8080:8080 node:20-alpine
The run.sh
could be something like:
#!/bin/sh
cd /app
npm i ...
etc ...
npm run serve -- --host 0.0.0.0
Less need for building, useful for real-time testing of the app being developed, on-demand. Additionally, if something goes wrong, the --rm
flag will remove the container when stopped, and with --entrypoint ./app/run.sh
, I customize how the container runs without relying on the original entry point of the image. Nothing against Dockerfile.
Top comments (0)