mirror of
https://github.com/redhat-actions/buildah-build.git
synced 2025-04-20 17:11:23 +00:00
Add note to setup 'qemu-user-static' to build multi-arch image (#35)
* Add note to setup 'qemu-user-static' to build multi-arch image Signed-off-by: divyansh42 <diagrawa@redhat.com> * Resolve reviews Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
parent
aec3a155d1
commit
1f7c249930
1 changed files with 10 additions and 2 deletions
12
README.md
12
README.md
|
@ -21,7 +21,7 @@ After building your image, use [push-to-registry](https://github.com/redhat-acti
|
||||||
|
|
||||||
| Input Name | Description | Default |
|
| Input Name | Description | Default |
|
||||||
| ---------- | ----------- | ------- |
|
| ---------- | ----------- | ------- |
|
||||||
| archs | Architecture(s) to build the image(s) for. For multiple architectures, separate by a comma. If the workflow is running on a self-hosted runner, [qemu-user-static](https://github.com/marketplace/actions/docker-setup-qemu) can be used to install the `qemu-user-static` dependency. | `amd64`
|
| archs | Architecture(s) to build the image(s) for. For multiple architectures, separate by a comma. Refer to [Multi arch builds](#multi-arch-builds) to setup the `qemu-user-static` dependency. | `amd64`
|
||||||
| build-args | Build arguments to pass to the Docker build using `--build-arg`, if using a Dockerfile that requires ARGs. Use the form `arg_name=arg_value`, and separate arguments with newlines. | None
|
| build-args | Build arguments to pass to the Docker build using `--build-arg`, if using a Dockerfile that requires ARGs. Use the form `arg_name=arg_value`, and separate arguments with newlines. | None
|
||||||
| context | Path to directory to use as the build context. | `.`
|
| context | Path to directory to use as the build context. | `.`
|
||||||
| dockerfiles | The list of Dockerfile paths to perform a build using docker instructions. This is a multiline input to allow multiple Dockerfiles. | **Must be provided**
|
| dockerfiles | The list of Dockerfile paths to perform a build using docker instructions. This is a multiline input to allow multiple Dockerfiles. | **Must be provided**
|
||||||
|
@ -33,7 +33,7 @@ After building your image, use [push-to-registry](https://github.com/redhat-acti
|
||||||
|
|
||||||
| Input Name | Description | Default |
|
| Input Name | Description | Default |
|
||||||
| ---------- | ----------- | ------- |
|
| ---------- | ----------- | ------- |
|
||||||
| archs | Architecture(s) to build the image(s) for. For multiple architectures, separate by a comma. If the workflow is running on a self-hosted runner, [qemu-user-static](https://github.com/marketplace/actions/docker-setup-qemu) can be used to install the `qemu-user-static` dependency. | `amd64`
|
| archs | Architecture(s) to build the image(s) for. For multiple architectures, separate by a comma. Refer to [Multi arch builds](#multi-arch-builds) to setup the `qemu-user-static` dependency. | `amd64`
|
||||||
| base-image | The base image to use for the container. | **Must be provided**
|
| base-image | The base image to use for the container. | **Must be provided**
|
||||||
| content | Paths to files or directories to copy inside the container to create the file image. This is a multiline input to allow you to copy multiple files/directories.| None
|
| content | Paths to files or directories to copy inside the container to create the file image. This is a multiline input to allow you to copy multiple files/directories.| None
|
||||||
| context | Path to directory to use as the build context. | `.`
|
| context | Path to directory to use as the build context. | `.`
|
||||||
|
@ -128,6 +128,14 @@ jobs:
|
||||||
port: 8080
|
port: 8080
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<a id="multi-arch-builds"></a>
|
||||||
|
## Multi arch builds
|
||||||
|
|
||||||
|
If building for an architecture other than `amd64`, install `qemu-user-static` using the following command.
|
||||||
|
```
|
||||||
|
sudo podman run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||||
|
```
|
||||||
|
|
||||||
## Using private images
|
## Using private images
|
||||||
If your build requires a private image, you have to `docker login` in a step before running this action.
|
If your build requires a private image, you have to `docker login` in a step before running this action.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue