Skip to content

Commit

Permalink
update for skopeo util (#20)
Browse files Browse the repository at this point in the history
* update for skopeo

* update for automated test.

* skopeo_spec typo

* permissions error.

* modify exit code

* update for dockerfile format

Co-authored-by: Sony Francis <sony.p.francis@saic.com>
  • Loading branch information
spfrancis and Sony Francis authored Mar 11, 2021
1 parent 9973e66 commit b3856a2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/skopeo_spec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env shellspec

Describe "printVersion()"
printVersion() {
skopeo -v | grep "${SKOPEO_VERSION}"
}

It "validates tool is installed by checking version"
When call printVersion
The output should include "${SKOPEO_VERSION}"
The status should eq 0
End
End
8 changes: 8 additions & 0 deletions src/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ RUN dnf -y install podman-${PODMAN_VERSION} \
&& rm -rf /var/cache/yum/ \
&& rm -rf /var/tmp/* /tmp/* /var/tmp/.???* /tmp/.???*

# Install Skopeo. Get available versions by running the command `dnf list skopeo`
ARG SKOPEO_VERSION="1.2.0"
ENV SKOPEO_VERSION=${SKOPEO_VERSION}
RUN dnf -y install skopeo-${SKOPEO_VERSION} \
&& dnf clean all \
&& rm -rf /var/cache/yum/ \
&& rm -rf /var/tmp/* /tmp/* /var/tmp/.???* /tmp/.???*

RUN useradd -ms /bin/bash anvil

USER anvil
Expand Down

0 comments on commit b3856a2

Please sign in to comment.