Docker-OSX
Docker-OSX copied to clipboard
OSX_COMMANDS vs command in terminal
Hi, I'm trying to use OSX_COMMANDS to execute a script. this is my command:
DOCKER_OSX_QEMU_BIGSUR_IMAGE_PATH=/home/jenkins/docker-osx/mac_hdd_ng_auto_big_sur.img
docker run -i \
--name ios-toolchain-build \
--device /dev/kvm \
-p 50922:10022 \
-v "${SHARE}:/mnt/hostshare" \
-e "OSX_COMMANDS=/bin/zsh -c \"echo alpine | sudo -S mount_9p hostshare && ls /Volumes/hostshare/ && /Volumes/hostshare/ci/build.sh \"" \
-e EXTRA="-virtfs local,path=/mnt/hostshare,mount_tag=hostshare,security_model=passthrough,id=user" \
-v "${DOCKER_OSX_QEMU_BIGSUR_IMAGE_PATH}:/image" \
sickcodes/docker-osx:naked-auto
but if I run the command via ssh, the outcome is different, I have different variables
this is the way I run the container
DOCKER_OSX_QEMU_BIGSUR_IMAGE_PATH=/home/jenkins/docker-osx/mac_hdd_ng_auto_big_sur.img
docker run -i \
--name ios-toolchain-build \
--device /dev/kvm \
-p 50922:10022 \
-v "${SHARE}:/mnt/hostshare" \
-e "OSX_COMMANDS=/bin/zsh -c \"echo alpine | sudo -S mount_9p hostshare && ls /Volumes/hostshare/ && /Volumes/hostshare/ci/build.sh \"" \
-e EXTRA="-virtfs local,path=/mnt/hostshare,mount_tag=hostshare,security_model=passthrough,id=user" \
-v "${DOCKER_OSX_QEMU_BIGSUR_IMAGE_PATH}:/image" \
sickcodes/docker-osx:naked
why does it happen? the qemu is the same. The problem is that in the second case it works well, in the first case I obtain an error and I don't undersand why Thanks a lot
Angelo
Try this for sharing instead, it eats the mount_9p alive:
mkdir ~/mnt/osx
sshpass -p alpine sshfs user@localhost:/ -p 50922 ~/mnt/osx
ssh / sftp works via that forwarded port. But win ssh fails to work with a port added. It's broken
\\sshfs.r\danielr@localhost!50922/