Skip to content

Better cross platform builds #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Nov 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ project_name: outrigger-cli
builds:
- binary: rig
main: ./cmd/main.go
env:
- CGO_ENABLED=0
goos:
- windows
- darwin
Expand Down
33 changes: 14 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
FROM golang:1.9
FROM golang:1.9-alpine

# Install Ruby
WORKDIR /tmp
RUN apt-get -y update \
&& apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
RUN wget https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.2.tar.gz \
&& tar xzf ruby-2.4.2.tar.gz \
&& cd ruby-2.4.2 \
&& ./configure --prefix=/usr/local \
&& make \
&& make install
RUN apk add --no-cache \
ca-certificates \
git \
gcc \
libffi-dev \
make \
musl-dev \
rpm \
ruby \
ruby-dev \
tar

# Install fpm for package building
RUN apt-get install -y rpm \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists \
&& gem install --no-rdoc --no-ri fpm

# Back to the Go thingies
WORKDIR /go
RUN go get -u github.com/golang/dep/... \
&& go get -u github.com/alecthomas/gometalinter \
&& go get -u github.com/goreleaser/goreleaser

RUN gometalinter --install --update
RUN gem install --no-rdoc --no-ri fpm
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ services:
environment:
GOOS: ${GOOS:-darwin}
GOARCH: ${GOARCH:-amd64}
CGO_ENABLED: 0

# Install project dependencies.
install:
Expand Down