Skip to content

Commit

Permalink
Dockerfile: run go get in container creation
Browse files Browse the repository at this point in the history
This significantly speeds up test execution

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
  • Loading branch information
amorenoz committed Jan 14, 2021
1 parent c3834eb commit ce1dd59
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
libssl-dev \
llvm-dev \
libjemalloc-dev \
libnuma-dev \
libnuma-dev \
python-sphinx \
libelf-dev \
selinux-policy-dev \
Expand All @@ -15,8 +15,15 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
automake \
libtool

ADD .travis /src/travis
WORKDIR /src/travis
# Cache go mod dependencies to speed up test execution
WORKDIR /src
ADD go.mod /src/
ADD go.sum /src/
ENV GO111MODULE=on
RUN go get -v ./...

# Prepare the environment (builds ovsdb)
WORKDIR /src/travis
ADD .travis /src/travis
ENV OVN_SRCDIR=/src/
RUN sh ./test_prepare.sh

0 comments on commit ce1dd59

Please sign in to comment.