зеркало из https://github.com/github/vitess-gh.git
fix docker pre-fetch of go modules
Signed-off-by: Morgan Tocker <tocker@gmail.com>
This commit is contained in:
Родитель
18e0e98275
Коммит
0b191d648a
|
@ -52,19 +52,21 @@ ENV USER vitess
|
|||
ENV GO111MODULE on
|
||||
|
||||
# Copy files needed for bootstrap
|
||||
COPY bootstrap.sh dev.env build.env /vt/src/vitess.io/vitess/
|
||||
COPY bootstrap.sh dev.env build.env go.mod go.sum /vt/src/vitess.io/vitess/
|
||||
COPY config /vt/src/vitess.io/vitess/config
|
||||
COPY third_party /vt/src/vitess.io/vitess/third_party
|
||||
COPY tools /vt/src/vitess.io/vitess/tools
|
||||
COPY travis /vt/src/vitess.io/vitess/travis
|
||||
|
||||
RUN go mod download
|
||||
|
||||
# Create vitess user
|
||||
RUN groupadd -r vitess && useradd -r -g vitess vitess && \
|
||||
mkdir -p /vt/vtdataroot /home/vitess && \
|
||||
chown -R vitess:vitess /vt /home/vitess
|
||||
|
||||
# Download vendored Go dependencies
|
||||
RUN cd /vt/src/vitess.io/vitess && \
|
||||
su vitess -c "/usr/local/go/bin/go mod download"
|
||||
|
||||
# Create mount point for actual data (e.g. MySQL data dir)
|
||||
VOLUME /vt/vtdataroot
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче