forked from google/xls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-ubuntu-20.04
36 lines (26 loc) · 1023 Bytes
/
Dockerfile-ubuntu-20.04
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
# Download base image ubuntu 20.04
FROM ubuntu:20.04
# LABEL about the custom image
LABEL version="0.1"
LABEL description="Docker Image for Building/Testing XLS on Ubuntu 20.04 x86-64"
# Update package info
RUN apt-get update -y
# Install Bazel
RUN apt-get install -y curl gnupg && \
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg && \
mv bazel.gpg /etc/apt/trusted.gpg.d/ && \
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list && \
apt-get update -y && apt-get install -y bazel
# Install dependencies
RUN apt-get -y install python3-distutils python3-dev python-is-python3 libtinfo5
# Install development tools
RUN apt-get install -y git vim
RUN useradd -m xls-developer
USER xls-developer
# Map the project contents in.
ADD --chown=xls-developer . /home/xls-developer/xls/
WORKDIR /home/xls-developer/xls/
# Build everything (opt)
RUN bazel build -c opt ...
# Test everything (opt)
RUN bazel test -c opt ...