Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3492062
D4162.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.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
Thu, Dec 19, 10:01 PM (21 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2678975
Default Alt Text
D4162.diff (947 B)
Attached To
Mode
D4162: [DRAFT] [services] Tests - Add Dockerfile
Attached
Detach File
Event Timeline
Log In to Comment