Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update amd64 Dockerfile for certification #123

Merged
merged 1 commit into from
Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion Dockerfile.amd64
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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