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 May 2, 2019
1 parent 89889ed commit dc544bf
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,20 @@ install:
unlink_brotli:
rm -rf vendor/github.com/google/brotli/*
mv tmp/* vendor/github.com/google/brotli/
rm -rf tmp/
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.11-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.11-alpine \
/bin/bash -c "make install && make deps && make pg_build"
4 changes: 4 additions & 0 deletions docker/go-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM golang:1.11-alpine

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

0 comments on commit dc544bf

Please sign in to comment.