mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 00:08:11 +00:00
Ensure that git commit is set in docker build
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
4a19bf16a8
commit
25710468dc
@ -41,6 +41,8 @@ RUN mkdir -p $DIST_DIR /dist
|
|||||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
ARG GIT_COMMIT
|
||||||
|
ENV GIT_COMMIT ${GIT_COMMIT}
|
||||||
RUN make PREFIX=${DIST_DIR} cmds
|
RUN make PREFIX=${DIST_DIR} cmds
|
||||||
|
|
||||||
ARG CONFIG_TOML_SUFFIX
|
ARG CONFIG_TOML_SUFFIX
|
||||||
|
@ -41,6 +41,8 @@ RUN mkdir -p $DIST_DIR /dist
|
|||||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
ARG GIT_COMMIT
|
||||||
|
ENV GIT_COMMIT ${GIT_COMMIT}
|
||||||
RUN make PREFIX=${DIST_DIR} cmds
|
RUN make PREFIX=${DIST_DIR} cmds
|
||||||
|
|
||||||
ARG CONFIG_TOML_SUFFIX
|
ARG CONFIG_TOML_SUFFIX
|
||||||
|
@ -48,6 +48,8 @@ RUN mkdir -p $DIST_DIR /dist
|
|||||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
ARG GIT_COMMIT
|
||||||
|
ENV GIT_COMMIT ${GIT_COMMIT}
|
||||||
RUN make PREFIX=${DIST_DIR} cmds
|
RUN make PREFIX=${DIST_DIR} cmds
|
||||||
|
|
||||||
ARG CONFIG_TOML_SUFFIX
|
ARG CONFIG_TOML_SUFFIX
|
||||||
|
@ -39,6 +39,8 @@ RUN mkdir -p $DIST_DIR /dist
|
|||||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
ARG GIT_COMMIT
|
||||||
|
ENV GIT_COMMIT ${GIT_COMMIT}
|
||||||
RUN make PREFIX=${DIST_DIR} cmds
|
RUN make PREFIX=${DIST_DIR} cmds
|
||||||
|
|
||||||
# Hook for Project Atomic's fork of Docker: https://github.com/projectatomic/docker/tree/docker-1.13.1-rhel#add-dockerhooks-exec-custom-hooks-for-prestartpoststop-containerspatch
|
# Hook for Project Atomic's fork of Docker: https://github.com/projectatomic/docker/tree/docker-1.13.1-rhel#add-dockerhooks-exec-custom-hooks-for-prestartpoststop-containerspatch
|
||||||
|
@ -46,6 +46,8 @@ RUN mkdir -p $DIST_DIR /dist
|
|||||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
ARG GIT_COMMIT
|
||||||
|
ENV GIT_COMMIT ${GIT_COMMIT}
|
||||||
RUN make PREFIX=${DIST_DIR} cmds
|
RUN make PREFIX=${DIST_DIR} cmds
|
||||||
|
|
||||||
ARG CONFIG_TOML_SUFFIX
|
ARG CONFIG_TOML_SUFFIX
|
||||||
|
@ -131,6 +131,7 @@ docker-build-%:
|
|||||||
--build-arg PKG_VERS="$(LIB_VERSION)" \
|
--build-arg PKG_VERS="$(LIB_VERSION)" \
|
||||||
--build-arg PKG_REV="$(PKG_REV)" \
|
--build-arg PKG_REV="$(PKG_REV)" \
|
||||||
--build-arg CONFIG_TOML_SUFFIX="$(CONFIG_TOML_SUFFIX)" \
|
--build-arg CONFIG_TOML_SUFFIX="$(CONFIG_TOML_SUFFIX)" \
|
||||||
|
--build-arg GIT_COMMIT="$(GIT_COMMIT)" \
|
||||||
--tag $(BUILDIMAGE) \
|
--tag $(BUILDIMAGE) \
|
||||||
--file $(DOCKERFILE) .
|
--file $(DOCKERFILE) .
|
||||||
$(DOCKER) run \
|
$(DOCKER) run \
|
||||||
|
Loading…
Reference in New Issue
Block a user