Tarantool cartidge pack docker + WSL
Trying to build docker image in WSL using tarantool cartridge-cli util Got some trouble
# cartridge pack docker ./imdb
• Packing imdb into docker
• Temporary directory is set to /root/.cartridge/tmp/pack-rqotvb1hwp
• Initialize application dir
• Build application in /root/.cartridge/tmp/pack-rqotvb1hwp/package-files/imdb
• Building base image imdb-build
Step 1/5 : FROM centos:8
---> 831691599b88
Step 2/5 : RUN yum install -y git-core gcc make cmake unzip
---> Using cache
---> 9c514cbf6885
Step 3/5 : RUN curl -L https://tarantool.io/installer.sh | VER=2.2 bash && yum -y install tarantool-devel
---> Using cache
---> 2176c6b19f7e
Step 4/5 : RUN if id -u 0 2>/dev/null; then USERNAME=$(id -nu 0); else USERNAME=cartridge; useradd -u 0 ${USERNAME}; fi && (usermod -a -G sudo ${USERNAME} 2>/dev/null || :) && (usermod -a -G wheel ${USERNAME} 2>/dev/null || :) && (usermod -a -G adm ${USERNAME} 2>/dev/null || :)
---> Using cache
---> e42615bcbaa9
Step 5/5 : USER 0
---> Using cache
---> 3347372e2e5e
---> 3347372e2e5e
Successfully built 3347372e2e5e
Successfully tagged imdb-build:latest
• Build application in imdb-build
• Remove container...
⨯ Failed to build application: Failed to start container: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"./build.rqotvb1hwp.sh\": stat ./build.rqotvb1hwp.sh: no such file or directory": unknown
What is wrong?
Ответы (1 шт):
Please do not use Docker within WSL1 - docker in this case should be connected to the external docker-machine, not native Linux Docker, and in this case there is no way to proceed docker mount volume inside of container with external data from Linux host.
I'd highly advice you to mingrate to the newer version of Windows 10 with WSL2 available, in this case volume mapping will become possible.
P.S.
Just in case, to make sure there is WSL version1 is used, could you please show us result of wsl.exe --list -v command? Fow WSL2 images there are will be 2 in the last column named VERSION.