Skip to content

Commit d06f986

Browse files
committed
images: tag with intel prefix
In preparations to get some of the images to hub.docker.com/intel, start using intel/ prefix. Moreover, set the Makefile variables so that the images built by make [images|demos] can easily be pushed to any registry/org by 'docker push' (e.g., by Jenkins). Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
1 parent 9d585ea commit d06f986

File tree

9 files changed

+28
-22
lines changed

9 files changed

+28
-22
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,22 @@ build: $(cmds)
4141
clean:
4242
@for cmd in $(cmds) ; do pwd=$(shell pwd) ; cd cmd/$$cmd ; $(GO) clean ; cd $$pwd ; done
4343

44-
TAG?=$(shell git rev-parse HEAD)
44+
ORG?=intel
45+
REG?=$(ORG)/
46+
TAG?=devel
47+
export TAG
4548

4649
images = $(shell ls build/docker/*.Dockerfile | sed 's/.*\/\(.\+\)\.Dockerfile/\1/')
4750

4851
$(images):
49-
@build/docker/build-image.sh $@ $(BUILDER)
52+
@build/docker/build-image.sh $(REG)$@ $(BUILDER)
5053

5154
images: $(images)
5255

5356
demos = $(shell cd demo/ && ls -d */ | sed 's/\(.\+\)\//\1/g')
5457

5558
$(demos):
56-
@cd demo/ && ./build-image.sh $@ $(BUILDER)
59+
@cd demo/ && ./build-image.sh $(REG)$@ $(BUILDER)
5760

5861
demos: $(demos)
5962

build/docker/build-image.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
IMG=$1
44
BUILDER=$2
55

6-
DOCKERFILE="$(dirname $0)/${IMG}.Dockerfile"
6+
DOCKERFILE="$(dirname $0)/$(basename ${IMG}).Dockerfile"
77

88
if [ -z "$IMG" ]; then
99
(>&2 echo "Usage: $0 <Dockerfile>")
@@ -15,14 +15,15 @@ if [ ! -e "${DOCKERFILE}" ]; then
1515
exit 1
1616
fi
1717

18-
TAG=$(git rev-parse HEAD)
18+
TAG=${TAG:-devel}
19+
SRCREV=$(git rev-parse HEAD)
1920

2021
if [ -z "${BUILDER}" -o "${BUILDER}" = 'docker' ] ; then
2122
docker build --pull -t ${IMG}:${TAG} -f ${DOCKERFILE} .
22-
docker tag ${IMG}:${TAG} ${IMG}:devel
23+
docker tag ${IMG}:${TAG} ${IMG}:${SRCREV}
2324
elif [ "${BUILDER}" = 'buildah' ] ; then
2425
buildah bud --pull-always -t ${IMG}:${TAG} -f ${DOCKERFILE} .
25-
buildah tag ${IMG}:${TAG} ${IMG}:devel
26+
buildah tag ${IMG}:${TAG} ${IMG}:${SRCREV}
2627
else
2728
(>&2 echo "Unknown builder ${BUILDER}")
2829
exit 1

demo/build-image.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,28 @@
22

33
IMG=$1
44
BUILDER=$2
5+
DIR=$(basename $IMG)
56

6-
if [ -z "$IMG" ]; then
7+
if [ -z "$DIR" ]; then
78
(>&2 echo "Usage: $0 <image directory>")
89
exit 1
910
fi
1011

11-
if [ ! -d "$IMG" ]; then
12-
(>&2 echo "Directory $IMG doesn't exist")
12+
if [ ! -d "$DIR" ]; then
13+
(>&2 echo "Directory $DIR doesn't exist")
1314
exit 1
1415
fi
1516

1617
CWD=`dirname $0`
17-
TAG=`git rev-parse HEAD`
18+
TAG=${TAG:-devel}
19+
SRCREV=$(git rev-parse HEAD)
1820

1921
if [ -z "$BUILDER" -o "$BUILDER" = 'docker' ] ; then
20-
docker build --rm -t ${IMG}:${TAG} "$CWD/$IMG/"
21-
docker tag ${IMG}:${TAG} ${IMG}:devel
22+
docker build --pull -t ${IMG}:${TAG} "$CWD/$DIR/"
23+
docker tag ${IMG}:${TAG} ${IMG}:${SRCREV}
2224
elif [ "$BUILDER" = 'buildah' ] ; then
23-
buildah bud -t ${IMG}:${TAG} "$CWD/$IMG/"
24-
buildah tag ${IMG}:${TAG} ${IMG}:devel
25+
buildah bud --pull-always -t ${IMG}:${TAG} "$CWD/$DIR/"
26+
buildah tag ${IMG}:${TAG} ${IMG}:${SRCREV}
2527
else
2628
(>&2 echo "Unknown builder $BUILDER")
2729
exit 1

deployments/fpga_admissionwebhook/deployment-tpl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
spec:
1414
containers:
1515
- name: fpga-mutator
16-
image: intel-fpga-admissionwebhook:devel
16+
image: intel/intel-fpga-admissionwebhook:devel
1717
imagePullPolicy: IfNotPresent
1818
args:
1919
- -tls-cert-file=/etc/webhook/certs/cert.pem

deployments/fpga_plugin/fpga_plugin.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
serviceAccountName: intel-fpga-plugin-controller
1818
initContainers:
1919
- name: intel-fpga-initcontainer
20-
image: intel-fpga-initcontainer:devel
20+
image: intel/intel-fpga-initcontainer:devel
2121
imagePullPolicy: IfNotPresent
2222
volumeMounts:
2323
- mountPath: /opt/intel/fpga-sw
@@ -31,7 +31,7 @@ spec:
3131
valueFrom:
3232
fieldRef:
3333
fieldPath: spec.nodeName
34-
image: intel-fpga-plugin:devel
34+
image: intel/intel-fpga-plugin:devel
3535
imagePullPolicy: IfNotPresent
3636
volumeMounts:
3737
- name: devfs

deployments/gpu_plugin/gpu_plugin.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
valueFrom:
2222
fieldRef:
2323
fieldPath: spec.nodeName
24-
image: intel-gpu-plugin:devel
24+
image: intel/intel-gpu-plugin:devel
2525
imagePullPolicy: IfNotPresent
2626
volumeMounts:
2727
- name: devfs

deployments/qat_dpdk_app/base/crypto-perf-dpdk-pod-requesting-qat.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
spec:
66
containers:
77
- name: crypto-perf
8-
image: crypto-perf:devel
8+
image: intel/crypto-perf:devel
99
imagePullPolicy: IfNotPresent
1010
command: [ "/bin/bash", "-c", "--" ]
1111
args: [ "while true; do sleep 300000; done;" ]

deployments/qat_plugin/qat_plugin.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
spec:
1616
containers:
1717
- name: intel-qat-plugin
18-
image: intel-qat-plugin:devel
18+
image: intel/intel-qat-plugin:devel
1919
env:
2020
- name: DPDK_DRIVER
2121
valueFrom:

deployments/qat_plugin/qat_plugin_kernel_mode.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
- name: intel-qat-kernel-plugin
1818
securityContext:
1919
privileged: true
20-
image: intel-qat-plugin:devel
20+
image: intel/intel-qat-plugin:devel
2121
imagePullPolicy: IfNotPresent
2222
command: ["/usr/bin/intel_qat_device_plugin", "-mode", "kernel"]
2323
volumeMounts:

0 commit comments

Comments
 (0)