I have a Dockerfile
something like follows:
FROM openjdk:8u151
# others here
I have 2 questions about the base image:
1. How to get the tags?
Usually, I get it from dockerhub, let's say openjdk:8u151
, I can get it from dockerhub's openjdk repository.
If I could get all tags from any local docker command, then I no need to visit web to get the tags, really a little low efficiency?
2. Will the base image safe?
I mean if my base image always there?
Look at the above openjdk repo, it is an offical repo.
I found there is only 8u151
left for me to choose. But I think there should be a lots of jdk8
release during the process, so should also a lots of jdk8
images there, something like 8u101
, 8u163
etc.
So can I guess the maintainer will delete some old images for openjdk
?
Then if this happen, how my Dockerfile
work? I should always change my base image if my upstream delete there image? Really terrible for me to maintain such kind of thing.
Even if the openjdk
really just generate one release of jdk8
. My puzzle still cannot be avoided, as dockerhub
really afford the delete
button for users.
What's the best practice, please suggest, thanks.