How to install rpm package while building a container

Is it possible to install rpm package during the build process of a container, but not after that?

My host has rpm installed, but the ubuntu:16.04 has no rpm, so I’m unable to install a needed rpm package from inside the container. Also although I can ping the internet from a running ubuntu container, An “apt-get install rpm” keeps failing with “Unable to locate package rpm”.

What do I need to do to access the docker repository from a running container?

thanks much,

1 Like

do this first:

RUN apt-get update