Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3509674
D4162.id13234.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
947 B
Referenced Files
None
Subscribers
None
D4162.id13234.diff
View Options
diff --git a/services/commtest/Dockerfile b/services/commtest/Dockerfile
new file mode 100644
--- /dev/null
+++ b/services/commtest/Dockerfile
@@ -0,0 +1,33 @@
+FROM rust:1.57
+
+ARG COMM_TEST_TARGET
+
+ENV COMM_TEST_TARGET=${COMM_TEST_TARGET}
+
+# 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/commtest
+WORKDIR /home/comm/app/commtest
+RUN cargo init --bin
+
+COPY services/commtest/Cargo.toml services/commtest/Cargo.lock ./
+
+# Cache build dependencies in a new layer
+RUN cargo build --release
+RUN rm src/*.rs
+
+COPY services/commtest .
+COPY native/cpp/CommonCpp/grpc/protos/*.proto protos/
+
+# Remove the previously-built binary so that only the application itself is
+# rebuilt
+RUN rm ./target/release/deps/commtest*
+
+RUN cargo build --release
+
+CMD target/release/commtest
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 7:15 AM (40 m, 54 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2687670
Default Alt Text
D4162.id13234.diff (947 B)
Attached To
Mode
D4162: [DRAFT] [services] Tests - Add Dockerfile
Attached
Detach File
Event Timeline
Log In to Comment