Skip to content

Commit

Permalink
Merge pull request #123 from projectcalico/lmm-update-dockerfile
Browse files Browse the repository at this point in the history
Update amd64 Dockerfile for certification
  • Loading branch information
lmm committed Nov 8, 2019
2 parents 5aac1c5 + fff4a4d commit 4151792
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 5 deletions.
31 changes: 30 additions & 1 deletion Dockerfile.amd64
@@ -1,9 +1,38 @@
# Copyright (c) 2018-2019 Tigera, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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 alpine as build
RUN mkdir -p /tmp/dikastes
RUN chmod 0777 /tmp/dikastes

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

FROM scratch
ARG GIT_VERSION
LABEL name="Calico Dikastes" \
vendor="Project Calico" \
version=$GIT_VERSION \
release="1" \
summary="Calico Dikastes enables Application Layer Policy" \
description="Calico Dikastes enables Application Layer Policy" \
maintainer="Laurence Man<laurence@tigera.io>"

COPY --from=build /licenses /licenses
ADD bin/dikastes-amd64 /dikastes
ADD bin/healthz-amd64 /healthz
# Typical Linux systems start numbering human users at 1000, reserving 1-999
Expand All @@ -16,4 +45,4 @@ ADD bin/healthz-amd64 /healthz
COPY --chown=999 --from=build /tmp/dikastes /var/run/dikastes
USER 999
ENTRYPOINT ["/dikastes"]
CMD ["server"]
CMD ["server"]
15 changes: 14 additions & 1 deletion Dockerfile.arm64
@@ -1,5 +1,18 @@
# Copyright (c) 2017-2018 Tigera, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.
FROM scratch

ADD bin/dikastes-arm64 /dikastes
ADD bin/healthz-arm64 /healthz
CMD ["/dikastes"]
CMD ["/dikastes"]
15 changes: 14 additions & 1 deletion Dockerfile.ppc64le
@@ -1,5 +1,18 @@
# Copyright (c) 2017-2018 Tigera, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.
FROM scratch

ADD bin/dikastes-ppc64le /dikastes
ADD bin/healthz-ppc64le /healthz
CMD ["/dikastes"]
CMD ["/dikastes"]
15 changes: 14 additions & 1 deletion Dockerfile.s390x
@@ -1,5 +1,18 @@
# Copyright (c) 2017-2018 Tigera, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.
FROM scratch

ADD bin/dikastes-s390x /dikastes
ADD bin/healthz-s390x /healthz
CMD ["/dikastes"]
CMD ["/dikastes"]
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -366,7 +366,7 @@ sub-image-%:

$(BUILD_IMAGE): $(CONTAINER_CREATED)
$(CONTAINER_CREATED): Dockerfile.$(ARCH) bin/dikastes-$(ARCH) bin/healthz-$(ARCH)
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) .
ifeq ($(ARCH),amd64)
docker tag $(BUILD_IMAGE):latest-$(ARCH) $(BUILD_IMAGE):latest
endif
Expand Down

0 comments on commit 4151792

Please sign in to comment.