seabopo/http-echo
Unofficial HTTP-ECHO images for Windows Nano Server.
947
HTTP-ECHO by HashiCorp is a small go web server that serves a single HTTP web page whose content is determined by the Docker image startup parameters. See the HTTP-ECHO documentation for a full description.
The official HTTP-ECHO Docker repo only supports a linux/amd64 image. This repo adds support for Windows Nano Server based on Microsoft's PowerShell images.
Images / Tags:
Sample Docker command to expose run the image on port 8080 of the Docker host:
docker run -p 8080:80 hashicorp/http-echo -text="hello world" -listen=:80
FROM mcr.microsoft.com/powershell:nanoserver-1809
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN New-Item \
-ItemType directory \
-Path "/http-echo"; \
Invoke-WebRequest \
-Uri "https://github.com/hashicorp/http-echo/releases/download/v0.2.3/http-echo_0.2.3_windows_amd64.zip" \
-OutFile "/http-echo/http-echo.zip"; \
Expand-Archive \
-Path "/http-echo/http-echo.zip" \
-DestinationPath "/http-echo/" \
-Force; \
Rename-Item \
-Path "/http-echo/http-echo" \
-NewName "http-echo.exe"; \
Remove-Item \
-Path "/http-echo/http-echo.zip" \
-Force;
EXPOSE 80
ENTRYPOINT [ "/httpecho/http-echo.exe", "-listen=:80", "-text=I'm Up!" ]
LABEL org.opencontainers.image.title="HTTP-Echo" \
org.opencontainers.image.description="A tiny go web server that echos what you start it with!" \
org.opencontainers.image.documentation="https://github.com/hashicorp/http-echo" \
org.opencontainers.image.base.name="mcr.microsoft.com/powershell:nanoserver-1809" \
org.opencontainers.image.version="v0.2.3" \
org.opencontainers.image.url="https://hub.docker.com/r/seabopo/http-echo" \
org.opencontainers.image.vendor="seabopo" \
org.opencontainers.image.authors="seabopo @ Azure Devops / GitHub"
docker pull seabopo/http-echo