FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge pull request #581 from Kaggle/identify-date-and-git · AI-For-Rural/docker-python@2ac2889 · GitHub

Repository navigation

Commit 2ac2889

Browse files
authored
Merge pull request Kaggle#581 from Kaggle/identify-date-and-git
Add LABELs and files in /etc/ to identify build
2 parents 51d3a60 + bad5e74 commit 2ac2889

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎Dockerfile‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ ARG BASE_TAG=2019.03
33
FROM gcr.io/kaggle-images/python-tensorflow-whl:1.14.0-py36 as tensorflow_whl
44
FROM continuumio/anaconda3:${BASE_TAG}
55

6+
ARG GIT_COMMIT=unknown
7+
ARG BUILD_DATE=unknown
8+
9+
LABEL git-commit=$GIT_COMMIT
10+
LABEL build-date=$BUILD_DATE
11+
12+
# Correlate current release with the git hash inside the kernel editor by running `!cat /etc/git_commit`.
13+
RUN echo "$GIT_COMMIT" > /etc/git_commit && echo "$BUILD_DATE" > /etc/build_date
14+
615
ADD clean-layer.sh /tmp/clean-layer.sh
716
ADD patches/nbconvert-extensions.tpl /opt/kaggle/nbconvert-extensions.tpl
817

‎build‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ while :; do
5252
shift
5353
done
5454

55+
BUILD_ARGS+=" --build-arg GIT_COMMIT=$(git rev-parse HEAD)"
56+
BUILD_ARGS+=" --build-arg BUILD_DATE=$(date '+%Y%m%d-%H%M%S')"
57+
5558
readonly CACHE_FLAG
5659
readonly DOCKERFILE
5760
readonly IMAGE_TAG

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL