1

Sorry I am a beginner in docker.

Let's say I write FROM my-docker-image in Dockerfile.

If I have multiple versions of my-docker-image, which one will be used if I write FROM my-docker-image?

If I want to use a specific version, can I add tag like FROM my-docker-image:xxx?

1
  • If you don't specify a tag, the assumed tag is latest.
    – Dan Lowe
    Commented Oct 29, 2017 at 14:03

1 Answer 1

3

Yes that's correct, you will have to use:

FROM my-docker-image:1.0.0

It is also possible to have multiple FROM in your Dockerfile

You could learn more about the FROM directive here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.