Skip to content

Commit

Permalink
NAPSSPO-597 - add sops to tssc-base image
Browse files Browse the repository at this point in the history
  • Loading branch information
itewk committed Sep 16, 2020
1 parent f70ce4d commit f98fe2d
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions tssc-base/Dockerfile.ubi8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG BASE_IMAGE=registry.access.redhat.com/ubi8:latest

##############################################
# Stage 1 : Retrieive oc cli
##############################################
Expand All @@ -12,6 +13,10 @@ MAINTAINER Red Hat TSSC <[email protected]>
COPY --from=origin-cli /usr/bin/oc /usr/bin/oc
COPY --from=origin-cli /usr/bin/kubectl /usr/bin/kubectl

# arguments
# NOTE: arguments used in sub stage have to be in that stage (at least when building with docker, buildah doesn't seem to have a problem either way)
ARG SOPS_RPM="https://github.com/mozilla/sops/releases/download/v3.6.1/sops-3.6.1-1.x86_64.rpm"

# Labels consumed by Red Hat build service
LABEL com.redhat.component="tssc-base" \
name="tssc/tssc-base" \
Expand All @@ -26,17 +31,24 @@ ENV HOME=/home/tssc \
LC_ALL=en_US.UTF-8

USER root
# Install Python 3.6

# Install JQ
RUN curl -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -o /usr/bin/jq && \
chmod +x /usr/bin/jq && \
INSTALL_PKGS="gettext git rsync tar unzip which zip bzip2 python36 python3-pip python3-pip-wheel python3-setuptools python36-devel" && \
chmod +x /usr/bin/jq

# Install packages
RUN INSTALL_PKGS="gettext git rsync tar unzip which zip bzip2 python36 python3-pip python3-pip-wheel python3-setuptools python36-devel ${SOPS_RPM}" && \
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
alternatives --set python /usr/bin/python3 && \
python -m pip install --upgrade pip && \
dnf update -y && \
rpm -V $INSTALL_PKGS && \
dnf clean all && \
mkdir -p /home/tssc && \
rpm -V $INSTALL_PKGS && \
dnf clean all

# Configure Python
RUN alternatives --set python /usr/bin/python3 && \
python -m pip install --upgrade pip

# Configure home
RUN mkdir -p /home/tssc && \
chown -R 1001:0 /home/tssc && \
chmod -R g+w /home/tssc

Expand Down

0 comments on commit f98fe2d

Please sign in to comment.