Skip to content

Commit

Permalink
Build wal-g binary for alpine
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>

Build wal-g binary for alpine

Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored and the-redback committed Oct 21, 2019
1 parent 271f64f commit 3e97217
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,19 @@ unlink_brotli:
rm -rf vendor/github.com/google/brotli/*
mv tmp/* vendor/github.com/google/brotli/
rm -rf tmp/

alpine: $(CMD_FILES) $(PKG_FILES)
rm -rf .brotli.tmp
rm -rf ./vendor/github.com/google/brotli/dist
docker build --pull -t wal-g/golang:1.12-alpine ./docker/go-alpine
docker run \
--rm \
-u $$(id -u):$$(id -g) \
-v /tmp:/.cache \
-v /tmp:/go/src/github.com/golang \
-v "$$(pwd):/go/src/$(PKG)" \
-w /go/src/$(PKG) \
-e GOOS=linux \
-e GOARCH=amd64 \
wal-g/golang:1.12-alpine \
/bin/bash -c "make install && make deps && make pg_build"
3 changes: 3 additions & 0 deletions docker/go-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM golang:1.12-alpine

RUN apk add --update --no-cache ca-certificates cmake bash build-base git lzo-dev

0 comments on commit 3e97217

Please sign in to comment.