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

Add Support for arm7l architecture #20

Open
guyk-yahoo opened this issue Nov 22, 2021 · 6 comments · May be fixed by #30
Open

Add Support for arm7l architecture #20

guyk-yahoo opened this issue Nov 22, 2021 · 6 comments · May be fixed by #30

Comments

@guyk-yahoo
Copy link

guyk-yahoo commented Nov 22, 2021

Wanted to move to use compose-switch on my raspberrypi, but it seems that there's no compose-switch for armv7 :(

$ uname -m
armv7l
@guyk-yahoo guyk-yahoo changed the title Add Support for ArmV7 release Add Support for arm7l architecture Nov 23, 2021
@tilusnet
Copy link

Yes please.

For he time being I am using docker context use <armv7l-machine> from a different machine which supports docker-compose.

@milas
Copy link

milas commented Mar 17, 2022

Since cross compilation in Go works well, I built an ARM binary on my desktop using Docker and then copied it over (following the manual instructions other than the download step):

docker run --name compose-switch-builder -e GOOS=linux -e GOARCH=arm golang:1.18 go install github.com/docker/[email protected] \
&& docker cp compose-switch-builder:/go/bin/linux_arm/compose-switch ./compose-switch \
&& docker rm -f compose-switch-builder

Alternatively, if you have Go installed on your Raspberry Pi, you can build it locally:

go install github.com/docker/[email protected]
sudo mv "$(go env GOPATH)/bin/compose-switch" /usr/local/bin/compose-switch

@GuyKh
Copy link

GuyKh commented Mar 18, 2022

Since cross compilation in Go works well, I built an ARM binary on my desktop using Docker and then copied it over (following the manual instructions other than the download step):

docker run --name compose-switch-builder -e GOOS=linux -e GOARCH=arm golang:1.18 go install github.com/docker/[email protected] \
&& docker cp compose-switch-builder:/go/bin/linux_arm/compose-switch ./compose-switch \
&& docker rm -f compose-switch-builder

Alternatively, if you have Go installed on your Raspberry Pi, you can build it locally:

go install github.com/docker/[email protected]
sudo mv "$(go env GOPATH)/bin/compose-switch" /usr/local/bin/compose-switch

If so. Would it be too hard to create a GitHub release compiled for Arm7l? This must be merely a github workflow configuration

@GuyKh
Copy link

GuyKh commented Mar 20, 2022

Since cross compilation in Go works well, I built an ARM binary on my desktop using Docker and then copied it over (following the manual instructions other than the download step):

docker run --name compose-switch-builder -e GOOS=linux -e GOARCH=arm golang:1.18 go install github.com/docker/[email protected] \
&& docker cp compose-switch-builder:/go/bin/linux_arm/compose-switch ./compose-switch \
&& docker rm -f compose-switch-builder

Alternatively, if you have Go installed on your Raspberry Pi, you can build it locally:

go install github.com/docker/[email protected]
sudo mv "$(go env GOPATH)/bin/compose-switch" /usr/local/bin/compose-switch

A little fix -- the docker cp should be from /go/bin/compose-switch.
The full correct command should be:

docker run --name compose-switch-builder -e GOOS=linux -e GOARCH=arm golang:1.18 go install github.com/docker/[email protected] \
&& docker cp compose-switch-builder:/go/bin/compose-switch ./compose-switch \
&& docker rm -f compose-switch-builder

@Cinderhaze
Copy link

A little fix -- the docker cp should be from /go/bin/compose-switch. The full correct command should be:

For me running in the above command, I needed the path to be /go/bin/linux_arm/compose-switch as originally stated, otherwise I got an error that the path did not exist while doing the docker cp

@GuyKh
Copy link

GuyKh commented Jan 8, 2023

Strangely enough -- running on armv7l - getting exec format error when running the package from go with GOOS=linux -e GOARCH=arm golang:1.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants