diff --git a/services/identity/Dockerfile b/services/identity/Dockerfile index 90d726a5f..b2e0e51bf 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 shared/protos/identity.proto protos/ +COPY shared/protos/identity.proto ../../shared/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/identity/build.rs b/services/identity/build.rs index 23575c8c6..7a5c3d9ff 100644 --- a/services/identity/build.rs +++ b/services/identity/build.rs @@ -1,4 +1,4 @@ fn main() -> Result<(), Box> { - tonic_build::compile_protos("protos/identity.proto")?; + tonic_build::compile_protos("../../shared/protos/identity.proto")?; Ok(()) }