下载https://docs.docker.com/desktop/install/windows-install/

报错:“wsl unexpect error”:

解决:

1.控制面板》程序》启用或关闭功能》Hyper-V

2.wsl --update

一.Docker helloworld

docker pull hello-world

报错:

error during connect: this error may indicate that the docker daemon is not running: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/images/create?fromImage=hello-world&tag=latest": open //./pipe/docker_engine: The system cannot find the file specified.

解决:docker desktop要在运行时才能使用docker的各种命令

从docker Hub拉取hello-world镜像

docker pull hello-world

查看镜像信息:

docker images hello-world

运行镜像:

docker run hello-world

dockerfile

FROM nginx:1.23.4
COPY . .
CMD [“nginx”, “-g”, “daemon off;”]

其他命令:

docker pull nginx:1.23.4
docker pull node
docker build -t image01:v1 .
docker images
docker run --nam conine -d ima:v1 bash
docker ps
docker stop conntainername
docker exec -it conntainername /bin/bash
exit
docker save -o export_image.tar ima:v1
docker load -i export_image.tar
docker ps -a
docker rm del_thi_connamer
docker run --name conname -p 8080:80 -d ima:v1

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