DEV Community

loading...
Cover image for Learn Docker basics quickly!

Learn Docker basics quickly!

Jaya chandrika reddy on May 26, 2020

Article originally written at https://jayachandrika.com In this Article lets explore : Docker:What the hell is it? But why Docker?? What are C...
pic
Editor guide
Collapse
stamper profile image
Alexander Toropov

docker stop 6f
can I identify container just by first two symbols???

Collapse
chandrika56 profile image
Jaya chandrika reddy Author • Edited

Very good question.As long as any other container doesn't start with 6f, you can use 6f. Suppose container A has id '6fedstk' and B has id '6fesyiu', you have to choose atleast 6fed to represent A, to make them distinguished

Hope it was clear. Do ask for more doubtsπŸ˜„

Collapse
stamper profile image
Thread Thread
chandrika56 profile image
Jaya chandrika reddy Author

May i know the container id names and the command you used?

Thread Thread
stamper profile image
Thread Thread
chandrika56 profile image
Jaya chandrika reddy Author

Try docker stop fdd

Let me know what happens

Thread Thread
chandrika56 profile image
Jaya chandrika reddy Author

Try docker stop fdd

Let me know what happens

Thread Thread
stamper profile image
Alexander Toropov

it seems that's my bad. I'm terribly sorry.
it doesn't work for the whole container ID as well
those containers just were not started
I thought the error message will be slightly different, like 'the container is not started yet'

Thread Thread
chandrika56 profile image
Jaya chandrika reddy Author

Glad you found the solution πŸ˜„

Collapse
stamper profile image
Alexander Toropov

here is the screenshot from console ibb.co/pQXXgZX

Collapse
developertharun profile image
Tharun Shiv

Didn't know that. Thanks for letting us know ma'am πŸ‘

Collapse
uma_bcc profile image
umamaheswari.v

Good one...

Collapse
uma_bcc profile image
umamaheswari.v

You can use the #devops tag to your post, it is very relevant to devops. πŸ™‚

Collapse
praveenreddy1798 profile image
Collapse
developertharun profile image
Collapse
chandrika56 profile image
Jaya chandrika reddy Author

Thank you for the suggestion 😊

Collapse
kashyapamit profile image
Collapse
chandrika56 profile image
Jaya chandrika reddy Author

Glad you found it useful πŸ˜„

Collapse
kashyapamit profile image
Amit kashyap

Well I’m just starting with Swift Server side, so yes you had the practical examples spot on!

Thread Thread
chandrika56 profile image
Jaya chandrika reddy Author

That's cool. Best of luck!

Collapse
manishfoodtechs profile image
manish srivastava

Nice Article Ms Reddy.
1) Docker is challenged by podman on security. Google for podman. Podman and docker have same commands and you can use docker hub too.

2)dev.to/manishfoodtechs/5-minutes-c...

Collapse
chandrika56 profile image
Jaya chandrika reddy Author

Thank you manish! Read your article, its good and engaging πŸ‘Œ

Collapse
bovermyer profile image
Ben Overmyer

Yes, but podman is rather niche still. Someone reading a beginner's article like Jaya's is not going to be ready for podman.

Collapse
netops2devops profile image
Kapil Agrawal

Agree with Ben. While Podman has it's benefits over Docker it's a part of RedHat ecosystem. Also given that majority of the dev's have adopted/migrated their applications to docker there's a less of a chance they're going to shift back to a completely new product like Podman.

Thread Thread
manishfoodtechs profile image
manish srivastava

Yes Mr Aggarwal & Mr Ben .
A new learner may go for docker. But in future he has to adopt the new technology Podman which is more promising than docker.

Podman is niche technology why to try?

