Sign inSign up

thinkcubedev/whoami-id

By thinkcubedev

•Updated 12 months ago

Image
0

87

thinkcubedev/whoami-id repository overview

⁠DockerWhoamiID

DockerWhoamiID is a simple Go application within a Docker container designed to check and display the container ID.

⁠Getting Started

⁠Prerequisites
  • Docker installed on your machine
⁠Build and Run
  1. Clone the repository:

    git clone https://github.com/Think-Cube/DockerWhoamiID.git
    
  2. Build the Docker image:

    docker build -t dockerwhoamiid .
    
  3. Run the Docker container:

    docker run -p 8000:8000 dockerwhoamiid
    

The application will be accessible at http://localhost:8000⁠.

⁠Dockerfile

The Dockerfile defines the build process for the application. It uses a multi-stage build, first building the Go binary and then creating a lightweight image to run the application.

⁠http.go

The http.go file contains the Go source code for the simple application. It listens on a specified port and responds with the container's hostname.

⁠[email protected]⁠

The [email protected] file is a systemd service unit for running the Docker container as a service.

⁠License

This project is licensed under the MIT License⁠.

⁠Contribution

Feel free to contribute by opening issues or pull requests. Your feedback and improvements are highly appreciated!

Tag summary

Content type

Image

Digest

sha256:4fed5f5ef…

Size

7.2 MB

Last updated

12 months ago

docker pull thinkcubedev/whoami-id:20251015