diff --git a/services/backup/Dockerfile b/services/backup/Dockerfile index c45817d94..dc68b1a0a 100644 --- a/services/backup/Dockerfile +++ b/services/backup/Dockerfile @@ -1,29 +1,29 @@ FROM commapp/services-base:1.3.2 RUN apt-get update && \ apt-get install -y uuid-dev && \ rm -rf /var/lib/apt/lists/* ARG COMM_TEST_SERVICES ARG COMM_SERVICES_SANDBOX ENV COMM_TEST_SERVICES=${COMM_TEST_SERVICES} ENV COMM_SERVICES_SANDBOX=${COMM_SERVICES_SANDBOX} WORKDIR /transferred/backup COPY services/lib/docker/ scripts/ # install rust RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y RUN scripts/install_corrosion.sh -COPY native/cpp/CommonCpp/grpc grpc/ +ADD shared/protos grpc COPY shared/cmake cmake-components/ COPY services/backup/ /transferred/backup/ COPY services/lib/src/ /transferred/lib/src/ RUN scripts/build_service.sh CMD if [ "$COMM_TEST_SERVICES" -eq 1 ]; then scripts/run_tests.sh; else scripts/run_service.sh; fi diff --git a/services/backup/blob_client/build.rs b/services/backup/blob_client/build.rs index bd2c996d1..0f86aa860 100644 --- a/services/backup/blob_client/build.rs +++ b/services/backup/blob_client/build.rs @@ -1,24 +1,24 @@ use regex::Regex; use std::env::current_dir; fn main() -> Result<(), Box> { let _build = cxx_build::bridge("src/lib.rs").flag_if_supported("-std=c++17"); println!("cargo:rerun-if-changed=src/lib.rs"); let is_in_docker_regex = Regex::new(r"^/transferred.*").unwrap(); let proto_path = if is_in_docker_regex.is_match( ¤t_dir() .unwrap() .into_os_string() .into_string() .unwrap(), ) { - "../grpc/protos" + "../grpc" } else { "../../../native/cpp/CommonCpp/grpc/protos" }; tonic_build::compile_protos(format!("{}/blob.proto", proto_path))?; Ok(()) } diff --git a/services/blob/Dockerfile b/services/blob/Dockerfile index d7665bb13..02a3c97f8 100644 --- a/services/blob/Dockerfile +++ b/services/blob/Dockerfile @@ -1,25 +1,25 @@ FROM commapp/services-base:1.3.2 RUN apt-get update && \ apt-get install -y uuid-dev && \ rm -rf /var/lib/apt/lists/* ARG COMM_TEST_SERVICES ARG COMM_SERVICES_SANDBOX ENV COMM_TEST_SERVICES=${COMM_TEST_SERVICES} ENV COMM_SERVICES_SANDBOX=${COMM_SERVICES_SANDBOX} WORKDIR /transferred COPY services/lib/docker/ scripts/ COPY services/blob/ blob COPY services/lib/src lib/src/ WORKDIR /transferred/blob -ADD native/cpp/CommonCpp/grpc grpc +ADD shared/protos grpc RUN ../scripts/build_service.sh CMD if [ "$COMM_TEST_SERVICES" -eq 1 ]; then ../scripts/run_tests.sh; else ../scripts/run_service.sh; fi diff --git a/services/identity/Dockerfile b/services/identity/Dockerfile index 7fd49bebd..90d726a5f 100644 --- a/services/identity/Dockerfile +++ b/services/identity/Dockerfile @@ -1,30 +1,30 @@ FROM rust:1.61 # Create a new user comm and use it to run subsequent commands RUN useradd -m comm USER comm # The build.rs script depends on rustfmt RUN rustup component add rustfmt RUN mkdir -p /home/comm/app/identity WORKDIR /home/comm/app/identity RUN cargo init --bin COPY services/identity/Cargo.toml services/identity/Cargo.lock ./ # Cache build dependencies in a new layer RUN cargo build --release RUN rm src/*.rs COPY services/identity . -COPY native/cpp/CommonCpp/grpc/protos/identity.proto protos/ +COPY shared/protos/identity.proto protos/ # Remove the previously-built binary so that only the application itself is # rebuilt RUN rm ./target/release/deps/identity* RUN cargo build --release RUN target/release/identity keygen CMD ["./target/release/identity", "server"] diff --git a/services/tunnelbroker/Dockerfile b/services/tunnelbroker/Dockerfile index 37b400d61..bd745b3d0 100644 --- a/services/tunnelbroker/Dockerfile +++ b/services/tunnelbroker/Dockerfile @@ -1,47 +1,47 @@ FROM commapp/services-base:1.3.2 ARG MAKE_JOBS=4 ENV MAKEFLAGS="-j${MAKE_JOBS}" WORKDIR /transferred/scripts # Install Curl RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl # Install SDKs COPY services/tunnelbroker/docker/install_amqp_cpp.sh . RUN ./install_amqp_cpp.sh COPY services/tunnelbroker/docker/install_cryptopp.sh . RUN ./install_cryptopp.sh COPY services/tunnelbroker/docker/install_libuv.sh . RUN ./install_libuv.sh RUN curl https://sh.rustup.rs -sSf | sh -s -- -y COPY services/lib/docker/install_corrosion.sh . RUN ./install_corrosion.sh ARG COMM_TEST_SERVICES ARG COMM_SERVICES_SANDBOX ENV COMM_TEST_SERVICES=${COMM_TEST_SERVICES} ENV COMM_SERVICES_SANDBOX=${COMM_SERVICES_SANDBOX} WORKDIR /transferred COPY services/lib/src/ lib/src/ COPY shared/ shared/ WORKDIR /transferred/tunnelbroker -ADD native/cpp/CommonCpp/grpc grpc +ADD shared/protos grpc COPY services/lib/cmake-components cmake-components COPY services/lib/docker/ scripts/ COPY services/tunnelbroker/docker/* docker/ COPY services/tunnelbroker/ . RUN scripts/build_service.sh CMD if [ "$COMM_TEST_SERVICES" -eq 1 ]; then scripts/run_tests.sh; else scripts/run_service.sh; fi