From 9829d4d1e151d476d0d0172904154becc912846f Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 25 Mar 2022 13:24:52 -0600 Subject: [PATCH] Dockerfile: Write SSH key stubs later in build We'd rather duplicate this layer than the package-install layer if a user is going to use both containerized testnodes and "real" ones. Signed-off-by: Zack Cerza --- docs/docker-compose/Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docker-compose/Dockerfile b/docs/docker-compose/Dockerfile index adcf82461..11d6deeb6 100644 --- a/docs/docker-compose/Dockerfile +++ b/docs/docker-compose/Dockerfile @@ -1,12 +1,6 @@ FROM ubuntu:latest ARG SSH_PRIVKEY_FILE=id_ed25519 ENV DEBIAN_FRONTEND=noninteractive -RUN \ - mkdir $HOME/.ssh && \ - touch $HOME/.ssh/${SSH_PRIVKEY_FILE} && \ - chmod 600 $HOME/.ssh/${SSH_PRIVKEY_FILE} && \ - echo "StrictHostKeyChecking=no" > $HOME/.ssh/config && \ - echo "UserKnownHostsFile=/dev/null" >> $HOME/.ssh/config RUN apt-get update && \ apt-get install -y \ git \ @@ -31,6 +25,12 @@ RUN \ mkdir log && \ chmod +x /teuthology/bootstrap && \ ./bootstrap +RUN \ + mkdir $HOME/.ssh && \ + touch $HOME/.ssh/${SSH_PRIVKEY_FILE} && \ + chmod 600 $HOME/.ssh/${SSH_PRIVKEY_FILE} && \ + echo "StrictHostKeyChecking=no" > $HOME/.ssh/config && \ + echo "UserKnownHostsFile=/dev/null" >> $HOME/.ssh/config COPY teuthology.sh / RUN mkdir -p /etc/ansible COPY ansible_inventory/hosts ansible_inventory/secrets /etc/ansible/ -- 2.47.3