Skip to content
This repository was archived by the owner on Jan 27, 2022. It is now read-only.

Cleaning Dockerfile from openssl dependency #643

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 0 additions & 77 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,68 +65,6 @@ RUN apt-get update \
RUN pip3 install setuptools


# -------------=== Build openssl_image ===-------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does verify report in Avalon shell use openSSL. @manju956 @pankajgoyal2 can you please confirm if verify report will work if we remove openSSL (untrusted) from Avalon shell docker image

Copy link
Contributor

@Ram-srini Ram-srini Jul 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generic client uses it to verify the AVR report of worker. We should make verify-report cpp module as independent package, so that client will install only that CPP module and Avalon SDK.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify_report module is built as separate python package. It depends on openssl as client invokes untrusted cpp code to do verification of attestation data.


#Build openssl intermediate docker image
FROM ubuntu:bionic as openssl_image

RUN apt-get update \
&& apt-get install -y -q \
ca-certificates \
pkg-config \
make \
wget \
tar \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /tmp

# Build ("Untrusted") OpenSSL
RUN OPENSSL_VER=1.1.1d \
&& wget https://www.openssl.org/source/old/1.1.1/openssl-$OPENSSL_VER.tar.gz \
&& tar -zxf openssl-$OPENSSL_VER.tar.gz \
&& cd openssl-$OPENSSL_VER/ \
&& ./config \
&& THREADS=8 \
&& make -j$THREADS \
&& make test \
&& make install -j$THREADS


# -------------=== common/cpp build ===-------------

#Build common/cpp intermediate docker image
FROM ubuntu:bionic as common_cpp_image

RUN apt-get update \
&& apt-get install -y -q \
pkg-config \
cmake \
make


# Copy openssl build artifacts from openssl_image
COPY --from=openssl_image /usr/local/ssl /usr/local/ssl
COPY --from=openssl_image /usr/local/bin /usr/local/bin
COPY --from=openssl_image /usr/local/include /usr/local/include
COPY --from=openssl_image /usr/local/lib /usr/local/lib

RUN ldconfig \
&& ln -s /etc/ssl/certs/* /usr/local/ssl/certs/

ENV TCF_HOME=/project/avalon

COPY ./common/cpp /project/avalon/common/cpp

WORKDIR /project/avalon/common/cpp

RUN mkdir -p build \
&& cd build \
&& cmake .. -DUNTRUSTED_ONLY=1 \
&& make


# -------------=== common/python build ===-------------

#Build common/python intermediate docker image
Expand All @@ -150,23 +88,8 @@ RUN echo "Building Avalon Common Python\n" \
#Build common/crypto_utils intermediate docker image
FROM python_image as common_crypto_utils_image

RUN apt-get update \
&& apt-get install -y -q \
swig

# Copy openssl build artifacts from openssl_image
COPY --from=openssl_image /usr/local/ssl /usr/local/ssl
COPY --from=openssl_image /usr/local/bin /usr/local/bin
COPY --from=openssl_image /usr/local/include /usr/local/include
COPY --from=openssl_image /usr/local/lib /usr/local/lib

RUN ldconfig \
&& ln -s /etc/ssl/certs/* /usr/local/ssl/certs/

COPY --from=common_cpp_image /project/avalon/common/cpp/build /project/avalon/common/cpp/build
COPY VERSION /project/avalon/
COPY ./bin /project/avalon/bin
COPY ./common/cpp /project/avalon/common/cpp

ENV TCF_HOME=/project/avalon

Expand Down