dalec
dalec copied to clipboard
[REQ] support for multi platform and cross platform builds and images
What kind of request is this?
Improvement of existing experience
What is your request or suggestion?
While the container platform manifest is generated correctly, Dalec only produces binaries for packages/images that match the host OS. Dalec should support multi and cross platform binaries, at least for Go.
Repro:
# syntax=ghcr.io/azure/dalec/frontend:latest
name: go-md2man
version: 2.0.3
revision: "1"
packager: Dalec Example
vendor: Dalec Example
license: MIT
description: A tool to convert markdown into man pages (roff).
website: https://github.com/cpuguy83/go-md2man
sources:
src:
git:
url: https://github.com/cpuguy83/go-md2man.git
commit: "v2.0.3"
generate:
- gomod: {}
dependencies:
build:
msft-golang:
build:
env:
CGO_ENABLED: "0"
steps:
- command: |
cd src
GOARCH=arm64 go build -o go-md2man .
artifacts:
binaries:
src/go-md2man:
image:
entrypoint: go-md2man
cmd: --help
docker build -t gomd2man --push -f gomd2man.yaml . --target mariner2 --platform linux/arm64
...
3.485 /bin/strip: Unable to recognise the format of the input file `/build/tmp/work/usr/bin/go-md2man'
3.486 error: Bad exit status from /var/tmp/rpm-tmp.rmIrI1 (%install)
3.486 Bad exit status from /var/tmp/rpm-tmp.rmIrI1 (%install)
cc @cpuguy83
Are you willing to submit PRs to contribute to this feature request?
- [ ] Yes, I am willing to implement it.