Giter VIP home page Giter VIP logo

docker-hello-world's Introduction

Hello World

This is a simple Docker image that just gives http responses on port 8000. It's small enough to fit on one floppy disk:

$ docker images | grep hell
REPOSITORY               TAG       IMAGE ID        CREATED          VIRTUAL SIZE
crccheck/hello-world     latest    2b28c6ad8d1b    4 months ago     1.2MB

I made this initially because there were lots of scenarios where I wanted a Docker container that speaks HTTP, but every guide used images that took seconds to download. Armed with a tiny Docker image, I could test things in a fresh environment in under a second. I like faster feedback loops.

THANK YOU to the surprisingly large number of contributors that have made this better for everyone over the years.

Sample Usage

Starting a web server on port 80

$ docker run -d --rm --name web-test -p 80:8000 crccheck/hello-world

You can now interact with this as if it were a dumb web server:

$ curl localhost
<xmp>
Hello World
...snip...
$ curl -I localhost
HTTP/1.0 200 OK
$ curl -X POST localhost/super/secret
<HTML><HEAD><TITLE>501 Not Implemented</TITLE></HEAD>
...snip...
$ curl --write-out %{http_code} --silent --output /dev/null localhost
200

docker-hello-world's People

Contributors

crccheck avatar gitshawn avatar grongor avatar julianneswinoga avatar matteo-briani avatar mdisibio avatar stellarpower avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-hello-world's Issues

Add instructions on how to build this for alternate architectures

I love that you based this off of https://hub.docker.com/_/busybox/ because it supports so many architectures. I want to use this image as the base for a Raspberry Pi Kubernetes tutorial I am building. Unfortunately, following your README will result is a unexecutable binary failure. It's easy to work around. I simply did:

# Note: this is a pattern that can be used for many containers, not just this one
url=https://github.com/crccheck/docker-hello-world
image=$(basename $url)
git clone $url
cd $image
docker build -t $image .
docker run -d --name web-test -p 80:8000 $image
docker ps
curl localhost:80

For most projects I'd say that knowing how to build from source is the user's responsibility. However, this is a hello-world, and that suggests a different kind of user. I think an extra paragraph in the README is in order.

You might also go so far as to push an ARM build out to the registry, but I don't want to ask for heroics. ;-)

Arm64 support for Apple Silicon chip

Hi,
Please add arm64 support although it's hello world project.
Busybox (base image) has support arm64. I think just rebuild it will be ok. Thanks.

$ docker run -d --rm --name web-test -p 80:8000 crccheck/hello-world
Unable to find image 'crccheck/hello-world:latest' locally

latest: Pulling from crccheck/hello-world
e685c5c858e3: Pull complete
7bf3c383dbcd: Pull complete
Digest: sha256:0404ca69b522f8629d7d4e9034a7afe0300b713354e8bf12ec9657581cf59400
Status: Downloaded newer image for crccheck/hello-world:latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
2c49f324a4360331017a6fa3b42df665d71b315cd1edc49991446e6a318b696f

Health Check Missing

Thank you for this simple project to test the web server in docker environment. The only thing missing is a health check so that docker knows that the service is healthy or not.

a simple check for the status code 200 when the app is accessed should be OK.

not able to open the website

Following the steps to install the hello-world web application, but in the exploer i can't load the page successfully.

I try to use Firefox/Internet Exploer and change the port #, but failed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.