mirror of
https://github.com/zrepl/zrepl.git
synced 2024-12-23 07:28:57 +01:00
234a327a03
* protoc zip fetching * Makefile: * GOOS and GOARCH * run vet on all targets Note: freebsd/arm64 is apparently not supported fixes #180 refs #181
31 lines
963 B
Docker
31 lines
963 B
Docker
FROM golang:latest
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
python3-pip \
|
|
unzip
|
|
|
|
ADD build.installprotoc.bash ./
|
|
RUN bash build.installprotoc.bash
|
|
|
|
ADD lazy.sh /tmp/lazy.sh
|
|
ADD docs/requirements.txt /tmp/requirements.txt
|
|
ENV ZREPL_LAZY_DOCS_REQPATH=/tmp/requirements.txt
|
|
RUN /tmp/lazy.sh docdep
|
|
|
|
# prepare volume mount of git checkout to /zrepl
|
|
RUN mkdir -p /go/src/github.com/zrepl/zrepl
|
|
RUN mkdir -p /.cache && chmod -R 0777 /.cache
|
|
WORKDIR /go/src/github.com/zrepl/zrepl
|
|
|
|
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
|
|
|