Skip to content

Commit

Permalink
use based centos docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
david sewell committed Mar 30, 2021
1 parent 925feee commit b8bd9a8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
# Setup build arguments with default versions
ARG CENTOS_VERSION=latest
ARG CENTOS_VERSION=7
ARG GIT_VERSION=2.30.1-1.ep7
ARG RHEL_ENDPOINT_VERSION=1.9-1
ARG GCC_VERSION=4.8.5-44.el7
ARG GLIBC_VERSION=2.17-323.el7_9

# Download Terraform binary
FROM centos/devtoolset-7-toolchain-centos7:${CENTOS_VERSION} as base
#FROM centos/devtoolset-7-toolchain-centos7:${CENTOS_VERSION} as base
FROM centos:${CENTOS_VERSION} as base
ARG GIT_VERSION
ARG RHEL_ENDPOINT_VERSION
ARG GCC_VERSION
ARG GLIBC_VERSION
USER 0
RUN yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-${RHEL_ENDPOINT_VERSION}.x86_64.rpm \
&& yum -y install git-${GIT_VERSION} \
&& yum -y install libgcc-${GCC_VERSION} \
RUN yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-${RHEL_ENDPOINT_VERSION}.x86_64.rpm
RUN yum -y install git-${GIT_VERSION}
RUN yum -y group install "Development Tools"
RUN yum -y install libgcc-${GCC_VERSION} \
libgcc-c++-${GCC_VERSION} \
glibc-devel-${GLIBC_VERSION} \
libstdc++-devel-${GCC_VERSION} \
Expand Down
4 changes: 2 additions & 2 deletions tests/container-structure-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ commandTests:
- name: "Check GCC version"
command: "gcc"
args: ["--version"]
expectedOutput: ["Red Hat 7.3.1-5"]
expectedOutput: ["Red Hat 4.8.5-44"]

- name: "Check G++ version"
command: "g++"
args: ["--version"]
expectedOutput: ["Red Hat 7.3.1-5"]
expectedOutput: ["Red Hat 4.8.5-44"]

fileExistenceTests:
- name: 'Check nonroot user home'
Expand Down

0 comments on commit b8bd9a8

Please sign in to comment.