|  | 
|  | 1 | +# Copyright 2023 Contributors to the Parsec project. | 
|  | 2 | +# SPDX-License-Identifier: Apache-2.0 | 
|  | 3 | +FROM ubuntu:22.04 | 
|  | 4 | + | 
|  | 5 | +RUN apt-get update && apt-get -y upgrade | 
|  | 6 | +RUN apt install -y autoconf-archive libcmocka0 libcmocka-dev procps | 
|  | 7 | +RUN apt install -y iproute2 build-essential git pkg-config gcc libtool automake libssl-dev uthash-dev doxygen libjson-c-dev | 
|  | 8 | +RUN apt install -y --fix-missing wget python3 cmake clang | 
|  | 9 | +RUN apt install -y libini-config-dev libcurl4-openssl-dev curl libgcc1 | 
|  | 10 | +RUN apt install -y python3-distutils libclang-11-dev protobuf-compiler python3-pip | 
|  | 11 | +RUN apt install -y libgcrypt20-dev uuid-dev | 
|  | 12 | +RUN apt install -y libssl-dev git gcc openssl | 
|  | 13 | + | 
|  | 14 | +# Setup git config | 
|  | 15 | +RUN git config --global user.email "some@email.com" | 
|  | 16 | +RUN git config --global user.name "Parsec Team" | 
|  | 17 | + | 
|  | 18 | +WORKDIR /tmp | 
|  | 19 | + | 
|  | 20 | +# Install Rust toolchain for all users | 
|  | 21 | +# This way of installing allows all users to call the same binaries, but non-root | 
|  | 22 | +# users cannot modify the toolchains or install new ones. | 
|  | 23 | +# See: https://github.com/rust-lang/rustup/issues/1085 | 
|  | 24 | +ENV RUSTUP_HOME /opt/rust | 
|  | 25 | +ENV CARGO_HOME /opt/rust | 
|  | 26 | +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path | 
|  | 27 | +ENV PATH="/root/.cargo/bin:/opt/rust/bin:${PATH}" | 
|  | 28 | + | 
|  | 29 | +# Install the wrappers for the Rust binaries installed earlier | 
|  | 30 | +COPY _exec_wrapper /usr/local/bin/ | 
|  | 31 | +RUN ls /opt/rust/bin | xargs -n1 -I% ln -s /usr/local/bin/_exec_wrapper /usr/local/bin/$(basename %) | 
|  | 32 | + | 
|  | 33 | +# For running tests Parsec is configured with the socket in /tmp/ | 
|  | 34 | +ENV PARSEC_SERVICE_ENDPOINT="unix:/tmp/parsec.sock" | 
0 commit comments