Skip to content

Commit 3a79b4a

Browse files
authored
Build binaries from source using Docker (#14)
This change makes it easy to reproducibly build ssl-proxy for multiple platforms via Docker.
1 parent 2c32f3c commit 3a79b4a

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM golang:1.12-alpine3.9
2+
WORKDIR /go/src/github.com/suyashkumar/ssl-proxy
3+
RUN apk add --no-cache make git zip
4+
RUN go get -u github.com/golang/dep/cmd/dep
5+
COPY . .
6+
RUN make

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,17 @@ If you're using `wget`, you can fetch and uncompress the proper binary in one co
3737
wget -qO- $BINARY_RELEASE_LINK | tar xvz
3838
```
3939

40-
### Build from source
41-
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`.
40+
### Build from source
41+
#### Build from source using Docker
42+
You can build `ssl-proxy` for all platforms quickly using the included Docker configurations.
43+
44+
If you have `docker-compose` installed:
45+
```sh
46+
docker-compose -f docker-compose.build.yml up
47+
```
48+
will build linux, osx, and darwin binaries (x86) and place them in a `build/` folder in your current working directory.
49+
#### Build from source locally
50+
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`.
4251

4352
## Attribution
4453
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>

docker-compose.build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: '2'
2+
services:
3+
build-release:
4+
build: .
5+
volumes:
6+
- $PWD/build:/go/src/github.com/suyashkumar/ssl-proxy/build
7+
command: make release

0 commit comments

Comments
 (0)