Merge pull request #8 from instana/dispatch-refactor

Introduce dep + ping external dependency versions
This commit is contained in:
steveww
2018-07-23 12:25:19 +01:00
committed by GitHub
2 changed files with 19 additions and 13 deletions

View File

@@ -1,22 +1,17 @@
FROM golang:1.9.2
WORKDIR /opt/gorcv
ENV DEP_URL="https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64"
ENV GOPATH=/go
ENV GOPATH=/opt/gorcv \
GOBIN=/opt/gorcv/bin \
AMQP_URI=rabbitmq
COPY src/ /go/src/github.com/instana/dispatch
# install external components
# @todo godep
RUN go get \
github.com/streadway/amqp \
github.com/instana/golang-sensor
WORKDIR /go/src/github.com/instana/dispatch
COPY src /opt/gorcv/
RUN go build && go install
RUN curl -fsSL -o /usr/local/bin/dep ${DEP_URL} && \
chmod +x /usr/local/bin/dep && \
dep ensure && \
go build -o bin/gorcv
# @todo stage this build
CMD bin/gorcv

11
dispatch/src/Gopkg.toml Normal file
View File

@@ -0,0 +1,11 @@
[[constraint]]
name = "github.com/streadway/amqp"
revision = "e5adc2ada8b8efff032bf61173a233d143e9318e"
[[constraint]]
name = "github.com/instana/golang-sensor"
version = "1.4.10"
[[constraint]]
name = "github.com/opentracing/opentracing-go"
version = "1.0.2"