-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NAPSSPO-597 - add sops to tssc-base image
- Loading branch information
Showing
1 changed file
with
20 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
############################################## | ||
|
@@ -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" \ | ||
|
@@ -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 | ||
|
||
|