From 31fd2d8ca3c247bea509f62ad68c5367516a970a Mon Sep 17 00:00:00 2001 From: "Hughes, Alexander (ah8742)" Date: Thu, 6 Jun 2019 17:46:34 +0000 Subject: [PATCH] Update dockerfiles to include ssh client It was discovered that some base images when used as an override to the specified default images do not include the openssh package. This is particularly problematic if a user wishes to use ssh access when specifying their repositories in the site's site-definition.yaml Without the openssh package the following error occurs: ERROR pegleg.engine.util.git:normalize_repo_path [nnn] The repo_path=ssh://user@domain:port/site-repo is not a valid Git repo Adding the openssh package does not impact the current base images as they already include it, but has the added benefit of ensuring that a non-default base image will still work with Pegleg. Change-Id: I154c3db5071a373ad16cb0a0c4c6103b6ea8ac4e --- images/pegleg/Dockerfile.opensuse_15 | 37 +++++++++++++------------- images/pegleg/Dockerfile.ubuntu_xenial | 2 ++ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/images/pegleg/Dockerfile.opensuse_15 b/images/pegleg/Dockerfile.opensuse_15 index 7564f86d..477d87c5 100644 --- a/images/pegleg/Dockerfile.opensuse_15 +++ b/images/pegleg/Dockerfile.opensuse_15 @@ -12,26 +12,27 @@ LABEL org.opencontainers.image.licenses='Apache-2.0' ENV LANG=C.UTF-8 ENV LC_ALL=C.UTF-8 -RUN set -x && \ - zypper up -y && \ - zypper --non-interactive install \ - git-core \ - which \ - gcc \ - curl \ - python3-devel \ - python3-setuptools \ - python3-dbm \ - python3-pip && \ - pip install --upgrade pip && \ - zypper clean -a && \ - rm -rf \ +RUN set -x \ + && zypper up -y \ + && zypper --non-interactive install \ + curl \ + gcc \ + git-core \ + openssh \ + python3-dbm \ + python3-devel \ + python3-pip \ + python3-setuptools \ + which \ + && python3 -m pip install -U pip \ + && zypper clean -a \ + && rm -rf \ /tmp/* \ - /var/tmp/* \ - /var/log/* \ - /usr/share/man \ /usr/share/doc \ - /usr/share/doc-base + /usr/share/doc-base \ + /usr/share/man \ + /var/log/* \ + /var/tmp/* VOLUME /var/pegleg WORKDIR /var/pegleg diff --git a/images/pegleg/Dockerfile.ubuntu_xenial b/images/pegleg/Dockerfile.ubuntu_xenial index 7873c240..f90ab13c 100644 --- a/images/pegleg/Dockerfile.ubuntu_xenial +++ b/images/pegleg/Dockerfile.ubuntu_xenial @@ -21,6 +21,7 @@ RUN set -ex \ git \ libssl-dev \ netbase \ + openssh-client \ python3-dev \ python3-pip \ python3-setuptools \ @@ -33,6 +34,7 @@ RUN set -ex \ /usr/share/doc-base \ /usr/share/man \ /var/lib/apt/lists/* \ + /var/log/* \ /var/tmp/* VOLUME /var/pegleg