2

I have a cluster deployed from google container engine where all my docker containers are deployed, i would like to install rpm in one of the machines in the cluster. But none of the machines has yum or apt-get or make or a c compiler.

The image used is : gci-beta-55-8872-47-0

Description of the image: Google, Container-Optimized OS, beta 55-8872.47.0, Kernel: ChromiumOS-4.4.4 Kubernetes: 1.4.5 Docker: 1.11.2

Sam Protsenko
  • 14,045
  • 4
  • 59
  • 75
Akash Dathan
  • 4,348
  • 2
  • 24
  • 45
  • consider researching cross-compilers. Build your executables on a x-compiler equipped machine, then copy it to your cluster as needed. Otherwise, this Q is way too broad for StackOverflow, as it will be a death by a 100 sub-questions. Sorry, but good luck. – shellter Dec 06 '16 at 15:21
  • Thank you for pointing me in the right direction – Akash Dathan Dec 06 '16 at 16:30
  • You could use `rpm2cpio` – o11c Dec 06 '16 at 19:33

1 Answers1

3

The Container-Optimized OS image is not designed to have a package manager (see https://cloud.google.com/container-engine/docs/node-image-migration#managing_software_on_container-vm_image).

If you need to install rpm on the host OS (rather than running everything in containers), you should consider running the Debian-based container image instead:

gcloud container clusters create --image-type=container_vm [CLUSTER_NAME]
Robert Bailey
  • 17,866
  • 3
  • 50
  • 58
  • Thank you, i understand that. But, installing rpm in such a system sounds like an interesting challenge. – Akash Dathan Dec 13 '16 at 06:17
  • 2
    The system comes with a command called `toolbox` that runs a container that is specifically designed to allow you to do things like install custom packages. – Robert Bailey Dec 19 '16 at 09:10