Skip to content

Commit

Permalink
Using specific OVS base image (2.13.1-0.9.3)
Browse files Browse the repository at this point in the history
In order to include strongSwan configuration patch.
  • Loading branch information
antoninbas committed Sep 3, 2020
1 parent ea33d94 commit ba461b5
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion build/images/Dockerfile.build.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COPY . /antrea
RUN make antrea-agent antrea-controller antrea-cni antctl-ubuntu


FROM antrea/base-ubuntu:2.13.1
FROM antrea/base-ubuntu:2.13.1-0.9.3

LABEL maintainer="Antrea <projectantrea-dev@googlegroups.com>"
LABEL description="The Docker image to deploy the Antrea CNI. "
Expand Down
2 changes: 1 addition & 1 deletion build/images/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM antrea/base-ubuntu:2.13.1
FROM antrea/base-ubuntu:2.13.1-0.9.3

LABEL maintainer="Antrea <projectantrea-dev@googlegroups.com>"
LABEL description="The Docker image to deploy the Antrea CNI. "
Expand Down
4 changes: 2 additions & 2 deletions build/images/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG OVS_VERSION=2.13.1
ARG IMG_TAG=2.13.1
FROM ubuntu:20.04 as cni-binaries

RUN apt-get update && \
Expand All @@ -11,7 +11,7 @@ RUN mkdir -p /opt/cni/bin && \
wget -q -O - https://github.com/containernetworking/plugins/releases/download/v0.8.6/cni-plugins-linux-amd64-v0.8.6.tgz | tar xz -C /opt/cni/bin $CNI_PLUGINS


FROM antrea/openvswitch:${OVS_VERSION}
FROM antrea/openvswitch:${IMG_TAG}

LABEL maintainer="Antrea <projectantrea-dev@googlegroups.com>"
LABEL description="Takes care of building the Antrea binaries as part of building the image."
Expand Down
12 changes: 6 additions & 6 deletions build/images/base/build_and_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ function echoerr {
>&2 echo "$@"
}

if [ -z "$OVS_VERSION" ]; then
echoerr "The OVS_VERSION env variable must be set to a valid value (e.g. 2.13.1)"
if [ -z "$IMG_TAG" ]; then
echoerr "The IMG_TAG env variable must be set to a valid value (e.g. 2.13.1)"
exit 1
fi

Expand All @@ -34,13 +34,13 @@ pushd $THIS_DIR > /dev/null

docker pull ubuntu:20.04

docker pull antrea/openvswitch:$OVS_VERSION
docker pull antrea/openvswitch:$IMG_TAG

docker build \
-t antrea/base-ubuntu:$OVS_VERSION \
-t antrea/base-ubuntu:$IMG_TAG \
-f Dockerfile \
--build-arg OVS_VERSION=$OVS_VERSION .
--build-arg IMG_TAG=$IMG_TAG .

docker push antrea/base-ubuntu:$OVS_VERSION
docker push antrea/base-ubuntu:$IMG_TAG

popd > /dev/null
18 changes: 11 additions & 7 deletions build/images/ovs/build_and_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ if [ -z "$OVS_VERSION" ]; then
exit 1
fi

if [ -z "$IMG_TAG" ]; then
IMG_TAG="$OVS_VERSION"
fi

THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

pushd $THIS_DIR > /dev/null
Expand All @@ -42,17 +46,17 @@ pushd $THIS_DIR > /dev/null
docker pull ubuntu:20.04

docker build --target ovs-debs \
--cache-from antrea/openvswitch-debs:$OVS_VERSION \
-t antrea/openvswitch-debs:$OVS_VERSION \
--cache-from antrea/openvswitch-debs:$IMG_TAG \
-t antrea/openvswitch-debs:$IMG_TAG \
--build-arg OVS_VERSION=$OVS_VERSION .

docker build \
--cache-from antrea/openvswitch-debs:$OVS_VERSION \
--cache-from antrea/openvswitch:$OVS_VERSION \
-t antrea/openvswitch:$OVS_VERSION \
--cache-from antrea/openvswitch-debs:$IMG_TAG \
--cache-from antrea/openvswitch:$IMG_TAG \
-t antrea/openvswitch:$IMG_TAG \
--build-arg OVS_VERSION=$OVS_VERSION .

docker push antrea/openvswitch-debs:$OVS_VERSION
docker push antrea/openvswitch:$OVS_VERSION
docker push antrea/openvswitch-debs:$IMG_TAG
docker push antrea/openvswitch:$IMG_TAG

popd > /dev/null
2 changes: 1 addition & 1 deletion build/images/test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM antrea/openvswitch:2.13.1
FROM antrea/openvswitch:2.13.1-0.9.3

LABEL maintainer="Antrea <projectantrea-dev@googlegroups.com>"
LABEL description="A Docker image for antrea integration tests."
Expand Down

0 comments on commit ba461b5

Please sign in to comment.