diff options
author | Tim Smith <tsmith@chef.io> | 2021-07-29 12:36:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-29 12:36:36 -0700 |
commit | f8a5028ce9d7c07ef8964d95d262f94be818367a (patch) | |
tree | abc10cebf025f7f974d64733d1bb78e7b60e8882 | |
parent | bdc427e43dc837de75b25eda62a4ed7fa5a7517a (diff) | |
parent | 1e43611779dbfa0b3d5666d34eafb3bd42a54307 (diff) | |
download | chef-f8a5028ce9d7c07ef8964d95d262f94be818367a.tar.gz |
Merge pull request #11883 from chef/nkierpiec/update-dockerfile-correct-arch
update dockerfile to use correct package for os/arch
-rwxr-xr-x | .expeditor/build-docker-images.sh | 11 | ||||
-rw-r--r-- | Dockerfile | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/.expeditor/build-docker-images.sh b/.expeditor/build-docker-images.sh index 72f3d4fc5b..2580284997 100755 --- a/.expeditor/build-docker-images.sh +++ b/.expeditor/build-docker-images.sh @@ -2,6 +2,15 @@ set -eu -o pipefail arch=$1 + +if [[ $arch == "arm64" ]]; then + dockerfile_pkg_version="7" + dockerfile_arch="aarch64" +else + dockerfile_pkg_version="6" + dockerfile_arch="x86_64" +fi + channel="${EXPEDITOR_CHANNEL:-unstable}" version="${EXPEDITOR_VERSION:?You must manually set the EXPEDITOR_VERSION environment variable to an existing semantic version.}" @@ -9,6 +18,8 @@ echo "--- Building chef/chef:${version} docker image for ${arch}" docker build \ --build-arg "CHANNEL=${channel}" \ --build-arg "VERSION=${version}" \ + --build-arg "ARCH=${dockerfile_arch}" \ + --build-arg "PKG_VERSION=${dockerfile_pkg_version}" \ -t "chef/chef:${version}-${arch}" . echo "--- Pushing chef/chef:${version} docker image for ${arch} to dockerhub" diff --git a/Dockerfile b/Dockerfile index 372ecfcd4e..f6b6b28b21 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,8 +19,10 @@ LABEL maintainer="Chef Software, Inc. <docker@chef.io>" ARG CHANNEL=stable ARG VERSION=17.3.48 +ARG ARCH=x86_64 +ARG PKG_VERSION=6 -RUN wget "http://packages.chef.io/files/${CHANNEL}/chef/${VERSION}/el/6/chef-${VERSION}-1.el6.x86_64.rpm" -O /tmp/chef-client.rpm && \ +RUN wget "http://packages.chef.io/files/${CHANNEL}/chef/${VERSION}/el/${PKG_VERSION}/chef-${VERSION}-1.el${PKG_VERSION}.${ARCH}.rpm" -O /tmp/chef-client.rpm && \ rpm2cpio /tmp/chef-client.rpm | cpio -idmv && \ rm -rf /tmp/chef-client.rpm |