Since, both ( docker and redhat are OCI member , so system admins have no reasons to worry. Also , Amazon Fargate (AWS Fargate), OpenSUSE, Openshift, centos, oracle and RHEL all in latest release have dropped Docker. More and more companies are dropping docker and so system admins.

what is the problem with Docker? Actually there are few,

-A single process could be a single point of failure.
-This process owned all the child processes (the running containers).
-If there is any failure in the docker daemon, then every child processes are lost its track.
-Building containers led to security vulnerabilities.
-All Docker operations had to be conducted by a user (or users) with the same full root authority.

I use LXC & LXD and create my own secure environments. However, I don't hesitate to learn other technologies like docker or podman. What I know, More and more companies are shifting from "running Docker" to "running containers" and adapt new tools, all of which are standard-compliant and even work nicely with one another.

Here comes the role of podman which solves most of the problem.

Thread Thread
developertharun profile image
Tharun Shiv

Hi sir, where can I learn more about Podman? πŸ™‚

Thread Thread
manishfoodtechs profile image
manish srivastava

Podman is very easy if you know how to do basics of docker you know basics of podman. Commands are similar. Just you have to remove docker in command with podman. Like docker pull will be podman pull and docker run will be podman run....
To quickly learn docker here is an article of mine:
dev.to/manishfoodtechs/5-minutes-c...

Thread Thread
developertharun profile image
Tharun Shiv

Thank you so much sir. It was glad receiving reply from you, will check your article out now. πŸ™‚

Thread Thread
bovermyer profile image
Ben Overmyer

I agree with your assessment of the problems with Docker.

I'm not saying that podman is bad. I'm saying that it has no place in a beginner tutorial for Docker.

Thread Thread
netops2devops profile image
Kapil Agrawal

while Podman is promising and maybe devs will eventually shift to Podman or something new. But that shift isn't happening overnight or anytime soon is what I am saying.

Collapse
dstri26 profile image
Trideep Barik

That's a beautiful post. Loved the way you created a relation between real life and docker✨

Collapse
chandrika56 profile image
Jaya chandrika reddy Author

Very happy that it was interesting to you Mr.Trideep

Collapse
developertharun profile image
Tharun Shiv

Amazing article! Looking forward for more! Keep going.. πŸ™Œ

Collapse
chandrika56 profile image
Jaya chandrika reddy Author

Thank you for the support πŸ˜„

Collapse
praveenreddy1798 profile image
Collapse
venkat121998 profile image
venkat anirudh

Docker seems interesting. good article btw

Collapse
chandrika56 profile image
Jaya chandrika reddy Author

Glad you enjoyed it Mr.Venkat☺️

Collapse
yashraj021 profile image
Yash

Greatttttttt!!!!!

Collapse
chandrika56 profile image
Jaya chandrika reddy Author

Thank you ☺️

Collapse
akmish profile image
akmish • Edited

One of the best articles I've read on Docker, seriously.
You explained the concept and implementation in such easy and interesting way.
Kudos!
~Akshat

Collapse
chandrika56 profile image
Jaya chandrika reddy Author

Thank you very much for the encouragement πŸ˜„

Collapse
davidyaonz profile image
David Yao

Actually I use docker almost everyday but without knowing some of the facts you explained. Thanks for this great article.

Collapse
chandrika56 profile image
Jaya chandrika reddy Author

Glad you find it useful πŸ‘πŸ˜Š

Collapse
jacksoft profile image
Jacksoft CS • Edited

Tha was very useful. Thanks for sharing

Collapse
chandrika56 profile image
Jaya chandrika reddy Author

Glad it was helpful to you 😊

Collapse
patricnox profile image
PatricNox

If I would need to use a script outside the container that executes a bash command inside the container using the default user, what's the best practice?

33 is macOS default user id
1000 is Linuxs

and windows can't even use .sh files

The reason behind this is cus the application environment is configurated on the named database container, meaning we cant run commands outside the container as it would imply the settings are wrong.

Collapse
realityexpander profile image
Chris Athanas

great breakdown, thank you!

Collapse
chandrika56 profile image
Jaya chandrika reddy Author

Thank you for the supportπŸ˜„

Some comments have been hidden by the post's author - find out more