Skip to content

Instantly share code, notes, and snippets.

@j-griffith
Last active February 2, 2022 16:45
Show Gist options
  • Select an option

  • Save j-griffith/f82bd567dc963ff953adcc44d0ebd96e to your computer and use it in GitHub Desktop.

Select an option

Save j-griffith/f82bd567dc963ff953adcc44d0ebd96e to your computer and use it in GitHub Desktop.
Docker iscsi in container run cmd
# This will use the hosts iscsid
docker run -it --net=host --privileged -v /etc/localtime:/etc/localtime:ro \
-v /lib/modules:/lib/modules:ro \
-v /run:/run:shared -v /dev:/dev \
-v /etc/iscsi:/etc/iscsi \
-v /home/jgriffith/vol:/Mount:shared ubuntu bash
# shared declaration on Mount matters!
# You can also put iscsid in another container, share the socket
# BUT make sure you do NOT run the iscsid on the host node
@j-griffith
Copy link
Author

Nice, thanks for adding that @kvaps ! I'm afraid I never noticed the comments on this gist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment