How can I use the base image to create my own without the dependency?

I’m a bit confused as to how this docker image:

FROM java:latest

I am running a java application on it and somehow it had nginx installed on it.
How can I view the details of this image?

  • Opening Port in Docker Container
  • 100 docker containers vs 100 small machines
  • systemd and systemctl within Ubuntu Docker images [closed]
  • Why does Docker run so many processes to map ports though to my application?
  • Connect to meteor mongo from local docker image on Mac
  • Is docker appropriate for fleets of embedded devices? [closed]
  • I would think it is a bad practice to just depend on a image you don’t have control over, b/c if it changes your deploys will break right?

  • 404 error when Accessing from local host : NGINX uWSGI
  • Can not install MariaDB through Docker and Vagrant
  • Run a docker with specific ip address
  • 403 Forbidden from bitcoind -server run on docker
  • Does docker --rm=true affect caching adversly?
  • Linkerd, k8s and routing
  • 2 Solutions collect form web for “How can I use the base image to create my own without the dependency?”

    If you go to Hub.Docker.com you can find your Java repo. There look for the “latest” tag and you will see a link to the Dockerfile. You can examine that to see how it was built.

    To see the details of any image I recommend MicroBadger

    It’s not a bad practice once the image is from a reliable source (like the java one) and you can always check what’s the content having a look at the Dockerfile.

    To not take the risk to break your apps you can specify the version of the image that you’re using instead of the using the latest one. You’ll be able to update/test it in a safe way doing that.

    If you’d like to have more control over the images you are using, you can start it from a more basic one (I use alpine-linux a lot, it’s much smaller) and add just what you want, the packages your app needs, the jvm/jre you are using, etc.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.