Package manager on the Docker Machine default VM? - linux

I'm developing on OSX using Docker Machine. I used the quickstart terminal to let it create the default VM which is extremely minimal:
In an OS X installation, the docker daemon is running inside a Linux VM called default. The default is a lightweight Linux VM made specifically to run the Docker daemon on Mac OS X. The VM runs completely from RAM, is a small ~24MB download, and boots in approximately 5s.
I want to install dnsmasq, but none of these instructions could work. I expect to come across this kind of problem again, so beyond installing dnsmasq I want to have some tool such as apt-get to be able to easily install things. With so few commands available I don't know how to get started. I have curl, wget, sh, git, and other very basic commands. I don't have any of the following:
apt
apt-get
deb
pkg
pkg_add
yum
make
gcc
g++
python
bash
What can I do? Should I just download a more complete VM such as Ubuntu? My laptop is not very fast so a very lightweight VM was very appealing to me, but this is starting to seem like a bit much.

The docker-machine VM is based on TinyCore. To install extra packages use tce or tce-load, the apt-get counterpart of TinyCore.
A word of warning, you shouldn't treat the docker-machine VM as a regular VM where you install tons of packages and customize. It's only meant to run containers. It's best to keep it that way.

Related

Can I install Docker on my university's compute cluster where I cannot run sudo or yum commands and cannot write in /etc?

and hope you are all doing well.
I am trying to install Docker on one of the front-end nodes my university's compute cluster, which uses CentOS 7.9. Unfortunately, I am not in the list of sudoers, and therefore cannot use any sudo commands or even the yum installer.
I also do not have write access to /etc, and therefore I am not able to modify any of the files there (like sysctl.conf). I also cannot run sysctl or yum commands.
So far, I have managed to download the binaries for Docker 20 in .tgz format, but after extracting, I cannot run the docker daemon, as I do not have root privileges.
I have tried following this guide: https://docs.docker.com/engine/security/rootless/ but it requires executing commands in sudo mode and modifying files in /etc, and I am unable to follow through completely.
Is there another way to install and run docker, or should I just give up completely? I would really appreciate it if someone could please let me know. Thank you very much!
Best Regards

How to install vm with ubuntu image via minikube-kubernetes

I am using minikube to install kubernetes.
This creates a VM with embedded version of linux.
But i want the VM to have a ubuntu operating system. Is there any way to do it?
Earlier i used the command to install minikube
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
It would be very difficult (and not recommended) to use a different ISO to setup a minikube node. You probably want to setup a single node kubernetes cluster. Take a look at the following resources:
https://kubernetes.io/docs/getting-started-guides/ubuntu/local/
https://kubernetes.io/docs/getting-started-guides/ubuntu/manual/

Adding installation packages to linux containers (lxc) caches

How do I add a couple of packages to the default Ubuntu installation in lxc, so that the results are cached?
Currently my script creates containers like this
lxc-create -t ubuntu -n foo -- --packages "firefox,python2.7,python-pip"
It works but is very slow, as it downloads installation packages with massive dependencies every single time I create a container. Is there a way to include these in the default Ubuntu installation, so that they would be downloaded once and then cached, speeding up creation of consecutive containers?
I would recommend looking at the apt-cacher-ng package: https://launchpad.net/ubuntu/+source/apt-cacher-ng.
I found a guide on how to install it here: http://www.distrogeeks.com/install-apt-cacher-ng-ubuntu/.
Apt on your host machine "should" cache packages downloaded on your host machine, but there is no harm in configuring apt on your host machine to use the apt-cacher-ng cache as well.
But configuring the container "machines" to use apt-cacher-ng on the host machine can reduce the time spent on downloading the same packages on different containers quite a lot.

How do I remove Xen from Ubuntu?

I was trying to install VM software on my Ubuntu system. Since I'm not very familiar with linux I followed a guide on the official Ubuntu site. Now I am running Ubuntu in a Xen environment, but I don't want to use Xen to make my virtual machines.
I installed Virtualbox in order to create my VM's, but Virtualbox doesn't run in a Xen environment.
I have tried googling for a way to remove Xen from my system, but I am unable to do it. This is what I've tried so far:
Editing /boot/grub/grub.cfg set default="Xen 4.1-amd64" to set default=1 which was recommended by a tutorial. It made my laptop start up in recovery mode and I had to generate a new grub config file which put the default back to xen.
Editing /boot/grub/menu.lst but I don't have any files called that on my system
user#BEL-8WF4XW1:~$ sudo find / -name menu.lst
user#BEL-8WF4XW1:~$
Looking through software center, but I couldn't find anything about Xen
The command make uninstall but I didn't use the source code.
I also tried to install yum and do sudo yum install kernel followed by sudo yum remove xen kernel-xen libvirt but that also didn't work.
I'm quite lost to be honest. Can anyone help me to get my Ubuntu back to how it was before I tried to follow that guide?
I'm no expert but I've executed
sudo apt-get purge xen*
and it worked for me.
You can just try
sudo apt-get remove xen-hypervisor-amd64
or
dpkg -i xen-hypervisor-amd64
to see which xen files have been installed in your machine

Need GUI to run qemu on Ubuntu server

Need GUI to run qemu on Ubuntu server: I need to run QEMU for ARM on a Ubuntu srever. THis QEmu is not supporting a text mode, so I need to install GUI software on Ubuntu server 13.04. Please suggest any that I can do a sudo apt-get install and get started quickly.
Are you connecting to the server over ssh? You could just use X forwarding to your local machine.
See the very good first answer here.
Then you can just start the software and interact with the GUI on a computer that already has the desktop environment installed.
You can do the following
sudo apt-get install ubuntu-desktop
For more info, look to this link

Resources