2020-05-15 12:36:00 +03:00
|
|
|
# Application Runtime image
|
2022-10-26 16:57:54 +03:00
|
|
|
# Contains the cchost binary and its runtime dependencies for target platform
|
2020-05-15 12:36:00 +03:00
|
|
|
|
2022-10-26 16:57:54 +03:00
|
|
|
ARG platform=sgx
|
2020-05-15 12:36:00 +03:00
|
|
|
|
2022-10-26 16:57:54 +03:00
|
|
|
# SGX
|
2023-06-07 00:45:51 +03:00
|
|
|
FROM mcr.microsoft.com/mirror/docker/library/ubuntu:20.04 AS base-sgx
|
2020-06-25 16:46:31 +03:00
|
|
|
|
2022-10-26 16:57:54 +03:00
|
|
|
WORKDIR /
|
|
|
|
COPY ./docker/sgx_deps_pin.sh /
|
|
|
|
RUN ./sgx_deps_pin.sh && rm ./sgx_deps_pin.sh
|
|
|
|
|
|
|
|
# SNP
|
2023-06-07 00:45:51 +03:00
|
|
|
FROM mcr.microsoft.com/mirror/docker/library/ubuntu:20.04 AS base-snp
|
2020-05-15 12:36:00 +03:00
|
|
|
|
2022-10-26 16:57:54 +03:00
|
|
|
# Virtual
|
2023-06-07 00:45:51 +03:00
|
|
|
FROM mcr.microsoft.com/mirror/docker/library/ubuntu:20.04 AS base-virtual
|
2020-05-15 12:36:00 +03:00
|
|
|
|
2022-10-26 16:57:54 +03:00
|
|
|
# Final runtime image
|
|
|
|
FROM base-${platform} AS final
|
2021-07-13 23:00:18 +03:00
|
|
|
|
2022-10-26 16:57:54 +03:00
|
|
|
ARG platform=sgx
|
|
|
|
ARG ansible_vars
|
2023-04-19 17:42:34 +03:00
|
|
|
ARG clang_version=11
|
2021-07-13 23:00:18 +03:00
|
|
|
|
2022-10-26 16:57:54 +03:00
|
|
|
RUN echo "APT::Acquire::Retries \"5\";" | tee /etc/apt/apt.conf.d/80-retries
|
2021-07-13 23:00:18 +03:00
|
|
|
|
2022-10-26 16:57:54 +03:00
|
|
|
COPY getting_started/setup_vm/ /tmp/setup_vm/
|
2020-05-15 12:36:00 +03:00
|
|
|
RUN apt update \
|
2021-08-05 19:06:54 +03:00
|
|
|
&& apt install -y ansible software-properties-common curl bsdmainutils dnsutils \
|
2022-10-26 16:57:54 +03:00
|
|
|
&& cd /tmp/setup_vm \
|
2023-03-23 14:10:14 +03:00
|
|
|
&& ansible-playbook app-run.yml --extra-vars "$ansible_vars" --extra-vars "platform=${platform}" --extra-vars "clang_version=${clang_version}"\
|
2020-05-15 12:36:00 +03:00
|
|
|
&& rm -rf /tmp/* \
|
2021-08-05 19:06:54 +03:00
|
|
|
&& apt remove -y ansible software-properties-common curl \
|
2020-05-15 12:36:00 +03:00
|
|
|
&& apt -y autoremove \
|
|
|
|
&& apt -y clean
|