Skip to content
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
36 changes: 21 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
FROM golang:1.9-alpine
FROM golang:1.9

RUN apk add --no-cache \
ca-certificates \
git \
gcc \
libffi-dev \
make \
musl-dev \
rpm \
ruby \
ruby-dev \
tar \
&& go get -u github.com/golang/dep/... \
# 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

# 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
2 changes: 1 addition & 1 deletion commands/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (cmd *DNS) configureLinuxResolver() error {
// Is libnss-resolver in use
if _, err := os.Stat("/etc/resolver"); err == nil {
// Install for libnss-resolver connection to dnsdock
exec.Command("bash", "-c", fmt.Sprintf("echo 'nameserver %s' | sudo tee /etc/resolver/vm", bridgeIP)).Run()
exec.Command("bash", "-c", fmt.Sprintf("echo 'nameserver %s:53' | sudo tee /etc/resolver/vm", bridgeIP)).Run()
}

return nil
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ services:
# Build rig, dropping off a working binary in build/darwin/rig.
compile:
extends: base
command: go build -o build/darwin/rig cmd/main.go
command: go build -o build/${GOOS:-darwin}/rig cmd/main.go
environment:
- GOOS=darwin
- GOARCH=amd64
GOOS: ${GOOS:-darwin}
GOARCH: ${GOARCH:-amd64}

# Install project dependencies.
install:
Expand Down