Skip to content

Commit

Permalink
ploigos-base - add yq
Browse files Browse the repository at this point in the history
  • Loading branch information
itewk committed Dec 17, 2020
1 parent 6f23853 commit f245989
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,16 @@ jobs:

- name: Test Image 🧪
run: |
echo "Running: docker run ${{ env.IMAGE_TAG_LOCAL }} python3 --version"
echo "Test python3 installed"
docker run ${{ env.IMAGE_TAG_LOCAL }} python3 --version
echo "Running: docker run ${{ env.IMAGE_TAG_LOCAL }} pip3 --version"
echo "Test pip3 installed"
docker run ${{ env.IMAGE_TAG_LOCAL }} pip3 --version
echo "Running: docker run ${{ env.IMAGE_TAG_LOCAL }} oc version"
echo "Test oc installed
docker run ${{ env.IMAGE_TAG_LOCAL }} oc version
echo "Running: docker run ${{ env.IMAGE_TAG_LOCAL }} git version"
echo "Test git installed
docker run ${{ env.IMAGE_TAG_LOCAL }} git version
echo "Test yq installed"
docker run ${{ env.IMAGE_TAG_LOCAL }} yq --version
- name: Login to External Registry 🔑
uses: docker/login-action@v1
Expand Down
7 changes: 7 additions & 0 deletions ploigos-base/Containerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ARG PLOIGOS_USER_GID=0
ARG PLOIGOS_HOME_DIR=/home/ploigos
ARG PLOIGOS_SOURCE=tssc==0.14.0
ARG OPENSHIFT_CLI_VERSION=4.6
ARG YQ_VERSION=3.4.1

##############################################
# Stage 1 : Retrieive oc cli
Expand All @@ -20,6 +21,7 @@ ARG PLOIGOS_USER_UID
ARG PLOIGOS_USER_GID
ARG PLOIGOS_HOME_DIR
ARG PLOIGOS_SOURCE
ARG YQ_VERSION
COPY --from=origin-cli /usr/bin/oc /usr/bin/oc
COPY --from=origin-cli /usr/bin/kubectl /usr/bin/kubectl

Expand All @@ -46,13 +48,18 @@ USER root
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 YQ
RUN curl -L https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 -o /usr/bin/yq &&\
chmod +x /usr/bin/yq

# 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} gnupg2" && \
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
dnf update -y && \
rpm -V $INSTALL_PKGS && \
dnf clean all


# Configure Python
RUN alternatives --set python /usr/bin/python3 && \
python -m pip install --no-cache-dir --upgrade pip
Expand Down

0 comments on commit f245989

Please sign in to comment.