# CCF Continuous Integration image for SNP # Contains CCF build dependencies and toolchain for target platform # Also contains CCF source and build directory # Latest image as of this change ARG base=ghcr.io/microsoft/ccf/ci/default:build-25-07-2024 FROM ${base} # SSH. Note that this could (should) be done in the base ccf_ci image instead # if we wanted to build this image faster RUN apt update \ && apt install -y openssh-server \ && sed -i "s/.*PubkeyAuthentication.*/PubkeyAuthentication yes/g" /etc/ssh/sshd_config \ && sed -i "s/.*PasswordAuthentication.*/PasswordAuthentication no/g" /etc/ssh/sshd_config \ && mkdir -p /run/sshd # To avoid "Missing privilege separation directory: /run/sshd" error # CI Agent user ARG user="agent" RUN useradd -m $user \ && echo "$user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \ && mkdir /home/$user/.ssh \ && chown -R $user:$user /home/$user/.ssh # Copy CCF source and build RUN mkdir /CCF COPY . /CCF/ RUN mkdir /CCF/build \ && cd /CCF/build \ && cmake -GNinja -DCOMPILE_TARGET=snp .. \ && ninja \ && chmod -R 777 /CCF CMD ["/usr/sbin/sshd", "-D"]