Created
February 6, 2020 20:43
-
-
Save ryanwoodsmall/d0c3146f48d7e7a65e0fdaca480d7056 to your computer and use it in GitHub Desktop.
32-64-dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM i386/centos:7 | |
#FROM centos:7 | |
RUN \ | |
uname -m | sed 's/^/buildhost: /g' \ | |
&& echo '#!/bin/bash' > /entrypoint.sh \ | |
&& if $(bash -c 'set | grep ^HOSTTYPE= | cut -f2 -d=' | grep -q '86$') ; then \ | |
echo 'this is x86' \ | |
&& echo 'linux32 "${@}"' >> /entrypoint.sh ; \ | |
else \ | |
echo 'this is x86_64' \ | |
&& echo 'linux64 "${@}"' >> /entrypoint.sh ; \ | |
fi \ | |
&& chmod 755 /entrypoint.sh \ | |
&& echo done | |
ENTRYPOINT ["/entrypoint.sh"] | |
CMD ["bash","-il"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment