Development Test Images
LCMD Developer Tools supports docker registry v2 API. You can push local test images to the box for testing according to the following method.
Create
DockerfileDockerfileFROM busybox:latest # All services in lzcapp must always be in running state, otherwise the application will enter error state CMD ["sleep", "1d"]FROM busybox:latest # All services in lzcapp must always be in running state, otherwise the application will enter error state CMD ["sleep", "1d"]Build image
shdocker build --platform linux/amd64 -t lzc/helloworld:latest .docker build --platform linux/amd64 -t lzc/helloworld:latest .If you are currently using ARM64 or non-x86 architecture, you need to force specify the platform as
linux/amd64through--platform.Re-tag the image to
dev.$BOXNAME.heiyu.spaceaddress,$BOXNAMEis the target box name.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:latestPush image
shdocker push dev.$BOXNAME.heiyu.space/lzc/helloworld:latestdocker push dev.$BOXNAME.heiyu.space/lzc/helloworld:latestUse in
lzc-build.ymlorlzc-manifest.ymlymlservices: helloworld: image: dev.$BOXNAME.heiyu.space/lzc/helloworld:latestservices: helloworld: image: dev.$BOXNAME.heiyu.space/lzc/helloworld:latestPull image
shdocker pull dev.$BOXNAME.heiyu.space/lzc/helloworld:latestdocker pull dev.$BOXNAME.heiyu.space/lzc/helloworld:latest