Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Go Httpbin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Nix
Go Httpbin
Commits
8b1273c4
Commit
8b1273c4
authored
7 years ago
by
Will McCutchen
Browse files
Options
Downloads
Patches
Plain Diff
Add Dockerfile and image build process
parent
251b5f5b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+4
-0
4 additions, 0 deletions
Dockerfile
Makefile
+8
-1
8 additions, 1 deletion
Makefile
README.md
+12
-0
12 additions, 0 deletions
README.md
with
24 additions
and
1 deletion
Dockerfile
0 → 100644
+
4
−
0
View file @
8b1273c4
FROM
gcr.io/distroless/base
COPY
go-httpbin /bin/go-httpbin
EXPOSE
8080
CMD
["/bin/go-httpbin"]
This diff is collapsed.
Click to expand it.
Makefile
+
8
−
1
View file @
8b1273c4
...
...
@@ -24,4 +24,11 @@ clean:
deps
:
go get
-u
github.com/jteeuwen/go-bindata/...
.PHONY
:
all
image
:
assets cmd/go-httpbin/*.go httpbin/*.go
mkdir
-p
/tmp/go-httpbin-docker
cp
Dockerfile /tmp/go-httpbin-docker
GOOS
=
linux
GOARCH
=
amd64 go build
-o
/tmp/go-httpbin-docker/go-httpbin ./cmd/go-httpbin
docker build
-t
mccutchen/go-httpbin /tmp/go-httpbin-docker
imagepush
:
image
docker push mccutchen/go-httpbin
This diff is collapsed.
Click to expand it.
README.md
+
12
−
0
View file @
8b1273c4
...
...
@@ -23,6 +23,12 @@ Usage of ./dist/go-httpbin:
Port to listen on (default 8080)
```
Docker images are also available on
[
Docker Hub
][
docker-hub
]
:
```
$ docker run -P mccutchen/go-httpbin
```
## Installation
```
...
...
@@ -38,13 +44,19 @@ go get github.com/mccutchen/go-httpbin/...
## Development
```
# local development
make
make test
make testcover
make run
# building & pushing docker images
make image
make imagepush
```
[
kr
]:
https://github.com/kennethreitz
[
httpbin-org
]:
https://httpbin.org/
[
httpbin-repo
]:
https://github.com/kennethreitz/httpbin
[
ahmet-go-httpbin
]:
https://github.com/ahmetb/go-httpbin
[
docker-hub
]:
https://hub.docker.com/r/mccutchen/go-httpbin/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment