alpine-docker / socat

[Archived] Run socat command in alpine container - follow up project at https://github.com/alpine-docker/multi-arch-libs/tree/master/socat
https://hub.docker.com/r/alpine/socat/
GNU General Public License v3.0
106 stars 39 forks source link

Multi Architecture image support #7

Closed jmb12686 closed 3 years ago

jmb12686 commented 5 years ago

I would like to utilize this docker image on ARM devices (linux/arm/v7 to be precise). However, this image only supports linux/amd64: $ docker run --rm mplatform/mquery alpine/socat Image: alpine/socat * Manifest List: No * Supports: amd64/linux

Is it possible to build and publish multi-arch image (with manifest) similar to the official main alpine image?

Thank you.

ozbillwang commented 5 years ago

I DO think about this topic in fact. the IoT becomes hot topic recently.

The first one I did is https://github.com/alpine-docker/greengrass, please go through the notes first.

https://github.com/alpine-docker/greengrass/blob/master/Notes.md

My problem here is, I doesn't have devices to test the images I built for ARM devices. I used have raspberrypi and alexa, but can't find them now. Whatever, manual test will not be convenience at all, even I have the devices.

So I need develop an automation way to guarantee the docker images, built by travis.ci, should be smoothly used directly for ARM device.

If you can raise any PRs about this topic, I will be appreciated.

ozbillwang commented 5 years ago

Wait your feedback, if you can do a test on ARM device with below Dockerfile

FROM balenalib/armv7hf-alpine-python:latest-3.9
ARG VERSION=1.7.3.2

RUN apk --no-cache add socat=${VERSION}

ENTRYPOINT ["socat"]
jmb12686 commented 5 years ago

Hi, thanks for responding to my issue. Actually, I accomplished the multi-architecture image thru this method that I published in my repo here: https://github.com/jmb12686/raspi-docker-stacks/tree/master/prometheus/dockerd-exporter. Using docker buildx seems like a more clean implementation that supports multiarch manifest images.

ozbillwang commented 5 years ago

I have reviewed the repo, seems the only enhance is to add the option when run docker build

--platform linux/amd64,linux/arm64,linux/arm/v7

Can you raise a PR to get it work here?

jmb12686 commented 5 years ago

It appears like you utilize TravisCI for your build, but do you use it also for deploy / pushing to DockerHub? It's unclear if travisCI supports experimental docker buildx features: https://docs.docker.com/buildx/working-with-buildx/

I have been using the experimental buildx feature from Docker Desktop (on windows pc) to build my multiarch image: https://engineering.docker.com/2019/04/multi-arch-images/

ozbillwang commented 5 years ago

Yes, I use travis.ci to build, push images to Docker Hub.

travisCI is fine to build ARM images. Reference this url: https://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/

and sample of .travisci.yml : https://github.com/hypriot/rpi-mysql/blob/master/.travis.yml

ozbillwang commented 3 years ago

I have no time to take care of Multi Architecture, it goes crazy when I enabled this feature in another repo https://github.com/alpine-docker/git.

This ticket will be closed. If you need support Multi Architecture, please maintain yours directly.