Back to Writing
NOTESdockercontainersdevopsentrypoint

Docker - Customizing Container Entrypoints

August 11, 2023Updated Feb 17, 2026

When you create a container from an image like Node, most of the time Node auto-runs with all settings pre-configured, so

it's convenient to modify the Node ".sh" file.

Post image

Check which file is connected to the Entrypoint. In the case above, docker-entrypoint.sh is being used.

find / -name "docker-entrypoint.sh"

After locating the file with the find command,

(The same applies if you're using Linux.)

you can install an editor like nano or vi, and add commands to run on restart.

Post image

For example, you can enter a command like "pm2 start app.js".