Skip to content
Snippets Groups Projects
Commit fa968e5b authored by Raghunandan Netrapalli Madhusudhan's avatar Raghunandan Netrapalli Madhusudhan
Browse files

feat: Update dockerfile with bazel package

parent 78686bd6
No related branches found
No related tags found
1 merge request!280Use standalone pipeline for e2e
......@@ -2,7 +2,7 @@
# Copyright (c) 2020-2021 in-tech GmbH
# 2021 ITK-Engineering GmbH
# 2023 Deutsches Zentrum für Luft- und Raumfahrt e. V. (DLR)
# 2022-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# 2022-2025 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
......@@ -16,67 +16,36 @@ FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update && apt-get -qq dist-upgrade && apt-get install -qq -y --no-install-recommends \
antlr4 \
build-essential \
ca-certificates \
ccache \
cmake \
clang-format-15 \
clang-tidy-14 \
curl \
doxygen \
g++ \
gcc \
git \
google-mock \
googletest \
graphviz \
lcov \
libboost-filesystem-dev \
libgmock-dev \
libgtest-dev \
libprotobuf-dev \
libantlr4-runtime4.9 \
libantlr4-runtime-java \
libantlr4-runtime-dev \
openjdk-17-jre \
pkg-config \
protobuf-compiler \
python3 \
python3-distutils \
python3-pip \
python3-venv \
uuid-dev \
unzip \
&& apt-get -qq clean
RUN apt-get install -qq -y --no-install-recommends \
texlive-base \
texlive-latex-extra
RUN apt-get install -qq -y --no-install-recommends \
dvipng
# Create a folder
RUN mkdir -p /opsimulation/conan
# set the folder as a conan home
ENV CONAN_HOME='/opsimulation/conan'
ENV PYTHON_EXECUTABLE=python3
# copy the required contents from the repo to build conan packages
COPY repo/utils/ci/scripts/15_prepare_thirdParty.sh repo/utils/ci/scripts/15_prepare_thirdParty.sh
COPY repo/utils/ci/conan repo/utils/ci/conan
# copy requirements.txt file to install python packages
COPY repo/requirements.txt repo/requirements.txt
COPY repo/doc/source/requirements.txt repo/doc/source/requirements.txt
COPY repo/sim/tests/endToEndTests/pyOpenPASS/requirements.txt repo/sim/tests/endToEndTests/pyOpenPASS/requirements.txt
# install python packages
RUN pip install -r repo/requirements.txt
# Create conan packages and make it available in /opsimulation/conan, allows not to build everytime
RUN repo/utils/ci/scripts/15_prepare_thirdParty.sh && \
rm -r repo deps && \
chmod -R 777 /opsimulation/conan
ARG BAZELISK_VERSION=1.19.0
ARG BAZELISK_SHA=d28b588ac0916abd6bf02defb5433f6eddf7cba35ffa808eabb65a44aab226f7
RUN curl -fSsL -L -o /usr/local/bin/bazel \
"https://github.com/bazelbuild/bazelisk/releases/download/v${BAZELISK_VERSION}/bazelisk-linux-amd64" \
&& echo "${BAZELISK_SHA} */usr/local/bin/bazel" | sha256sum --check - \
&& chmod 0755 /usr/local/bin/bazel
ARG BUILDIFIER_VERSION=6.0.0
ARG BUILDIFIER_SHA=7ff82176879c0c13bc682b6b0e482d670fbe13bbb20e07915edb0ad11be50502
RUN curl -fSsL -L -o /usr/local/bin/buildifier \
"https://github.com/bazelbuild/buildtools/releases/download/${BUILDIFIER_VERSION}/buildifier-linux-amd64" \
&& echo "${BUILDIFIER_SHA} */usr/local/bin/buildifier" | sha256sum --check - \
&& chmod 0755 /usr/local/bin/buildifier
ARG SHFMT_VERSION=v3.6.0
ARG SHFMT_SHA=5741a02a641de7e56b8da170e71a97e58050d66a3cf485fb268d6a5a8bb74afb
RUN curl -fSsL -L -o /usr/local/bin/shfmt \
"https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_linux_amd64" \
&& echo "${SHFMT_SHA} */usr/local/bin/shfmt" | sha256sum --check - \
&& chmod 0755 /usr/local/bin/shfmt
# Verify installation
RUN bazel --version
RUN mkdir -p /.cache \
&& chmod -R 777 /.cache
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment