https://github.com/deis/mock-http-server
Mock HTTP server written in Go
https://github.com/deis/mock-http-server
Last synced: about 1 year ago
JSON representation
Mock HTTP server written in Go
- Host: GitHub
- URL: https://github.com/deis/mock-http-server
- Owner: deis
- License: mit
- Created: 2014-10-04T19:54:21.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-05-10T21:16:05.000Z (about 9 years ago)
- Last Synced: 2024-04-14T19:23:19.535Z (about 2 years ago)
- Language: Go
- Size: 3.91 KB
- Stars: 4
- Watchers: 21
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Mock HTTP Server
================
This project provides an ultra-simple HTTP server written in Go
that responds to all requests with a 200 OK -- and is useful as
a mock endpoint for functional testing.
The project uses a special 2-phase build process that statically
compiles Go binaries and injects them into an empty Docker image,
shrinking the resulting image from hundreds of MB to < 5 MB.
## Running this Container
```console
$ docker run -p 8080:8080 deis/mock-http-server
```
## Building from Source
To build the image, run `make build`.
The build and runtime environments are split into two parts:
### The build environment
Based on [deis/go](https://registry.hub.docker.com/u/deis/go/),
this image installs a Go development environment and compiles a binary.
### The runtime environment
This image pulls in the standalone binary compiled in the build environment
and injects it into a minimal standalone container inherited `FROM scratch`.