Skip to content

Commit

Permalink
Merge pull request #431 from lmm/lmm-update-dockerfile
Browse files Browse the repository at this point in the history
Update amd64 images to meet certification requirements
  • Loading branch information
lmm committed Nov 8, 2019
2 parents 13c6541 + 6cbd3d6 commit 070f235
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
18 changes: 17 additions & 1 deletion Dockerfile.amd64
Expand Up @@ -11,9 +11,25 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GIT_VERSION=unknown
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest as base

# Add in top-level license file
RUN mkdir /licenses
COPY LICENSE /licenses

FROM scratch
LABEL maintainer "Casey Davenport <casey@tigera.io>"
ARG GIT_VERSION
LABEL name="Calico Kubernetes controllers" \
vendor="Project Calico" \
version=$GIT_VERSION \
release="1" \
summary="Calico Kubernetes controllers monitor the Kubernetes API and perform actions based on cluster state" \
description="Calico Kubernetes controllers monitor the Kubernetes API and perform actions based on cluster state" \
maintainer="Casey Davenport <casey@tigera.io>"

COPY --from=base /licenses /licenses
ADD bin/kube-controllers-linux-amd64 /usr/bin/kube-controllers
ADD bin/check-status-linux-amd64 /usr/bin/check-status
ENTRYPOINT ["/usr/bin/kube-controllers"]
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -248,9 +248,9 @@ sub-image-%:

image.created-$(ARCH): bin/kube-controllers-linux-$(ARCH) bin/check-status-linux-$(ARCH) bin/kubectl-$(ARCH)
# Build the docker image for the policy controller.
docker build -t $(BUILD_IMAGE):latest-$(ARCH) --build-arg QEMU_IMAGE=$(CALICO_BUILD) -f Dockerfile.$(ARCH) .
docker build -t $(BUILD_IMAGE):latest-$(ARCH) --build-arg QEMU_IMAGE=$(CALICO_BUILD) --build-arg GIT_VERSION=$(GIT_VERSION) -f Dockerfile.$(ARCH) .
# Build the docker image for the flannel migration controller.
docker build -t $(FLANNEL_MIGRATION_BUILD_IMAGE):latest-$(ARCH) --build-arg QEMU_IMAGE=$(CALICO_BUILD) -f docker-images/flannel-migration/Dockerfile.$(ARCH) .
docker build -t $(FLANNEL_MIGRATION_BUILD_IMAGE):latest-$(ARCH) --build-arg QEMU_IMAGE=$(CALICO_BUILD) --build-arg GIT_VERSION=$(GIT_VERSION) -f docker-images/flannel-migration/Dockerfile.$(ARCH) .
ifeq ($(ARCH),amd64)
# Need amd64 builds tagged as :latest because Semaphore depends on that
docker tag $(BUILD_IMAGE):latest-$(ARCH) $(BUILD_IMAGE):latest
Expand Down
17 changes: 16 additions & 1 deletion docker-images/flannel-migration/Dockerfile.amd64
Expand Up @@ -11,9 +11,24 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GIT_VERSION=unknown
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest as base

# Add in top-level license file
RUN mkdir /licenses
COPY LICENSE /licenses

FROM scratch
LABEL maintainer "Song Jiang <song@tigera.io>"
LABEL name="Calico Flannel migration controller" \
vendor="Project Calico" \
version=$GIT_VERSION \
release="1" \
summary="Calico Flannel migration controller updates a flannel cluster to Calico" \
description="Calico Flannel migration controller updates a flannel cluster to Calico" \
maintainer="Song Jiang <song@tigera.io>"

COPY --from=base /licenses /licenses
ADD bin/kubectl-amd64 /usr/bin/kubectl
ADD bin/kube-controllers-linux-amd64 /usr/bin/kube-controllers
ADD bin/check-status-linux-amd64 /usr/bin/check-status
Expand Down

0 comments on commit 070f235

Please sign in to comment.