diff --git a/services/backup/docker-base/Dockerfile b/services/backup/docker-base/Dockerfile index 74a6e7427..32d0f1789 100644 --- a/services/backup/docker-base/Dockerfile +++ b/services/backup/docker-base/Dockerfile @@ -1,18 +1,7 @@ -FROM commapp/services-base:1.0 +FROM commapp/services-base:1.1 ENV SHELL=/bin/bash -COPY services/backup/docker-base/contents /transferred - -RUN apt-get update && apt-get install -y \ - libcurl4-openssl-dev \ - libssl-dev \ - uuid-dev \ - zlib1g-dev \ - && rm -rf /var/lib/apt/lists/* - -RUN cd / -RUN /transferred/install_aws_sdk.sh -RUN /transferred/install_folly.sh - +RUN apt-get update && apt-get install -y uuid-dev && rm -rf /var/lib/apt/lists/* + CMD /bin/bash diff --git a/services/backup/docker-server/Dockerfile b/services/backup/docker-server/Dockerfile index bbbee9645..74a56f46d 100644 --- a/services/backup/docker-server/Dockerfile +++ b/services/backup/docker-server/Dockerfile @@ -1,15 +1,15 @@ -FROM commapp/backup-base:1.1 +FROM commapp/backup-base:1.2 ARG COMM_TEST_SERVICES ARG COMM_SERVICES_DEV_MODE ENV SHELL=/bin/bash ENV COMM_TEST_SERVICES=${COMM_TEST_SERVICES} ENV COMM_SERVICES_DEV_MODE=${COMM_SERVICES_DEV_MODE} COPY services/backup/docker-server/contents /transferred COPY native/cpp/CommonCpp/grpc/protos/backup.proto /transferred/server/protos/backup.proto RUN /transferred/build_server.sh CMD if [ "$COMM_TEST_SERVICES" -eq 1 ]; then /transferred/run_tests.sh; else /transferred/run_server.sh; fi diff --git a/services/base-image/Dockerfile b/services/base-image/Dockerfile index 06c34a374..09ee3fc7d 100644 --- a/services/base-image/Dockerfile +++ b/services/base-image/Dockerfile @@ -1,23 +1,28 @@ FROM ubuntu:20.04 ENV SHELL=/bin/bash WORKDIR / COPY contents /transferred RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ cmake \ git \ build-essential \ autoconf \ libtool \ pkg-config \ libboost-all-dev \ libfmt-dev \ libgtest-dev \ - && rm -rf /var/lib/apt/lists/* + libcurl4-openssl-dev \ + libssl-dev \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* RUN /transferred/install_grpc.sh +RUN /transferred/install_aws_sdk.sh +RUN /transferred/install_folly.sh CMD /bin/bash diff --git a/services/backup/docker-base/contents/install_aws_sdk.sh b/services/base-image/contents/install_aws_sdk.sh similarity index 98% rename from services/backup/docker-base/contents/install_aws_sdk.sh rename to services/base-image/contents/install_aws_sdk.sh index c131fcd37..e0e3f5774 100755 --- a/services/backup/docker-base/contents/install_aws_sdk.sh +++ b/services/base-image/contents/install_aws_sdk.sh @@ -1,20 +1,20 @@ #!/bin/bash set -e if [[ -d /usr/lib/aws-sdk-cpp ]]; then echo "aws-sdk already exists, skipping installation(if the installation seems to be broken, remove this container/image and recreate it)..." - exit 0; + exit 0 fi pushd /usr/lib git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp -b 1.9.176 mkdir aws_sdk_build pushd aws_sdk_build cmake ../aws-sdk-cpp/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/local/aws_sdk -DBUILD_ONLY="core;s3;dynamodb" make make install popd # aws_sdk_build popd # /usr/lib diff --git a/services/backup/docker-base/contents/install_folly.sh b/services/base-image/contents/install_folly.sh similarity index 100% rename from services/backup/docker-base/contents/install_folly.sh rename to services/base-image/contents/install_folly.sh diff --git a/services/base-image/contents/install_grpc.sh b/services/base-image/contents/install_grpc.sh index b0059b904..b30d1304b 100755 --- a/services/base-image/contents/install_grpc.sh +++ b/services/base-image/contents/install_grpc.sh @@ -1,34 +1,34 @@ #!/bin/bash set -e echo "installing grpc..." if [[ -d /usr/lib/grpc ]]; then echo "grpc already exists, skipping installation(if the installation seems to be broken, remove this container/image and recreate it)..." - exit 0; + exit 0 fi pushd /usr/lib git clone --recurse-submodules -b v1.39.1 https://github.com/grpc/grpc pushd grpc mkdir -p cmake/build pushd cmake/build cmake -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ ../.. make make install popd # cmake/build pushd third_party/abseil-cpp/ mkdir -p cmake/build pushd cmake/build cmake ../.. make make install popd # cmake/build popd # third_party/abseil-cpp/ popd # grpc popd # /usr/lib diff --git a/services/blob/docker-base/Dockerfile b/services/blob/docker-base/Dockerfile index 264ff9e7c..4a4b5a16d 100644 --- a/services/blob/docker-base/Dockerfile +++ b/services/blob/docker-base/Dockerfile @@ -1,18 +1,7 @@ -FROM commapp/services-base:1.0 +FROM commapp/services-base:1.1 ENV SHELL=/bin/bash -COPY services/blob/docker-base/contents /transferred - -RUN apt-get update && apt-get install -y \ - libcurl4-openssl-dev \ - libssl-dev \ - uuid-dev \ - zlib1g-dev \ - && rm -rf /var/lib/apt/lists/* - -RUN cd / -RUN /transferred/install_aws_sdk.sh -RUN /transferred/install_folly.sh +RUN apt-get update && apt-get install -y uuid-dev && rm -rf /var/lib/apt/lists/* CMD /bin/bash diff --git a/services/blob/docker-base/contents/install_aws_sdk.sh b/services/blob/docker-base/contents/install_aws_sdk.sh deleted file mode 100755 index c131fcd37..000000000 --- a/services/blob/docker-base/contents/install_aws_sdk.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -set -e - -if [[ -d /usr/lib/aws-sdk-cpp ]]; then - echo "aws-sdk already exists, skipping installation(if the installation seems to be broken, remove this container/image and recreate it)..." - exit 0; -fi - -pushd /usr/lib - -git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp -b 1.9.176 -mkdir aws_sdk_build -pushd aws_sdk_build -cmake ../aws-sdk-cpp/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/local/aws_sdk -DBUILD_ONLY="core;s3;dynamodb" -make -make install - -popd # aws_sdk_build -popd # /usr/lib diff --git a/services/blob/docker-base/contents/install_folly.sh b/services/blob/docker-base/contents/install_folly.sh deleted file mode 100755 index 80d0fd0de..000000000 --- a/services/blob/docker-base/contents/install_folly.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -e - -pushd /usr/lib - -git clone https://github.com/facebook/folly.git --branch v2020.01.13.00 --single-branch -git clone https://github.com/google/glog.git --branch v0.4.0 --single-branch -git clone https://github.com/google/double-conversion.git --branch v3.1.5 --single-branch - -popd # /usr/lib diff --git a/services/blob/docker-server/Dockerfile b/services/blob/docker-server/Dockerfile index 14b5e2588..a0b3eab1a 100644 --- a/services/blob/docker-server/Dockerfile +++ b/services/blob/docker-server/Dockerfile @@ -1,16 +1,16 @@ -FROM commapp/blob-base:1.2 +FROM commapp/blob-base:1.3 ARG COMM_SERVICES_DEV_MODE ENV SHELL=/bin/bash ENV COMM_SERVICES_DEV_MODE=${COMM_SERVICES_DEV_MODE} COPY services/blob/docker-server/contents /transferred COPY native/cpp/CommonCpp/grpc/protos/blob.proto /transferred/server/protos/blob.proto ARG COMM_TEST_SERVICES ENV COMM_TEST_SERVICES=${COMM_TEST_SERVICES} RUN /transferred/build_server.sh CMD /transferred/run_server.sh diff --git a/services/docker-compose.yml b/services/docker-compose.yml index 354daaa59..b314127bd 100644 --- a/services/docker-compose.yml +++ b/services/docker-compose.yml @@ -1,54 +1,54 @@ version: "3.9" services: tunnelbroker-server: build: dockerfile: services/tunnelbroker/Dockerfile context: ../ args: - COMM_TEST_SERVICES=${COMM_TEST_SERVICES} image: commapp/tunnelbroker-server:0.2 container_name: tunnelbroker-server ports: - "${COMM_SERVICES_PORT_TUNNELBROKER}:50051" volumes: - $HOME/.aws/config:/root/.aws/config:ro - $HOME/.aws/credentials:/root/.aws/credentials:ro - ./tunnelbroker/tunnelbroker.ini:/root/tunnelbroker/tunnelbroker.ini:ro # backup backup-base: build: dockerfile: services/backup/docker-base/Dockerfile context: ../ - image: commapp/backup-base:1.1 + image: commapp/backup-base:1.2 backup-server: build: dockerfile: services/backup/docker-server/Dockerfile context: ../ args: - COMM_TEST_SERVICES=${COMM_TEST_SERVICES} - COMM_SERVICES_DEV_MODE=${COMM_SERVICES_DEV_MODE} image: commapp/backup-server:0.1 container_name: backup-server ports: - "${COMM_SERVICES_PORT_BACKUP}:50051" volumes: - $HOME/.aws/credentials:/root/.aws/credentials:ro # blob blob-base: build: dockerfile: services/blob/docker-base/Dockerfile context: ../ - image: commapp/blob-base:1.2 + image: commapp/blob-base:1.3 blob-server: build: dockerfile: services/blob/docker-server/Dockerfile context: ../ args: - COMM_TEST_SERVICES=${COMM_TEST_SERVICES} - COMM_SERVICES_DEV_MODE=${COMM_SERVICES_DEV_MODE} image: commapp/blob-server:0.1 container_name: blob-server ports: - "${COMM_SERVICES_PORT_BLOB}:50051" volumes: - $HOME/.aws/credentials:/root/.aws/credentials:ro diff --git a/services/tunnelbroker/Dockerfile b/services/tunnelbroker/Dockerfile index 14def90e5..5efa74b3c 100644 --- a/services/tunnelbroker/Dockerfile +++ b/services/tunnelbroker/Dockerfile @@ -1,44 +1,38 @@ FROM commapp/services-base:1.0 ENV SHELL=/bin/bash RUN apt-get update && apt-get install -y \ libcurl4-openssl-dev \ libssl-dev \ zlib1g-dev \ && rm -rf /var/lib/apt/lists/* ARG MAKE_JOBS=4 ENV MAKEFLAGS="-j${MAKE_JOBS}" RUN mkdir /transferred/scripts WORKDIR /transferred/scripts # Install SDKs -COPY services/tunnelbroker/docker/install_folly.sh . -RUN ./install_folly.sh - -COPY services/tunnelbroker/docker/install_aws_sdk.sh . -RUN ./install_aws_sdk.sh - COPY services/tunnelbroker/docker/install_amqp_cpp.sh . RUN ./install_amqp_cpp.sh COPY services/tunnelbroker/docker/install_cryptopp.sh . RUN ./install_cryptopp.sh COPY services/tunnelbroker/docker/install_libuv.sh . RUN ./install_libuv.sh ARG COMM_TEST_SERVICES ENV COMM_TEST_SERVICES=${COMM_TEST_SERVICES} WORKDIR /transferred COPY native/cpp/CommonCpp/grpc/protos/tunnelbroker.proto protos/tunnelbroker.proto COPY services/tunnelbroker/docker/ scripts/ COPY services/tunnelbroker/ . RUN scripts/build_server.sh CMD if [ "$COMM_TEST_SERVICES" -eq 1 ]; then scripts/run_tests.sh; else scripts/run_server.sh; fi