From e02b41e8f6957546e104a470d67c849d132aae4c Mon Sep 17 00:00:00 2001 From: Govind Kamat Date: Thu, 29 Aug 2024 22:00:51 -0700 Subject: [PATCH] Dockerfile change Signed-off-by: Govind Kamat --- .github/workflows/docker-build.yml | 2 +- docker/Dockerfile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index da87a35d..9d3ae2b7 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -34,6 +34,6 @@ jobs: docker buildx version tag=osb/osb-`echo ${{ matrix.platform }} | tr '/' '-'` set -x - docker buildx build --platform ${{ matrix.platform }} --build-arg VERSION=`cat version.txt` --build-arg BUILD_DATE=`date -u +%Y-%m-%dT%H:%M:%SZ` -f docker/Dockerfile -t "$tag" -o type=docker . + docker buildx build --platform ${{ matrix.platform }} --build-arg "$GITHUB_SHA" --build-arg VERSION=`cat version.txt` --build-arg BUILD_DATE=`date -u +%Y-%m-%dT%H:%M:%SZ` -f docker/Dockerfile -t "$tag" -o type=docker . set +x docker images | grep "$tag" diff --git a/docker/Dockerfile b/docker/Dockerfile index 77797a20..9080214a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -14,7 +14,8 @@ RUN apt-get -y update && \ RUN groupadd --gid 1000 opensearch-benchmark && \ useradd -d /opensearch-benchmark -m -k /dev/null -g 1000 -N -u 1000 -l -s /bin/bash benchmark -RUN set -e; git clone https://github.com/opensearch-project/opensearch-benchmark; cd opensearch-benchmark; make install; cd ..; rm -rf opensearch-benchmark +ARG SHA +RUN echo "================================================================================ $SHA"; git clone "$SHA" RUN mkdir -p /opensearch-benchmark/.benchmark && \ chown -R 1000:0 /opensearch-benchmark/.benchmark