Update Spyglass to run as “airship” user in container

Spyglass previously ran as root in container

Change-Id: I341679fcb6173ca667f009dfc100237f32275ef2
This commit is contained in:
Ryan Schroder 2019-12-09 15:12:45 -06:00
parent ddd6bca645
commit f53c51edc1
3 changed files with 9 additions and 0 deletions

View File

@ -28,6 +28,7 @@ RUN set -x \
&& zypper --non-interactive install python3-six-1.12.0-lp151.80.1.noarch && zypper --non-interactive install python3-six-1.12.0-lp151.80.1.noarch
RUN pip3 install -U pip \ RUN pip3 install -U pip \
&& zypper clean -a \ && zypper clean -a \
&& useradd -u 1000 -g users -d /opt/spyglass airship \
&& rm -rf \ && rm -rf \
/tmp/* \ /tmp/* \
/usr/share/doc \ /usr/share/doc \
@ -45,3 +46,5 @@ RUN pip3 install pipenv && pipenv install --system --deploy --ignore-pipfile
COPY . /opt/spyglass COPY . /opt/spyglass
RUN pip3 install -e /opt/spyglass RUN pip3 install -e /opt/spyglass
USER airship

View File

@ -26,6 +26,7 @@ RUN set -ex \
&& python3 -m pip install -U pip \ && python3 -m pip install -U pip \
&& apt-get autoremove -yqq --purge \ && apt-get autoremove -yqq --purge \
&& apt-get clean \ && apt-get clean \
&& useradd -u 1000 -g users -d /opt/spyglass airship \
&& rm -rf \ && rm -rf \
/tmp/* \ /tmp/* \
/usr/share/doc \ /usr/share/doc \
@ -43,3 +44,5 @@ RUN pip3 install pipenv && pipenv install --system --deploy --ignore-pipfile
COPY . /opt/spyglass COPY . /opt/spyglass
RUN pip3 install -e /opt/spyglass RUN pip3 install -e /opt/spyglass
USER airship

View File

@ -26,6 +26,7 @@ RUN set -ex \
&& python3 -m pip install -U pip \ && python3 -m pip install -U pip \
&& apt-get autoremove -yqq --purge \ && apt-get autoremove -yqq --purge \
&& apt-get clean \ && apt-get clean \
&& useradd -u 1000 -g users -d /opt/spyglass airship \
&& rm -rf \ && rm -rf \
/tmp/* \ /tmp/* \
/usr/share/doc \ /usr/share/doc \
@ -44,3 +45,5 @@ RUN pip3 install pipenv \
COPY . /opt/spyglass COPY . /opt/spyglass
RUN pip3 install -e /opt/spyglass RUN pip3 install -e /opt/spyglass
USER airship