From f53c51edc1c4141658fc084983ffd6973797fb59 Mon Sep 17 00:00:00 2001 From: Ryan Schroder Date: Mon, 9 Dec 2019 15:12:45 -0600 Subject: [PATCH] =?UTF-8?q?Update=20Spyglass=20to=20run=20as=20=E2=80=9Cai?= =?UTF-8?q?rship=E2=80=9D=20user=20in=20container?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Spyglass previously ran as root in container Change-Id: I341679fcb6173ca667f009dfc100237f32275ef2 --- images/spyglass/Dockerfile.opensuse_15 | 3 +++ images/spyglass/Dockerfile.ubuntu_bionic | 3 +++ images/spyglass/Dockerfile.ubuntu_xenial | 3 +++ 3 files changed, 9 insertions(+) diff --git a/images/spyglass/Dockerfile.opensuse_15 b/images/spyglass/Dockerfile.opensuse_15 index 79f7ba3..dc2df03 100644 --- a/images/spyglass/Dockerfile.opensuse_15 +++ b/images/spyglass/Dockerfile.opensuse_15 @@ -28,6 +28,7 @@ RUN set -x \ && zypper --non-interactive install python3-six-1.12.0-lp151.80.1.noarch RUN pip3 install -U pip \ && zypper clean -a \ + && useradd -u 1000 -g users -d /opt/spyglass airship \ && rm -rf \ /tmp/* \ /usr/share/doc \ @@ -45,3 +46,5 @@ RUN pip3 install pipenv && pipenv install --system --deploy --ignore-pipfile COPY . /opt/spyglass RUN pip3 install -e /opt/spyglass + +USER airship diff --git a/images/spyglass/Dockerfile.ubuntu_bionic b/images/spyglass/Dockerfile.ubuntu_bionic index cf9e617..62853bb 100644 --- a/images/spyglass/Dockerfile.ubuntu_bionic +++ b/images/spyglass/Dockerfile.ubuntu_bionic @@ -26,6 +26,7 @@ RUN set -ex \ && python3 -m pip install -U pip \ && apt-get autoremove -yqq --purge \ && apt-get clean \ + && useradd -u 1000 -g users -d /opt/spyglass airship \ && rm -rf \ /tmp/* \ /usr/share/doc \ @@ -43,3 +44,5 @@ RUN pip3 install pipenv && pipenv install --system --deploy --ignore-pipfile COPY . /opt/spyglass RUN pip3 install -e /opt/spyglass + +USER airship diff --git a/images/spyglass/Dockerfile.ubuntu_xenial b/images/spyglass/Dockerfile.ubuntu_xenial index f0c306c..2b2a9f3 100644 --- a/images/spyglass/Dockerfile.ubuntu_xenial +++ b/images/spyglass/Dockerfile.ubuntu_xenial @@ -26,6 +26,7 @@ RUN set -ex \ && python3 -m pip install -U pip \ && apt-get autoremove -yqq --purge \ && apt-get clean \ + && useradd -u 1000 -g users -d /opt/spyglass airship \ && rm -rf \ /tmp/* \ /usr/share/doc \ @@ -44,3 +45,5 @@ RUN pip3 install pipenv \ COPY . /opt/spyglass RUN pip3 install -e /opt/spyglass + +USER airship