2017-11-18 19:11:14 +01:00
|
|
|
FROM golang:latest
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
2018-08-26 14:35:18 +02:00
|
|
|
python3-pip \
|
|
|
|
unzip
|
|
|
|
|
2019-06-23 12:10:52 +02:00
|
|
|
ADD build.installprotoc.bash ./
|
|
|
|
RUN bash build.installprotoc.bash
|
2017-11-18 19:11:14 +01:00
|
|
|
|
|
|
|
ADD lazy.sh /tmp/lazy.sh
|
|
|
|
ADD docs/requirements.txt /tmp/requirements.txt
|
|
|
|
ENV ZREPL_LAZY_DOCS_REQPATH=/tmp/requirements.txt
|
2018-12-01 14:09:32 +01:00
|
|
|
RUN /tmp/lazy.sh docdep
|
2017-11-18 19:11:14 +01:00
|
|
|
|
2017-11-19 12:32:25 +01:00
|
|
|
# prepare volume mount of git checkout to /zrepl
|
2017-12-29 22:25:15 +01:00
|
|
|
RUN mkdir -p /go/src/github.com/zrepl/zrepl
|
2018-04-01 17:53:51 +02:00
|
|
|
RUN mkdir -p /.cache && chmod -R 0777 /.cache
|
2017-11-18 19:11:14 +01:00
|
|
|
WORKDIR /go/src/github.com/zrepl/zrepl
|
|
|
|
|
2018-12-01 14:09:32 +01:00
|
|
|
ADD Gopkg.toml Gopkg.lock ./
|
|
|
|
|
|
|
|
# godep will install the Go dependencies to vendor in order to then build and install
|
|
|
|
# build dependencies like stringer to $GOPATH/bin.
|
|
|
|
# However, since users volume-mount their Git checkout into /go/src/github.com/zrepl/zrepl
|
|
|
|
# the vendor directory will be empty at build time, allowing them to experiment with
|
|
|
|
# new checkouts, etc.
|
|
|
|
# Thus, we only use the vendored deps for building dependencies.
|
|
|
|
RUN /tmp/lazy.sh godep
|
|
|
|
RUN chmod -R 0777 /go
|
2017-11-18 19:11:14 +01:00
|
|
|
|