2020-04-01 14:03:57 +02:00
|
|
|
# Create a virtual environment with all tools installed
|
|
|
|
|
# ref: https://hub.docker.com/_/archlinux/
|
2020-09-10 17:16:35 +02:00
|
|
|
FROM archlinux:latest AS env
|
2020-04-01 14:03:57 +02:00
|
|
|
LABEL maintainer="corentinl@google.com"
|
|
|
|
|
# Install system build dependencies
|
|
|
|
|
ENV PATH=/usr/local/bin:$PATH
|
|
|
|
|
RUN pacman -Syu --noconfirm git base-devel bazel
|
|
|
|
|
|
2022-04-11 17:59:29 +02:00
|
|
|
# Install Python
|
|
|
|
|
RUN pacman -Syu --noconfirm python python-pip
|
|
|
|
|
RUN pacman -Syu --noconfirm python python-setuptools
|
|
|
|
|
|
2020-04-01 14:03:57 +02:00
|
|
|
FROM env AS devel
|
2022-01-06 17:06:00 +01:00
|
|
|
WORKDIR /home/project
|
2020-04-01 14:03:57 +02:00
|
|
|
COPY . .
|
|
|
|
|
|
2022-01-06 17:06:00 +01:00
|
|
|
FROM devel AS build
|
2021-11-29 13:38:33 +01:00
|
|
|
RUN bazel version
|
2022-04-11 17:59:29 +02:00
|
|
|
RUN bazel build -c opt --cxxopt=-std=c++17 ...
|
2020-04-01 14:03:57 +02:00
|
|
|
|
2022-01-06 17:06:00 +01:00
|
|
|
FROM build AS test
|
2022-04-11 17:59:29 +02:00
|
|
|
RUN bazel test -c opt --cxxopt=-std=c++17 ...
|