Full Code of crccheck/docker-hello-world for AI

master bbed28cb7755 cached
5 files
3.1 KB
967 tokens
1 requests
Download .txt
Repository: crccheck/docker-hello-world
Branch: master
Commit: bbed28cb7755
Files: 5
Total size: 3.1 KB

Directory structure:
gitextract_p9pbpc8v/

├── .github/
│   └── workflows/
│       └── publish.yml
├── .travis.yml
├── Dockerfile
├── README.md
└── index.html

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/workflows/publish.yml
================================================
name: Publish Docker image

on:
  release:
    types: [published]

jobs:
  push_to_registry:
    name: Push Docker image to Docker Hub
    runs-on: ubuntu-latest
    steps:
      - name: Check out the repo
        uses: actions/checkout@v2

      - name: Extract metadata (tags, labels) for Docker
        id: meta
        # https://github.com/docker/metadata-action
        uses: docker/metadata-action@v3
        with:
          images: crccheck/hello-world

      - name: Log in to DockerHub
        uses: docker/login-action@v1
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: Build and push
        # https://github.com/docker/build-push-action
        uses: docker/build-push-action@v2
        with:
          context: .
          push: true
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}


================================================
FILE: .travis.yml
================================================
services:
  - docker

branches:
  only:
    - master

before_install:
  - docker build -t hello-world .
  - docker run -d -p 127.0.0.1:8000:8000 hello-world

script:
  - docker ps | grep hello-world
  - curl --fail localhost:8000
  - curl --fail -I localhost:8000


================================================
FILE: Dockerfile
================================================
FROM busybox:latest
ENV PORT=8000
LABEL maintainer="Chris <c@crccheck.com>"

ADD index.html /www/index.html

# EXPOSE $PORT

HEALTHCHECK CMD nc -z localhost $PORT

# Create a basic webserver and run it until the container is stopped
CMD echo "httpd started" && trap "exit 0;" TERM INT; httpd -v -p $PORT -h /www -f & wait


================================================
FILE: README.md
================================================
# 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:

```bash
$ 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

```bash
$ 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
```


================================================
FILE: index.html
================================================
<pre>
Hello World


                                       ##         .
                                 ## ## ##        ==
                              ## ## ## ## ##    ===
                           /""""""""""""""""\___/ ===
                      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~
                           \______ o          _,/
                            \      \       _,'
                             `'--.._\..--''
</pre>
Download .txt
gitextract_p9pbpc8v/

├── .github/
│   └── workflows/
│       └── publish.yml
├── .travis.yml
├── Dockerfile
├── README.md
└── index.html
Condensed preview — 5 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4K chars).
[
  {
    "path": ".github/workflows/publish.yml",
    "chars": 928,
    "preview": "name: Publish Docker image\n\non:\n  release:\n    types: [published]\n\njobs:\n  push_to_registry:\n    name: Push Docker image"
  },
  {
    "path": ".travis.yml",
    "chars": 264,
    "preview": "services:\n  - docker\n\nbranches:\n  only:\n    - master\n\nbefore_install:\n  - docker build -t hello-world .\n  - docker run -"
  },
  {
    "path": "Dockerfile",
    "chars": 322,
    "preview": "FROM busybox:latest\nENV PORT=8000\nLABEL maintainer=\"Chris <c@crccheck.com>\"\n\nADD index.html /www/index.html\n\n# EXPOSE $P"
  },
  {
    "path": "README.md",
    "chars": 1243,
    "preview": "# Hello World\n\nThis is a simple Docker image that just gives http responses on port 8000. It's\nsmall enough to fit on on"
  },
  {
    "path": "index.html",
    "chars": 439,
    "preview": "<pre>\nHello World\n\n\n                                       ##         .\n                                 ## ## ##       "
  }
]

About this extraction

This page contains the full source code of the crccheck/docker-hello-world GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 5 files (3.1 KB), approximately 967 tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!