Skip to content

Commit

Permalink
issue #78 - lock rekor cli to versiont that works with psr v0.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
itewk committed Jul 22, 2021
1 parent 5d262fe commit 0d845a9
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions ploigos-tool-autogov/Containerfile.ubi8
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
ARG BASE_IMAGE=quay.io/ploigos/ploigos-base:latest.ubi8
ARG REKOR_VERSION=e63fe717c810657c270edfb964aef10969e7f210
ARG OPA_VERSION=v0.29.4

FROM $BASE_IMAGE
ARG PLOIGOS_USER_UID
ARG REKOR_VERSION
ARG OPA_VERSION

# labels
ENV DESCRIPTION="Ploigos tool container with Rekor and Open Policy Agent."
Expand Down Expand Up @@ -34,18 +38,21 @@ RUN INSTALL_PKGS="golang" && \
rm -rf /var/cache /var/log/dnf* /var/log/yum.*

# Install rekor
# NOTE: better way to install, except as of 7/21/21 only v0.2.0 is released and it doesnt work with PSR
#RUN curl -L https://github.com/sigstore/rekor/releases/download/${REKOR_VERSION}/rekor-cli -o /usr/bin/rekor && \
# chmod +x /usr/bin/rekor
RUN git clone https://github.com/sigstore/rekor.git && \
cd rekor && \
git checkout ${REKOR_VERSION} && \
go build ./cmd/rekor-cli && \
mv rekor-cli /usr/local/bin/rekor && \
chmod 775 /usr/bin && \
chmod 777 /usr/local/bin/rekor && \
chown 1001:0 /usr/local/bin/rekor

#Install opa
RUN curl -L -o opa https://openpolicyagent.org/downloads/v0.29.4/opa_linux_amd64 && \
chmod 775 ./opa && \
mv opa /usr/bin/
RUN curl -L https://openpolicyagent.org/downloads/${OPA_VERSION}/opa_linux_amd64 -o /usr/bin/opa && \
chmod +x /usr/bin/opa

# may not actually be able to run as this user at runtime
# but platforms like OpenShift will still respect users home directory
Expand Down

0 comments on commit 0d845a9

Please sign in to comment.