开发测试镜像
懒猫开发者工具 支持 docker registry v2 API, 您可以按照下面方法将本地的测试镜像推送到盒子进行测试。
创建
DockerfileDockerfileFROM busybox:latest CMD ["echo", "hello world!"]FROM busybox:latest CMD ["echo", "hello world!"]构建镜像
shdocker build -t lzc/helloworld:latest .docker build -t lzc/helloworld:latest .重新
tag镜像成dev.$BOXNAME.heiyu.space地址,$BOXNAME为目标盒子名.shBOXNAME=$(lzc-cli box default) docker tag lzc/helloworld:latest dev.$BOXNAME.heiyu.space/lzc/helloworld:latestBOXNAME=$(lzc-cli box default) docker tag lzc/helloworld:latest dev.$BOXNAME.heiyu.space/lzc/helloworld:latest推送镜像
shdocker push dev.$BOXNAME.heiyu.space/lzc/helloworld:latestdocker push dev.$BOXNAME.heiyu.space/lzc/helloworld:latestlzc-build.yml或者lzc-manifest.yml中使用ymlservices: helloworld: image: dev.$BOXNAME.heiyu.space/lzc/helloworld:latestservices: helloworld: image: dev.$BOXNAME.heiyu.space/lzc/helloworld:latest拉取镜像
shdocker pull dev.$BOXNAME.heiyu.space/lzc/helloworld:latestdocker pull dev.$BOXNAME.heiyu.space/lzc/helloworld:latest