Difference between revisions of "Containers and virtual machines"
m (→^ specific commands: organizing Docker commands notes.) |
(reference link on access to USB devices in Docker containers.) |
||
Line 80: | Line 80: | ||
Note this can have unintended consequences given that there's no ssh server running to handle multiple, or additional logins! | Note this can have unintended consequences given that there's no ssh server running to handle multiple, or additional logins! | ||
+ | <!-- comment --> | ||
+ | |||
+ | -- Enable USB access in Docker container -- | ||
+ | |||
+ | * https://stackoverflow.com/questions/24225647/docker-a-way-to-give-access-to-a-host-usb-or-serial-device | ||
+ | |||
+ | |||
<!-- comment --> | <!-- comment --> | ||
Revision as of 05:40, 13 June 2021
Unix and Linux config :: Containers :: Clusters :: <link>
Contents
^ Container Software
A promising starting point, collection of six articles / tutorials on Docker containers:
* https://medium.com/sysf/docker/home
A general note following about three days' Docker container experimentation, and to question "should I be using a Docker container interactively, running multiple apps, some simultaneously?". (Note the following forum post chain is a quagmire of issues and opions!):
* https://news.ycombinator.com/item?id=7950326
^ Docker starting point
Notes on Docker containerizing software. Note, to get a practical start it is a good and or needed step to create a user account with Docker dot com. Single user and free accounts with some advanced Docker features disabled are available. A good starting tutorial for beginners is written by one Brian Hogan of Digital Ocean, this article published 2018 July 5. First reference in list here:
Ted noting too there may be a daily limit to the number of docker images which a user with a free account can push to Docker's image repository. Docker's image repository provides URLs of the form https://hub.docker.com/u/<user_name>
, where username is the given person's Docker account user name.
^ specific commands
Start a docker image with access to a particular host directory:
-
More on Docker volumes:
Delete a Docker repository on Docker hub:
^ docker container rm [...], docker image rm [...]
Delete (remove) a local Docker image . . . first must remove all local containers which use given image:
- https://docs.docker.com/engine/reference/commandline/container_rm/
- https://docs.docker.com/engine/reference/commandline/image_rm/
Commands which worked locally:
1036 docker ps -a 1037 docker container rm bdc45e3021ad 1038 docker ps -a 1039 docker container rm 3899ce3b4c5f 85206c6c2565 1040 docker ps -a 1041 docker container rm e530246d9393 775ef655da0f 51a5967aecf8 1042 docker ps -a . . . 1047 docker image rm tedhavelkaad0602/ubuntu-04-vim--openssh-server--man-db 1048 docker images 1049 docker image rm tedhavelkaad0602/ubuntu-nodejs-net-tools 1050 docker images
Secure shell into, or otherwise connect with a running Docker container in and of a Linux environment:
- https://github.com/linuxserver/docker-openssh-server
- https://github.com/linuxserver/docker-openssh-server/blob/71d16e9d09cf8b319ccec9bde2e64ed9298a6d95/LICENSE
A couple examples of running second bash
instance of a given Docker container, not a login, but provides second interactive window or interface to a given Docker container:
^ docker exec [options] [command_in_container]
937 docker exec -t -i a42e2e801d60 bash 938 docker exec -i -t 51a5967aecf8 bash
Note this can have unintended consequences given that there's no ssh server running to handle multiple, or additional logins!
-- Enable USB access in Docker container --
^ Kubernetes Container Software
Kubernetes notes 2021-06-09 This section a stub section.
^ Oracle Corporation VirtualBox software
VirtualBox on-line manual
-
Some important VM terms include,
- host OS . . . the OS on which VirtualBox software runs
- guest OS . . . the OS which runs inside a VirtualBox VM instance
- virtual machine . . . the hosting environment which VirtualBox creates for given guest OS
- https://www.virtualbox.org/manual/ch04.html
- https://www.virtualbox.org/manual/ch02.html#externalkernelmodules
To set up shared folders in VirtualBox instances, see VirtualBox documentation chapter 4 at the first following URL. There are also some needed steps detailed in same Oracle documentation, chapter 2, second URL here:
Following screen capture is from Ted's work setting up virtual Ubuntu host.
Figure 1 - capture of VM Ubuntu guest OS command prompt, with steps to mount VirtualBox CDROM drive:
Interestingly, mounting the device /dev/sr0 within the guest OS provides access to several files which we did not see or explicitly install when installing VirtualBox framework software. Scripts to set up needed Linux kernel modules are among these files at /media/cdrom
.
To configure port forwarding, for ssh from host OS to guest OS:
Where VirtualBox stores its files . . .
^ References
For Ubuntu installs be sure to make /boot large enough, e.g. ~500MB when creating a separate /boot partition: