File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 5
5
# All this must go at top of file I'm afraid.
6
6
IMAGE_PREFIX := quay.io/weaveworks
7
7
IMAGE_TAG := $(shell ./tools/image-tag)
8
+ GIT_REVISION := $(shell git rev-parse HEAD)
8
9
UPTODATE := .uptodate
9
10
10
11
# Building Docker images is now automated. The convention is every directory
11
12
# with a Dockerfile in it builds an image calls quay.io/weaveworks/<dirname>.
12
13
# Dependencies (i.e. things that go in the image) still need to be explicitly
13
14
# declared.
14
15
% /$(UPTODATE ) : % /Dockerfile
15
- $(SUDO ) docker build -t $(IMAGE_PREFIX ) /$(shell basename $(@D ) ) $(@D ) /
16
+ $(SUDO ) docker build --build-arg=revision= $( GIT_REVISION ) - t $(IMAGE_PREFIX ) /$(shell basename $(@D ) ) $(@D ) /
16
17
$(SUDO ) docker tag $(IMAGE_PREFIX ) /$(shell basename $(@D ) ) $(IMAGE_PREFIX ) /$(shell basename $(@D ) ) :$(IMAGE_TAG )
17
18
touch $@
18
19
Original file line number Diff line number Diff line change 1
1
FROM alpine:3.6
2
- LABEL works.weave.role=system
3
2
RUN apk add --no-cache --upgrade python3
4
3
RUN python3 -m ensurepip && pip3 install --upgrade pip
5
4
COPY requirements.txt /
6
5
RUN pip3 install -r requirements.txt
7
6
COPY gfdatasource /
8
7
ENTRYPOINT ["/gfdatasource" ]
8
+
9
+ ARG revision
10
+ LABEL works.weave.role="system" \
11
+ maintainer=
"Weaveworks <[email protected] >" \
12
+ org.opencontainers.image.title="grafanalib" \
13
+ org.opencontainers.image.source="https://github.com/weaveworks/grafanalib" \
14
+ org.opencontainers.image.revision="${revision}" \
15
+ org.opencontainers.image.vendor="Weaveworks"
You can’t perform that action at this time.
0 commit comments