-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Arm Multi-arch Make Logic (#36)
* Added Arm Multi-arch Make Logic - Added file Dockerfile-arm for building arm 32bit builds - Added file Dockerfile-arm64 for building arm 64bit builds - modified Makefile to try and have similar logic to the multi-arch Makefile in the base velero project adding targets all-containers, all-push, manifest, etc. Original targets should continue to work as is. - updated hack/docker-push to use the new targets to build multi-arch images Signed-off-by: Chris Lynch <[email protected]> * Updates to keep arm64 and arm dockerfiles in line with original docker file after 1.1 update Signed-off-by: Chris Lynch <[email protected]> * Making changes to dockerfiles requested by review Signed-off-by: Chris Lynch <[email protected]>
- Loading branch information
1 parent
a7f2cf1
commit 46c18b3
Showing
4 changed files
with
102 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2020 the Velero contributors. | ||
# | ||
# 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 golang:1.13-buster AS build | ||
COPY . /go/src/velero-plugin-for-aws | ||
WORKDIR /go/src/velero-plugin-for-aws | ||
RUN GOARCH=arm CGO_ENABLED=0 GOOS=linux go build -v -o /go/bin/velero-plugin-for-aws ./velero-plugin-for-aws | ||
|
||
|
||
FROM arm32v7/ubuntu:bionic | ||
COPY --from=build /go/bin/velero-plugin-for-aws /plugins/ | ||
USER nobody:nogroup | ||
ENTRYPOINT ["/bin/bash", "-c", "cp /plugins/* /target/."] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2020 the Velero contributors. | ||
# | ||
# 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 golang:1.13-buster AS build | ||
COPY . /go/src/velero-plugin-for-aws | ||
WORKDIR /go/src/velero-plugin-for-aws | ||
RUN GOARCH=arm64 CGO_ENABLED=0 GOOS=linux go build -v -o /go/bin/velero-plugin-for-aws ./velero-plugin-for-aws | ||
|
||
|
||
FROM arm64v8/ubuntu:bionic | ||
COPY --from=build /go/bin/velero-plugin-for-aws /plugins/ | ||
USER nobody:nogroup | ||
ENTRYPOINT ["/bin/bash", "-c", "cp /plugins/* /target/."] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters