Fix build environment detection

Signed-off-by: Balasankar "Balu" C <balasankar@gitlab.com>
This commit is contained in:
Balasankar "Balu" C 2022-07-05 12:01:56 +05:30
parent ca196275d2
commit 690bb34f74
No known key found for this signature in database
GPG key ID: B77D2E2E23735427
3 changed files with 32 additions and 11 deletions

View file

@ -6,14 +6,12 @@
ARG CUSTOM_BASE_IMAGE
FROM ${CUSTOM_BASE_IMAGE}
# We are setting this ARG again because it is required in install-essentials
# script. ARG defined before FROM can't be used afterwards.
# Check https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
ARG CUSTOM_BASE_IMAGE
ARG BUILD_OS
ARG BUILD_ARCH
ADD / /
RUN /scripts/install-essentials ${CUSTOM_BASE_IMAGE}
RUN /scripts/install-essentials ${BUILD_OS}
ENV PATH $PATH:/usr/local/go/bin
@ -123,5 +121,4 @@ ENV RUBY_VERSION=${RUBY_VERSION} \
DOCKER_VERSION=${DOCKER_VERSION} \
BAZELISK_VERSION=${BAZELISK_VERSION} \
GCLOUD_VERSION=${GCLOUD_VERSION} \
KUBECTL_VERSION=${KUBECTL_VERSION} \
CUSTOM_BASE_IMAGE=${CUSTOM_BASE_IMAGE}
KUBECTL_VERSION=${KUBECTL_VERSION}