During pipeline execution I'm unable to run a 32-bit executable inside of docker. I have taken the default build image (atlassian/default-image) and added the required 32-bit libraries to run the 32-bit executable but it still does not work. However, outside of bitbucket pipelines this works fine.
I believe my issue is the same as this:
https://community.atlassian.com/t5/Bitbucket-questions/Unable-to-run-32-bit-executable-on-Ubuntu-20-04-on-Pipelines/qaq-p/1915430
Per Zeex suggestion from the above thread, I'm reaching out to support to in regards to enabling 32-bit support for my pipeline.
Hi @tohellwithtinytim and welcome to the community!
Could you please let me know the following:
Kind regards,Theodora
See below.
The build fails when trying to run the 32-bit executable 'amxxpc'.
However, when I use a self-hosted runner on my Ubuntu 20.04 these work fine.
image: seaoddit/atlassian-builder-image-ia32pipelines:branches:dev:- step:script:- git submodule update --init --recursive- apt-get update && apt-get --yes --force-yes install lib32z1 lib32ncurses5 lib32bz2-1.0- docker login -u $DOCKER_HUB_ID -p $DOCKER_HUB_PASSWORD- docker build --platform="linux/amd64" -t $DOCKER_HUB_ID/$DOCKER_REPO:latest .- docker push $DOCKER_HUB_ID/$DOCKER_REPO:latestoptions:docker: true
FROM seaoddit/tfc-batcave:amxmodx-tfc-1-9-0-5271# Orpheu 2.6.3COPY "orpheu-files-2.6.3/" "/home/steam/tfc-server/tfc/addons/amxmodx/"# ServerDatabaseCOPY "serverdatabase-fork/" "/home/steam/amxmodx-plugins/ServerDatabase"RUN cp "/home/steam/amxmodx-plugins/ServerDatabase/ServerDatabase.sma" "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/"RUN cp "/home/steam/amxmodx-plugins/ServerDatabase/hlstriker_server_db.inc" "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/include/"WORKDIR "/home/steam/tfc-server/tfc/addons/amxmodx/scripting"#RUN ["/home/steam/tfc-server/tfc/addons/amxmodx/scripting/amxxpc", "ServerDatabase.sma"]RUN "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/amxxpc" "ServerDatabase.sma"RUN mv "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/ServerDatabase.amxx" "/home/steam/tfc-server/tfc/addons/amxmodx/plugins/"RUN echo "ServerDatabase.amxx" >> "/home/steam/tfc-server/tfc/addons/amxmodx/configs/plugins.ini"
docker build --platform="linux/amd64" -t $DOCKER_HUB_ID/$DOCKER_REPO:latest .23s+ docker build --platform="linux/amd64" -t $DOCKER_HUB_ID/$DOCKER_REPO:latest .Sending build context to Docker daemon 2.039MBStep 1/49 : FROM $DOCKER_HUB_ID/$DOCKER_REPO:amxmodx-tfc-1-9-0-5271amxmodx-tfc-1-9-0-5271: Pulling from $DOCKER_HUB_ID/$DOCKER_REPO8740c948ffd4: Pulling fs layer4b977f43e269: Pulling fs layer44fb41d970a3: Pulling fs layer1efc1fdb38f7: Pulling fs layer41498acf7408: Pulling fs layer663c64010fc2: Pulling fs layer6123eca03eff: Pulling fs layer7a283e294632: Pulling fs layer663c64010fc2: Waiting6123eca03eff: Waiting1efc1fdb38f7: Waiting41498acf7408: Waiting7a283e294632: Waiting9647196b2478: Pulling fs layer9647196b2478: Waitingbdfaf9dd363f: Pulling fs layer834bb0ee027a: Pulling fs layerbdfaf9dd363f: Waiting44fb41d970a3: Verifying Checksum44fb41d970a3: Download complete8740c948ffd4: Verifying Checksum8740c948ffd4: Download complete1efc1fdb38f7: Verifying Checksum1efc1fdb38f7: Download complete41498acf7408: Verifying Checksum41498acf7408: Download complete8740c948ffd4: Pull complete6123eca03eff: Verifying Checksum6123eca03eff: Download complete7a283e294632: Download complete9647196b2478: Verifying Checksum9647196b2478: Download complete4b977f43e269: Download complete834bb0ee027a: Verifying Checksum834bb0ee027a: Download completebdfaf9dd363f: Verifying Checksumbdfaf9dd363f: Download complete4b977f43e269: Pull complete44fb41d970a3: Pull complete1efc1fdb38f7: Pull complete41498acf7408: Pull complete663c64010fc2: Download complete663c64010fc2: Pull complete6123eca03eff: Pull complete7a283e294632: Pull complete9647196b2478: Pull completebdfaf9dd363f: Pull complete834bb0ee027a: Pull completeDigest: sha256:451d6be1807060e3e026afcaf7efaf56eb294cbb8c11ddaa7158cb19d0994687Status: Downloaded newer image for $DOCKER_HUB_ID/$DOCKER_REPO:amxmodx-tfc-1-9-0-5271---> 1834dce756e8Step 2/49 : COPY "orpheu-files-2.6.3/" "/home/steam/tfc-server/tfc/addons/amxmodx/"---> aa2296d28bbaStep 3/49 : COPY "serverdatabase-fork/" "/home/steam/amxmodx-plugins/ServerDatabase"---> 031b343b9086Step 4/49 : RUN cp "/home/steam/amxmodx-plugins/ServerDatabase/ServerDatabase.sma" "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/"---> Running in 24d3f96e2279Removing intermediate container 24d3f96e2279---> d0ec38b2983aStep 5/49 : RUN cp "/home/steam/amxmodx-plugins/ServerDatabase/hlstriker_server_db.inc" "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/include/"---> Running in 8fe5e47d73d9Removing intermediate container 8fe5e47d73d9---> 5bb1abdff852Step 6/49 : WORKDIR "/home/steam/tfc-server/tfc/addons/amxmodx/scripting"---> Running in 74278fdec036Removing intermediate container 74278fdec036---> 64b5534a5dfaStep 7/49 : RUN "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/amxxpc" "ServerDatabase.sma"---> Running in 9d4a0919a30a/bin/sh: 1: /home/steam/tfc-server/tfc/addons/amxmodx/scripting/amxxpc: Exec format errorThe command '/bin/sh -c "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/amxxpc" "ServerDatabase.sma"' returned a non-zero code: 1262023-12-07T21:46:33.272799398Z stdout P
Hey @Theodora Boudale , thank you for reaching out.
The build fails when it attempts to run the 32-bit executable (amxxpc) during the Dockerfile build.
However, this all works fine when I use a self-hosted runner on Ubuntu 20.04.
bitbucket-pipelines.yml-----------------------
Dockerfile being built-----------------------
Pipelines Build Return-----------------------
image: seaoddit/atlassian-builder-image-ia32
pipelines:branches:dev:- step:script:- git submodule update --init --recursive- apt-get update && apt-get --yes --force-yes install lib32z1 lib32ncurses5 lib32bz2-1.0- docker login -u $DOCKER_HUB_ID -p $DOCKER_HUB_PASSWORD- docker build --platform="linux/amd64" -t $DOCKER_HUB_ID/$DOCKER_REPO:latest .- docker push $DOCKER_HUB_ID/$DOCKER_REPO:latestoptions:docker: true
FROM seaoddit/tfc-batcave:amxmodx-tfc-1-9-0-5271
# Orpheu 2.6.3
COPY "orpheu-files-2.6.3/" "/home/steam/tfc-server/tfc/addons/amxmodx/"
# ServerDatabase
COPY "serverdatabase-fork/" "/home/steam/amxmodx-plugins/ServerDatabase"RUN cp "/home/steam/amxmodx-plugins/ServerDatabase/ServerDatabase.sma" "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/"RUN cp "/home/steam/amxmodx-plugins/ServerDatabase/hlstriker_server_db.inc" "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/include/"WORKDIR "/home/steam/tfc-server/tfc/addons/amxmodx/scripting"#RUN ["/home/steam/tfc-server/tfc/addons/amxmodx/scripting/amxxpc", "ServerDatabase.sma"]RUN "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/amxxpc" "ServerDatabase.sma"RUN mv "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/ServerDatabase.amxx" "/home/steam/tfc-server/tfc/addons/amxmodx/plugins/"RUN echo "ServerDatabase.amxx" >> "/home/steam/tfc-server/tfc/addons/amxmodx/configs/plugins.ini"
docker build --platform="linux/amd64" -t $DOCKER_HUB_ID/$DOCKER_REPO:latest .23s
+ docker build --platform="linux/amd64" -t $DOCKER_HUB_ID/$DOCKER_REPO:latest .
Sending build context to Docker daemon 2.039MB
Step 1/49 : FROM $DOCKER_HUB_ID/$DOCKER_REPO:amxmodx-tfc-1-9-0-5271
amxmodx-tfc-1-9-0-5271: Pulling from $DOCKER_HUB_ID/$DOCKER_REPO
8740c948ffd4: Pulling fs layer
4b977f43e269: Pulling fs layer
44fb41d970a3: Pulling fs layer
1efc1fdb38f7: Pulling fs layer
41498acf7408: Pulling fs layer
663c64010fc2: Pulling fs layer
6123eca03eff: Pulling fs layer
7a283e294632: Pulling fs layer
663c64010fc2: Waiting
6123eca03eff: Waiting
1efc1fdb38f7: Waiting
41498acf7408: Waiting
7a283e294632: Waiting
9647196b2478: Pulling fs layer
9647196b2478: Waiting
bdfaf9dd363f: Pulling fs layer
834bb0ee027a: Pulling fs layer
bdfaf9dd363f: Waiting
44fb41d970a3: Verifying Checksum
44fb41d970a3: Download complete
8740c948ffd4: Verifying Checksum
8740c948ffd4: Download complete
1efc1fdb38f7: Verifying Checksum
1efc1fdb38f7: Download complete
41498acf7408: Verifying Checksum
41498acf7408: Download complete
8740c948ffd4: Pull complete
6123eca03eff: Verifying Checksum
6123eca03eff: Download complete
7a283e294632: Download complete
9647196b2478: Verifying Checksum
9647196b2478: Download complete
4b977f43e269: Download complete
834bb0ee027a: Verifying Checksum
834bb0ee027a: Download complete
bdfaf9dd363f: Verifying Checksum
bdfaf9dd363f: Download complete
4b977f43e269: Pull complete
44fb41d970a3: Pull complete
1efc1fdb38f7: Pull complete
41498acf7408: Pull complete
663c64010fc2: Download complete
663c64010fc2: Pull complete
6123eca03eff: Pull complete
7a283e294632: Pull complete
9647196b2478: Pull complete
bdfaf9dd363f: Pull complete
834bb0ee027a: Pull complete
Digest: sha256:451d6be1807060e3e026afcaf7efaf56eb294cbb8c11ddaa7158cb19d0994687
Status: Downloaded newer image for $DOCKER_HUB_ID/$DOCKER_REPO:amxmodx-tfc-1-9-0-5271
---> 1834dce756e8
Step 2/49 : COPY "orpheu-files-2.6.3/" "/home/steam/tfc-server/tfc/addons/amxmodx/"
---> aa2296d28bba
Step 3/49 : COPY "serverdatabase-fork/" "/home/steam/amxmodx-plugins/ServerDatabase"
---> 031b343b9086
Step 4/49 : RUN cp "/home/steam/amxmodx-plugins/ServerDatabase/ServerDatabase.sma" "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/"
---> Running in 24d3f96e2279
Removing intermediate container 24d3f96e2279
---> d0ec38b2983a
Step 5/49 : RUN cp "/home/steam/amxmodx-plugins/ServerDatabase/hlstriker_server_db.inc" "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/include/"
---> Running in 8fe5e47d73d9
Removing intermediate container 8fe5e47d73d9
---> 5bb1abdff852
Step 6/49 : WORKDIR "/home/steam/tfc-server/tfc/addons/amxmodx/scripting"
---> Running in 74278fdec036
Removing intermediate container 74278fdec036
---> 64b5534a5dfa
Step 7/49 : RUN "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/amxxpc" "ServerDatabase.sma"
---> Running in 9d4a0919a30a
/bin/sh: 1: /home/steam/tfc-server/tfc/addons/amxmodx/scripting/amxxpc: Exec format error
The command '/bin/sh -c "/home/steam/tfc-server/tfc/addons/amxmodx/scripting/amxxpc" "ServerDatabase.sma"' returned a non-zero code: 126
2023-12-07T21:46:33.272799398Z stdout P
Hey @Theodora Boudale, thank you for reaching out.
It looks like you're new here. Sign in or register to get started.