Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3381896
D5458.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D5458.diff
View Options
diff --git a/services/docker-compose.yml b/services/docker-compose.yml
--- a/services/docker-compose.yml
+++ b/services/docker-compose.yml
@@ -20,7 +20,7 @@
- $HOME/.aws/config:/root/.aws/config:ro
- $HOME/.aws/credentials:/root/.aws/credentials:ro
- ./tunnelbroker/tunnelbroker.ini:/root/tunnelbroker/tunnelbroker.ini:ro
- - ./tunnelbroker/tunnelbroker-dev.ini:/root/tunnelbroker/tunnelbroker-dev.ini:ro
+ - ./tunnelbroker/tunnelbroker-sandbox.ini:/root/tunnelbroker/tunnelbroker-sandbox.ini:ro
# backup
backup-server:
depends_on:
diff --git a/services/tunnelbroker/Dockerfile b/services/tunnelbroker/Dockerfile
--- a/services/tunnelbroker/Dockerfile
+++ b/services/tunnelbroker/Dockerfile
@@ -1,8 +1,6 @@
FROM commapp/services-base:1.3.2
-RUN apt-get update && \
- DEBIAN_FRONTEND=noninteractive apt-get install -y curl && \
- rm -rf /var/lib/apt/lists/*
+ENV PATH=/root/.cargo/bin:$PATH
ARG COMM_TEST_SERVICES
ARG COMM_SERVICES_SANDBOX
@@ -10,26 +8,42 @@
ENV COMM_TEST_SERVICES=${COMM_TEST_SERVICES}
ENV COMM_SERVICES_SANDBOX=${COMM_SERVICES_SANDBOX}
+# Install Curl
+RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl
+
# Install Rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
-WORKDIR /transferred/services/tunnelbroker
-
-COPY services/lib/docker/ scripts/
-COPY services/tunnelbroker/docker/ scripts/
+# Copying of the installation scripts
+WORKDIR /transferred/services/tunnelbroker/docker
+COPY services/tunnelbroker/docker .
# Install SDKs
-RUN scripts/install_amqp_cpp.sh
-RUN scripts/install_cryptopp.sh
-RUN scripts/install_libuv.sh
-RUN scripts/install_corrosion.sh
+RUN ./install_amqp_cpp.sh
+RUN ./install_cryptopp.sh
+RUN ./install_libuv.sh
-ADD shared/protos /transferred/shared/protos/
-ADD shared/cmake /transferred/shared/cmake/
+# Copying of the shared code
+WORKDIR /transferred
+COPY services/lib/src/ services/lib/src/
+COPY shared/ shared/
-COPY services/tunnelbroker/ /transferred/services/tunnelbroker/
-COPY services/lib/src/ /transferred/services/lib/src/
+# Copying of the Tunnelbroker code
+WORKDIR /transferred/services/tunnelbroker
+COPY services/tunnelbroker/ .
-RUN scripts/build_service.sh
+# Build C++ library gTests by CMake
+WORKDIR /transferred/services/tunnelbroker/src/libcpp/test
+RUN cmake -B build . && make -C build -j$(nproc)
-CMD if [ "$COMM_TEST_SERVICES" -eq 1 ]; then scripts/run_tests.sh; else scripts/run_service.sh; fi
+# Build Rust by Cargo
+WORKDIR /transferred/services/tunnelbroker
+RUN cargo build
+
+CMD if [ "$COMM_TEST_SERVICES" -eq 1 ];\
+ then\
+ src/libcpp/test/build/bin/runTests --gtest_filter='-AmqpManager*:DatabaseManager*'\
+ && cargo test;\
+ else\
+ cargo run;\
+ fi
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 7:03 AM (21 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596279
Default Alt Text
D5458.diff (2 KB)
Attached To
Mode
D5458: [services] Tunnelbroker - Changes to build the Tunnelbroker using `cargo` in a Docker
Attached
Detach File
Event Timeline
Log In to Comment