-
Notifications
You must be signed in to change notification settings - Fork 18
/
Dockerfile
37 lines (30 loc) · 858 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Use pre-built image of ubuntu with bazel
FROM tugan0329/bazel-linux:latest
WORKDIR /app
RUN apt update --fix-missing
RUN apt-get install -y python3
COPY WORKSPACE ./
COPY data ./data
COPY scripts ./scripts
COPY src/third_party ./src/third_party
# Build and cache protos generated code
COPY src/protos ./src/protos
RUN bazel build src/protos/...
# Build and cache common code
COPY src/common ./src/common
RUN bazel build src/common/...
# Build and cache client code
COPY src/client ./src/client
RUN bazel build src/client/...
# Build and cache server code
COPY src/server ./src/server
RUN bazel build src/server/...
# Build and cache rest of src code
COPY src/ ./src/
RUN bazel build src/...
# Build and cache rest of examaples
COPY examples/ ./examples
RUN bazel build examples/...
# Build and cache the rest of the code
COPY . .
RUN bazel build ...