1

Recently I've been trying to deploy Nexus Sonatype to ARM based device, but I get standard_init_linux.go:211: exec user process caused "exec format error".

After a little bit googling I've found that it may be an architecture differences issue. I tried to build docker image on my own, but with no luck (because of ubi8/ubi with no arm manifest)

Are there any plans to support ARM arch? And (as a temporary solution), how can I build it on my own?

Tomasz Durda
  • 134
  • 1
  • 9

2 Answers2

0

I tried to rebuild docker original image but got stuck with installing nexus. Chef untility is not available for arm. So I don't know what chef is doing but only way is to fnd a replacement for it to build the image.

Metadata URL: https://www.getchef.com/stable/chef/metadata?v=&p=el&pv=7&m=armv7l The command '/bin/sh -c curl -L https://www.getchef.com/chef/install.sh | bash && /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json && chef-solo --node_name nexus_repository_red_hat_docker_build --recipe-url ${NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL} --json-attributes /var/chef/solo.json && rpm -qa chef | xargs rpm -e && rpm --rebuilddb && rm -rf /etc/chef && rm -rf /opt/chefdk && rm -rf /var/cache/yum && rm -rf /var/chef' returned a non-zero code: 1

There are unoffical images which I will not use for security reasons. Building one based on an inoffical failed with out of memory errors and startup time of 30minutes on a pi4.

Coolius
  • 53
  • 1
  • 6
0

If anyone's still looking to do this, it's possible to build an ARM Docker image on another (non-ARM) machine.

The hard work was done here but I did a bit of work figuring out what was going on, and documented my findings.

Install QEMU binaries into the host kernel, which will allow other architectures to be emulated:

docker run --rm --privileged \
    docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64

Create a builder, which is an isolated environment in which images can be built, then start it:

docker buildx create --name mybuilder
docker buildx use mybuilder
docker buildx inspect --bootstrap

Clone klo2k's repo, and build the ARM image:

docker buildx build --pull \
  --platform "linux/arm/v7" \
  --tag "nexus3-armv7" \
  --output "type=docker" \
  .

The image takes a minute or two to start on an rPi4, and it's a little slow downloading artifacts from the internet, but otherwise it's quite usable.

taka
  • 69
  • 5