Skip to content

Commit

Permalink
Provide usage examples in README.md
Browse files Browse the repository at this point in the history
We provide two simple examples of invoking `qemu-{arch}-static` (or more
precisely, we let the kernel do the invocation.)

Closes: #95

Signed-off-by: Solomon Jacobs <solomonjacobs@protonmail.com>
  • Loading branch information
SoloJacobs committed Dec 15, 2024
1 parent 8b562ef commit d11e328
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@ jobs:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64, i386
-
name: Create an example binary for AArch64
run: |
go mod init hello
cat << EOL > hello.go
package main
func main() {
println("Hello, AArch64!")
}
EOL
GOARCH=arm64 go build hello.go
-
name: This would fail without docker/setup-qemu-action
run: ./hello
-
name: You can also run images from other platforms
run: docker run --platform linux/i386 hello-world
```
## Customizing
Expand Down

0 comments on commit d11e328

Please sign in to comment.