Page MenuHomePhabricator

D3593.id11316.diff
No OneTemporary

D3593.id11316.diff

diff --git a/services/identity/Dockerfile b/services/identity/Dockerfile
new file mode 100644
--- /dev/null
+++ b/services/identity/Dockerfile
@@ -0,0 +1,27 @@
+FROM rust:1.57
+
+# Create a new user comm and use it to run subsequent commands
+RUN useradd -m comm
+USER comm
+
+WORKDIR /app/identity
+RUN cargo init --bin
+
+COPY Cargo.toml Cargo.lock ./
+
+# Cache build dependencies in a new layer
+RUN cargo build --release
+RUN rm src/*.rs
+
+COPY . .
+
+# Remove the previously-built binary so that only the application itself is
+# rebuilt
+RUN rm ./target/release/deps/identity*
+
+# The build.rs script depends on rustfmt
+RUN rustup component add rustfmt
+
+RUN cargo build --release
+
+CMD ["./target/release/identity"]

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 1, 8:47 PM (22 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2401338
Default Alt Text
D3593.id11316.diff (730 B)

Event Timeline