Files
ortools-clone/bazel/docker/alpine/Dockerfile
Mizux Seiha f992206a9a Force use of C++17
Routing use c++17 features (e.g. structured binding)
ref: https://en.cppreference.com/w/cpp/language/structured_binding
2020-08-14 14:07:58 +02:00

20 lines
649 B
Docker

# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/_/alpine
FROM alpine:edge AS env
LABEL maintainer="corentinl@google.com"
# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN apk add --no-cache git build-base linux-headers zlib-dev
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing bazel
CMD [ "/bin/sh" ]
FROM env AS devel
WORKDIR /home/lib
COPY . .
FROM devel as build
RUN bazel build --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
FROM build as test
RUN bazel test -c opt --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all