DEV Community

Cover image for [FAST] The Super Flash Docker Command
Everton Tenorio
Everton Tenorio

Posted on • Edited on

[FAST] The Super Flash Docker Command

Today's Fast and Simple Tip is about docker.

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
Enter fullscreen mode Exit fullscreen mode

The run.sh could be something like:

#!/bin/sh

cd /app
npm i ...
etc ...
npm run serve -- --host 0.0.0.0
Enter fullscreen mode Exit fullscreen mode

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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more