Basic Dockerfile

Build a basic Dockerfile to create a Docker image.

Start building, submit solution and get feedback from the community.
2Submit Solution·
5 upvotes10 upvotes

In this project, you will write a basic Dockerfile to create a Docker image. When this Docker image is run, it should print “Hello, Captain!” to the console before exiting.

Requirements

  • The Dockerfile should be named Dockerfile.
  • The Dockerfile should be in the root directory of the project.
  • The base image should be alpine:latest.
  • The Dockerfile should contain a single instruction to print “Hello, Captain!” to the console before exiting.

You can learn more about writing a Dockerfile here.


If you are looking to build a more advanced version of this project, you can consider adding the ability to pass your name to the Docker image as an argument, and have the Docker image print “Hello, [your name]!” instead of “Hello, Captain!“.

Found a mistake? Help us improve.

Join the Community

roadmap.sh is the 7th most starred project on GitHub and is visited by hundreds of thousands of developers every month.

Rank 7th  out of 28M!

292K

GitHub Stars

Star us on GitHub
Help us reach #1

+90k every month

+1M

Registered Users

Register yourself
Commit to your growth

+1.5k every month

26K

Discord Members

Join on Discord
Join the community

Roadmaps Best Practices Guides Videos FAQs YouTube

roadmap.sh by @kamrify

Community created roadmaps, best practices, projects, articles, resources and journeys to help you choose your path and grow in your career.

© roadmap.sh · Terms · Privacy · Advertise ·

ThewNewStack

The top DevOps resource for Kubernetes, cloud-native computing, and large-scale development and deployment.