2020-09-06 15:39:34 +02:00
|
|
|
FROM !SUBSTITUTED_BY_MAKEFILE
|
2017-11-18 19:11:14 +01:00
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
2018-08-26 14:35:18 +02:00
|
|
|
python3-pip \
|
2023-09-09 13:26:57 +02:00
|
|
|
python3-venv \
|
2019-11-20 20:57:50 +01:00
|
|
|
unzip \
|
|
|
|
gawk
|
2018-08-26 14:35:18 +02:00
|
|
|
|
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
|
|
|
|
2023-09-09 13:26:57 +02:00
|
|
|
# setup venv
|
|
|
|
ENV VIRTUAL_ENV=/opt/venv
|
|
|
|
RUN python3 -m venv $VIRTUAL_ENV
|
|
|
|
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
|
|
|
|
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
|
2019-09-03 14:45:18 +02:00
|
|
|
RUN mkdir -p /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
|
|
|
|
2019-09-03 14:45:18 +02:00
|
|
|
# $GOPATH is /go
|
|
|
|
# Go 1.12 doesn't use modules within GOPATH, but 1.13 and later do
|
|
|
|
# => store source outside of GOPATH
|
|
|
|
WORKDIR /src
|
2018-12-01 14:09:32 +01:00
|
|
|
|
2019-09-03 14:45:18 +02:00
|
|
|
# Install build tools (e.g. protobuf generator, stringer) into $GOPATH/bin
|
2019-11-20 20:57:50 +01:00
|
|
|
ADD build/ /tmp/build
|
2018-12-01 14:09:32 +01:00
|
|
|
RUN /tmp/lazy.sh godep
|
2019-09-03 14:45:18 +02:00
|
|
|
|
2018-12-01 14:09:32 +01:00
|
|
|
RUN chmod -R 0777 /go
|
2017-11-18 19:11:14 +01:00
|
|
|
|