Skip to content

Commit

Permalink
Feature/sifo580 Adding Podman to be used for registry access (#15)
Browse files Browse the repository at this point in the history
* update for podman

* test readme

* Update README.md

Co-authored-by: Andy Roth <roth.andy@gmail.com>

* update for comeents from review

* update for syntax error on dnf -command

* update for Dockerfile

* update for comments from MR

* switched to podman 2.2

* update to move podman section in dockerfile

* put container-selinux back in

* cleanup and add podman_spec

* clearing extra space.

Co-authored-by: Sony Francis <sony.p.francis@saic.com>
Co-authored-by: Andy Roth <roth.andy@gmail.com>
Co-authored-by: Brad Staton <47569500+saic-statonb@users.noreply.github.com>
  • Loading branch information
4 people authored Mar 4, 2021
1 parent a9f734c commit 9973e66
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
13 changes: 13 additions & 0 deletions spec/podman_spec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env shellspec

Describe "printVersion()"
printVersion() {
podman --version | grep "${PODMAN_VERSION}"
}

It "validates tool is installed by checking version"
When call printVersion
The output should include "${PODMAN_VERSION}"
The status should eq 0
End
End
12 changes: 11 additions & 1 deletion src/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ ENV DOCKER_VERION=${DOCKER_VERSION}
# base packages, so that we always get the latest version. These packages are very stable and
# shouldn't ever need version pinning
# Please keep the list alphabetized for maintainability
RUN dnf install -y \

RUN dnf install -y --refresh \
bind-utils \
bzip2 \
bzip2-devel \
Expand All @@ -37,6 +38,7 @@ RUN dnf install -y \
gettext \
git \
jq \
iptables \
libffi-devel \
libxslt-devel \
make \
Expand Down Expand Up @@ -126,6 +128,14 @@ RUN wget -O /usr/local/bin/docker-compose "https://github.com/docker/compose/rel
&& chmod +x /usr/local/bin/docker-compose \
&& rm -rf /var/tmp/* /tmp/* /var/tmp/.???* /tmp/.???*

# Install Podman. Get available versions by running the command `dnf list podman`
ARG PODMAN_VERSION="2.2.1"
ENV PODMAN_VERSION=${PODMAN_VERSION}
RUN dnf -y install podman-${PODMAN_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 9973e66

Please sign in to comment.