Create your own hello-world image in Docker

Agenda

  • Introduction
  • Write Dockerfile
  • Build the image
  • Run the image
  • Conclusion

Introduction

Write docker file

  • From alpine is a minimal Docker image based on Alpine Linux with a complete package index and only 5 MB in size.
  • CMD: to execute the command once you run the docker container.

Build the image

docker build -t helloworld-custom .
  • t/ — tag gives a tag for your image

Run the image

note

docker container run helloworld-custom

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store