brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: docker run --entrypoint sh lets you look inside an image

Docker
~/tips/tip-docker-run-entrypoint-sh

docker run --rm -it --entrypoint sh nginx:stable

Starts a throwaway shell in an image so you can check what files and tools it really contains.

An image does something odd and you want to see what is in there, without starting the app.

docker run --rm -it --entrypoint sh nginx:stable

--entrypoint sh replaces the normal start command, so the app never runs. --rm removes the container when you exit. Use bash instead of sh when the image has it. Minimal images without any shell will refuse, and then docker create plus docker cp is the way in.

Further reading: docker run reference

More Docker tips ONBUILD RUN /usr/local/bin/python-build --dir /app/src SHELL ["/bin/bash", "-c"] docker commit <container> myname/testimage:version3 docker import /path/to/exampleimage.tgz docker compose events All Docker tips (192) All topics

Link