Skip to content

Commit

Permalink
Build binaries from source using Docker (#14)
Browse files Browse the repository at this point in the history
This change makes it easy to reproducibly build ssl-proxy for multiple platforms via Docker.
  • Loading branch information
suyashkumar authored Mar 9, 2019
1 parent 2c32f3c commit 3a79b4a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM golang:1.12-alpine3.9
WORKDIR /go/src/github.com/suyashkumar/ssl-proxy
RUN apk add --no-cache make git zip
RUN go get -u github.com/golang/dep/cmd/dep
COPY . .
RUN make
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,17 @@ If you're using `wget`, you can fetch and uncompress the proper binary in one co
wget -qO- $BINARY_RELEASE_LINK | tar xvz
```

### Build from source
You must have Golang installed on your system along with `make` and [`dep`](https://github.com/golang/dep). Then simply clone the repository and run `make`.
### Build from source
#### Build from source using Docker
You can build `ssl-proxy` for all platforms quickly using the included Docker configurations.

If you have `docker-compose` installed:
```sh
docker-compose -f docker-compose.build.yml up
```
will build linux, osx, and darwin binaries (x86) and place them in a `build/` folder in your current working directory.
#### Build from source locally
You must have Golang installed on your system along with `make` and [`dep`](https://github.com/golang/dep). Then simply clone the repository and run `make`.

## Attribution
Icons made by <a href="https://www.flaticon.com/authors/those-icons" title="Those Icons">Those Icons</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a>
7 changes: 7 additions & 0 deletions docker-compose.build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '2'
services:
build-release:
build: .
volumes:
- $PWD/build:/go/src/github.com/suyashkumar/ssl-proxy/build
command: make release

0 comments on commit 3a79b4a

Please sign in to comment.