how can I tell what software is part of a base docker image?

11/3/2019

I need to create a docker image that has the following software installed:

 sudo apt-get install pcscd 
 sudo apt-get install pcsc-tools // same as pcsc-lite                                    
 // For OMNIKEY for driver Then unpack the file and run the installer:
 cd /home/cccam/ifdokccid_lnx_x64-3.7.0/ 
 chmod 755 install
 sudo ./install

 OpenJDK 1.8 64 bit

In order to to do this I need a base image that apt installed. I am told debian is one such base image. I am accessing a pcsc card reader that is on an Ubuntu 18.04 machine. Should i maybe be using an Ubuntu base image for the docker container too? or does this not matter?

So my question is:

1) How do I ensure the apt is in the base image. And in general how do I check that base image has a particular software installed? Where do I get the list of software on an image. Also how do I know that its installed and on the path so it gets used?

2) What are some possible base images I should start with?

-- Average Bear
docker
kubernetes

1 Answer

11/3/2019

1) How do I ensure the apt is in the base image. And in general how do I check that base image has a particular software installed? Where do I get the list of software on an image. Also how do I know that its installed and on the path so it gets used?

If you need apt (package manager) then you can use ubuntu as the base image as it defaults ships with apt. If you wish to check what are all packages and directory structure available then you can use docker run -it image_name:image_tag sh to start docker container in interactive mode where you can test the packages.

Dockerfile used to build image is possible to find in the docker hub itself if the user uploaded it. You can also find docker file in public repositories like alpine dockerfile

2) What are some possible base images I should start with?

You can start with any image as a base image. even you can start from scratch like FROM SCRATCH. If you need a light weight linux base then you can try alpine

--
Source: StackOverflow