[英]Some questions on Docker basics?
I'm new to docker.Most of the tutorials on docker cover the same thing.I'm afraid I'm just ending up with piles of questions,and no answers really. 我是Docker的新手。关于Docker的大多数教程都涉及到同一件事。恐怕我只会遇到很多问题,而实际上并没有答案。 I've come here after my fair share of Googling, kindly help me out with these basic questions.
我在分享Google搜寻信息后来到了这里,请为我解答这些基本问题。
Looks like you are confused after reading to many documents. 阅读许多文档后,您似乎感到困惑。 Let me try to put this in simple words.
让我尝试用简单的话来表达。 Hope this will help.
希望这会有所帮助。
When we install a docker,where it gets installed?
当我们安装Docker时,它在哪里安装? Is it in our computer in local or does it happen in cloud?
它在本地计算机中还是在云中发生?
Where does containers get pulled into?I there a way I can see what is inside the container?(I'm using Ubuntu 18.04)
容器被放到哪里?我有办法看到容器里面的东西吗?(我正在使用Ubuntu 18.04)
This question can be treated as lack of terminology awareness. 可以将这个问题视为缺乏术语意识。 We don't pull the container.
我们不拉容器。 We pull the image and run the container using that.
我们提取图像并使用该图像运行容器。
Quick terminology summary 快速术语总结
Container -> Containers allow you to easily package an application's code, configurations, and dependencies into a template called an image. 容器 ->容器使您可以轻松地将应用程序的代码,配置和依赖项打包到称为映像的模板中。
Dockerfile -> Here you mention your commands or infrastructure blueprint. Dockerfile- >在这里您提到您的命令或基础架构蓝图。
Image -> Image gets derived from Dockerfile. 图像 ->图像从Dockerfile派生。 You use image to create and run the container.
您使用图像来创建和运行容器。
Yes, you can log inside the container. 是的,您可以在容器内登录。 Use below command
使用以下命令
docker exec -it <container-id> /bin/bash
When we pull an image.Docker image or clone a repository from Git.where does this data get is stored?
当我们提取图像时,Docker图像或从Git克隆存储库。此数据在哪里存储?
When you clone the git project which is docerized, you can look for Dockerfile in that project and create the your own image by build it. 克隆经过调配的git项目时,可以在该项目中查找Dockerfile并通过构建它来创建自己的映像。
docker build -t <youimagenae:tag> .
When you build or pull the image it get store in to your local. 构建或提取图像时,它将存储在本地。
user docker images
command 用户
docker images
命令
Refer the below cheat-sheet for more commands to play with docker. 请参阅下面的备忘单,以了解更多可与Docker配合使用的命令。
docker
cli gets executed on your local machine and containers. docker
cli所做的所有操作均在本地计算机和容器上执行。 docker exec -it <container name> /bin/bash
for that you will need to have the container running. docker exec -it <container name> /bin/bash
轻松访问Docker容器,因为您需要运行该容器。 Check running containers with docker ps
docker ps
检查正在运行的容器 docker images
docker images
查看计算机上存在的所有docker images
Let me know if it was helpful and if you need any futher information. 让我知道它是否有帮助以及您是否需要其他信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.