Docker Administration Series - Docker Commands

·

2 min read

Docker Administration Series -
                               Docker Commands

Table of contents

𝐇𝐚𝐯𝐞 đČ𝐹𝐼 đœđĄđžđœđ€đžđ 𝐹𝐼𝐭 𝐌đČ 𝐧𝐞𝐰 đƒđšđœđ€đžđ« đ’đžđ«đąđžđŹ?? đŸ€”đŸ€”

𝐃𝐎𝐂𝐊𝐄𝐑 𝐂𝐎𝐌𝐌𝐀𝐍𝐃𝐒 ...

đŸ“Œđ…đšđ« đœđĄđžđœđ€đąđ§đ  đƒđšđœđ€đžđ« đ•đžđ«đŹđąđšđ§..

    docker --version

📌𝐓𝐹 đœđĄđžđœđ€ 𝐭𝐡𝐞 đœđšđŠđ©đ„đžđ­đž đąđ§đŸđšđ«đŠđšđ­đąđšđ§ 𝐚𝐛𝐹𝐼𝐭 đƒđšđœđ€đžđ« 𝐇𝐹𝐬𝐭..

    docker info

📌𝐓𝐹 𝐱𝐝𝐞𝐧𝐭𝐱𝐟đČ 𝐭𝐡𝐞 đšđŸđŸđąđœđąđšđ„ 𝐱𝐩𝐚𝐠𝐞𝐬 đŸđ«đšđŠ 𝐭𝐡𝐞 đƒđšđœđ€đžđ« 𝐇𝐼𝐛..

    docker search <image name>

📌𝐓𝐹 đ«đźđ§ 𝐭𝐡𝐞 𝐱𝐩𝐚𝐠𝐞..

    docker run <image name>

📌𝐓𝐹 đœđĄđžđœđ€ 𝐭𝐡𝐞 đ„đ±đąđ­đžđ đ‚đšđ§đ­đšđąđ§đžđ« 𝐬𝐭𝐚𝐭𝐞..

    docker ps -a

📌𝐓𝐹 đœđĄđžđœđ€ 𝐭𝐡𝐞 𝐑𝐼𝐧𝐧𝐱𝐧𝐠 đ‚đšđ§đ­đšđąđ§đžđ« 𝐬𝐭𝐚𝐭𝐞..

    docker ps

📌𝐓𝐹 đ„đšđ đ đžđ 𝐱𝐧 𝐱𝐧𝐭𝐹 𝐭𝐡𝐞 đ‚đšđ§đ­đšđąđ§đžđ«..

    docker run -it <image name> bash

📌𝐓𝐹 đ«đźđ§ 𝐚𝐬 𝐚 đđšđœđ€đ đ«đšđźđ§đ đ©đ«đšđœđžđŹđŹ..

    docker run -dit <image name>  (-d:Detached Mode)

📌𝐓𝐹 đœđ«đžđšđ­đž 𝐚 𝐧𝐞𝐰 đ©đ«đšđœđžđŹđŹ 𝐹𝐟 𝐚 đ‚đšđ§đ­đšđąđ§đžđ«..

    docker exec -it <container-id> bash

📌𝐓𝐹 đšđ§đ„đČ đđšđ°đ§đ„đšđšđ 𝐭𝐡𝐞 𝐱𝐩𝐚𝐠𝐞 đŸđ«đšđŠ đƒđšđœđ€đžđ« 𝐇𝐼𝐛..

    docker pull <image name>

📌𝐓𝐹 đœđĄđžđœđ€ 𝐭𝐡𝐞 𝐱𝐩𝐚𝐠𝐞𝐬 𝐱𝐧𝐬𝐱𝐝𝐞 đšđźđ« 𝐌𝐚𝐜𝐡𝐱𝐧𝐞..

    docker images

📌𝐓𝐹 đœđĄđžđœđ€ đœđšđŠđ©đ„đžđ­đž đąđ§đŸđšđ«đŠđšđ­đąđšđ§ 𝐚𝐛𝐹𝐼𝐭 𝐹𝐧𝐞 đ©đšđ«đ­đąđœđźđ„đšđ« 𝐱𝐩𝐚𝐠𝐞..

    docker image inspect <image name>

📌𝐓𝐹 đ«đžđŠđšđŻđž đšđ„đ„ đ„đ±đąđ­đžđ đ‚đšđ§đ­đšđąđ§đžđ«..

   docker system prune

📌𝐓𝐹 𝐬𝐞𝐭 𝐭𝐡𝐞 𝐧𝐚𝐩𝐞 𝐹𝐟 𝐭𝐡𝐞 đƒđšđœđ€đžđ« đ‚đšđ§đ­đšđąđ§đžđ«..

    docker run -d --name (random name) <image name>

📌𝐓𝐹 đœđĄđžđœđ€ đœđšđŠđ©đ„đžđ­đž đąđ§đŸđšđ«đŠđšđ­đąđšđ§ 𝐚𝐛𝐹𝐼𝐭 𝐹𝐧𝐞 đ©đšđ«đ­đąđœđźđ„đšđ« đ‚đšđ§đ­đšđąđ§đžđ«(𝐱𝐭 đŹđĄđšđźđ„đ 𝐛𝐞 𝐱𝐧 đ«đźđ§đ§đąđ§đ  𝐬𝐭𝐚𝐭𝐞)..

    docker container inspect <container-id>

📌𝐓𝐹 𝐚𝐭𝐭𝐚𝐜𝐡 đ©đšđ«đ­ 𝐱𝐧𝐬𝐱𝐝𝐞 đœđšđ§đ­đšđąđ§đžđ«..

    docker run -dit -p 8080:80 <image name>

Community and Social Footprints :

Did you find this article valuable?

Support Cloudnloud Tech Community by becoming a sponsor. Any amount is appreciated!