All Projects → StefanScherer → whoami

StefanScherer / whoami

Licence: MIT license
Cross-platform whoami service that prints it's container ID - Linux / Windows / ARM

Projects that are alternatives of or similar to whoami

samba
A Dockerfile to build multi-architecture images of Samba, which is the standard Windows interoperability suite of programs for Linux and Unix. This is my personal docker recipe.
Stars: ✭ 60 (+185.71%)
Mutual labels:  multi-arch
kubectl-whoami
This plugin gets the subject name using the effective kubeconfig
Stars: ✭ 74 (+252.38%)
Mutual labels:  whoami
whoami
Rust crate to get the current user and environment.
Stars: ✭ 68 (+223.81%)
Mutual labels:  whoami
rbac-tool
Rapid7 | insightCloudSec | Kubernetes RBAC Power Toys - Visualize, Analyze, Generate & Query
Stars: ✭ 546 (+2500%)
Mutual labels:  whoami
whoami.js
A simple and lightweight browser detection and logger library
Stars: ✭ 16 (-23.81%)
Mutual labels:  whoami
gabrieldim
WHO AM I ?
Stars: ✭ 100 (+376.19%)
Mutual labels:  whoami
minio-multiarch
Nightly builds of Minio server Docker images. Compatible with arm64, armhf/armv7, and amd64.
Stars: ✭ 28 (+33.33%)
Mutual labels:  multi-arch
baikal-docker
Provides a ready-to-go Baikal server, incl. docker-compose.yml & Systemd service file
Stars: ✭ 85 (+304.76%)
Mutual labels:  multi-arch

whoami multi-arch image

Build status This image on DockerHub

Simple HTTP docker service that prints it's container ID - for (almost) any Docker platform

CI pipeline

CI pipeline with Travis and AppVeyor

  • AppVeyor CI
    • Matrix build for several Linux architectures
      • linux/amd64
      • linux/arm
      • linux/arm64
    • Build Windows image for nanoserver 2016 SAC
      • windows/amd64 10.0.14393.x
      • Rebase this image to nanoserver:1709 SAC
        • windows/amd64 10.0.16299.x
      • Rebase this image to nanoserver:1803 SAC
        • windows/amd64 10.0.17134.x
      • Rebase this image to nanoserver:1809 SAC
        • windows/amd64 10.0.17763.x
      • Rebase this image to nanoserver:1903 SAC
        • windows/amd64 10.0.18362.x
      • Rebase this image to nanoserver:1909 SAC
        • windows/amd64 10.0.18363.x
      • Rebase this image to nanoserver:2004 SAC
        • windows/amd64 10.0.19041.x
    • Wait for all images to be on Docker Hub
    • Create and push the manifest list
      • preview of docker manifest command

Linux

$ docker run -d -p 8080:8080 --name whoami -t stefanscherer/whoami
736ab83847bb12dddd8b09969433f3a02d64d5b0be48f7a5c59a594e3a6a3541

$ curl http://localhost:8080
I'm 736ab83847bb running on linux/amd64

IP: 127.0.0.1
IP: 172.17.0.2
ENV: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV: HOSTNAME=8b5485ce34ff
ENV: PORT=80
ENV: HOME=/root
GET / HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.87 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9,de;q=0.8
Cache-Control: no-cache
Connection: keep-alive
Pragma: no-cache
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Upgrade-Insecure-Requests: 1

Windows

$ docker run -d -p 8080:8080 --name whoami -t stefanscherer/whoami
736ab83847bb12dddd8b09969433f3a02d64d5b0be48f7a5c59a594e3a6a3541

$ (iwr http://$(docker inspect -f '{{ .NetworkSettings.Networks.nat.IPAddress }}' whoami):8080 -UseBasicParsing).Content
I'm 736ab83847bb on windows/amd64

Used for a first swarm-mode demo with Windows containers.

Query all supported platforms

$ docker run --rm mplatform/mquery stefanscherer/whoami
Image: stefanscherer/whoami
 * Manifest List: Yes
 * Supported platforms:
   - linux/amd64
   - linux/arm/v6
   - linux/arm64/v8
   - windows/amd64:10.0.14393.2248
   - windows/amd64:10.0.16299.431
   - windows/amd64:10.0.17134.48

Machine readable version

On the route /api the app will expose the same information as a json body

{"hostname":"8b5485ce34ff","platform":"linux/amd64","ip":["127.0.0.1","172.17.0.2"],"header":{"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3"],"Accept-Encoding":["gzip, deflate, br"],"Accept-Language":["en-US,en;q=0.9,de;q=0.8"],"Connection":["keep-alive"],"Sec-Fetch-Mode":["navigate"],"Sec-Fetch-Site":["none"],"Sec-Fetch-User":["?1"],"Upgrade-Insecure-Requests":["1"],"User-Agent":["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.87 Safari/537.36"]},"env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","HOSTNAME=8b5485ce34ff","PORT=80","HOME=/root"]}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].