Can I run a docker container doing a x86 build on a IBM Power system?
Asked Answered
L

2

5

Our build setup is backed into a large docker container (basically a 2 GB image coming with a complete X86 linux in itself).

We have two ways to actually build: the official approach is jenkins environment (running on X86 hardware). But we also have a little "side X86 server" running RH 7. Developers can log into that RH server and kick off specific builds (using said docker images) themselves.

Those RH servers will be shut down at some point, to be replaced with IBM Power8 machines (running RH7 Little Endian for power).

I am simply wondering: is there a chance that our existing build setup and docker images simply work on Power8? Or are the fundamental technical issues that make it unlikely and not even worth trying?

Lashanda answered 4/9, 2018 at 9:27 Comment(0)
C
5

You can probably use your existing build methodology and scripts close to unchanged, but you'll need to rebuild the actual images.

You can't directly run x86 binaries on Power (at a very low level, the bytes of machine code are just different). Docker doesn't contain any sort of virtualization layer; it does a bunch of setup to isolate the container from the host, but then runs the binaries in an image directly.

If your Jenkins setup has enough parameters for image names and version tags, then you should be able to run the x86 and Power setups side-by-side; you need to encode the architecture somewhere in the built image name or tag; for instance, repo.example.com/app/build:20180904-power. (I don't know that one or the other is considered better if you control all of the machinery.) If you have a private repo, you could encode it earlier in the path, winding up with image names like repo.example.com/power/build:20180904.

You'd need to double-check that everywhere that has a Docker image reference has it correctly parameterized (which is a good practice anyways). That would include any direct docker run commands; any Docker Compose or Kubernetes YAML files or similar artifacts; and the FROM line of any Dockerfiles.

Cyclone answered 4/9, 2018 at 9:59 Comment(1)
To be precise: I am not asking about the Jenkins setup. That stays x86.Lashanda
D
1

Existing build setup? Not sure!
Docker images? NO, don’t even try.

Docker images are actually multiple layers which stored on filesystem through corresponding storage driver and backing filesystem(shown in the output of docker info).

If storage driver/backing filesystem has been changed, which likely be true when OS changed, older docker images could not be valid any more. Meaning they must be rebuilt for sure.

Dorice answered 4/9, 2018 at 9:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.