Clean up multiarch Docker setup

Remove jq as it is no longer needed, and add warnings to the Dockerfiles meant for Docker Hub.
This commit is contained in:
Marius Lindvall 2019-12-07 23:18:10 +01:00
parent fc6eed091b
commit 8179836e8d
4 changed files with 52 additions and 3 deletions

View File

@ -1,3 +1,20 @@
#------------------------------------------------------------------------------#
# DO NOT BUILD THIS FILE DIRECTLY! #
#------------------------------------------------------------------------------#
# This Dockerfile is for automated builds on Docker Hub only. If you want to #
# build the Hauk backend for x86_64, you should instead build the main #
# Dockerfile in the root of the repository on an x86_64-capable CPU. #
# #
# If you want to cross-compile Hauk for x86_64 on a non-x86_64 CPU, and you #
# are absolutely certain that you know what you are doing and that this is #
# what you want to do: you must have qemu-user-static binaries installed and #
# registered on your build system. #
# #
# Then change the FROM instruction in the root Dockerfile (NOT *this* file) so #
# that it pulls amd64/php:apache instead of php:apache to ensure you fetch #
# Apache and PHP from upstream for the right architecture. #
#------------------------------------------------------------------------------#
FROM amd64/php:apache
COPY backend-php/ /var/www/html/
COPY frontend/ /var/www/html/

View File

@ -1,3 +1,20 @@
#------------------------------------------------------------------------------#
# DO NOT BUILD THIS FILE DIRECTLY! #
#------------------------------------------------------------------------------#
# This Dockerfile is for automated builds on Docker Hub only. If you want to #
# build the Hauk backend for armv7l, you should instead build the main #
# Dockerfile in the root of the repository on an armv7l-capable CPU. #
# #
# If you want to cross-compile Hauk for armv7l on a non-armv7l CPU, and you #
# are absolutely certain that you know what you are doing and that this is #
# what you want to do: you must have qemu-user-static binaries installed and #
# registered on your build system. #
# #
# Then change the FROM instruction in the root Dockerfile (NOT *this* file) so #
# that it pulls arm32v7/php:apache instead of php:apache to ensure you fetch #
# Apache and PHP from upstream for the right architecture. #
#------------------------------------------------------------------------------#
FROM arm32v7/php:apache
COPY qemu-arm-static /usr/bin
COPY backend-php/ /var/www/html/

View File

@ -1,3 +1,20 @@
#------------------------------------------------------------------------------#
# DO NOT BUILD THIS FILE DIRECTLY! #
#------------------------------------------------------------------------------#
# This Dockerfile is for automated builds on Docker Hub only. If you want to #
# build the Hauk backend for aarch64, you should instead build the main #
# Dockerfile in the root of the repository on an aarch64-capable CPU. #
# #
# If you want to cross-compile Hauk for aarch64 on a non-aarch64 CPU, and you #
# are absolutely certain that you know what you are doing and that this is #
# what you want to do: you must have qemu-user-static binaries installed and #
# registered on your build system. #
# #
# Then change the FROM instruction in the root Dockerfile (NOT *this* file) so #
# that it pulls arm64v8/php:apache instead of php:apache to ensure you fetch #
# Apache and PHP from upstream for the right architecture. #
#------------------------------------------------------------------------------#
FROM arm64v8/php:apache
COPY qemu-aarch64-static /usr/bin
COPY backend-php/ /var/www/html/

View File

@ -3,8 +3,6 @@
# Set up QEMU for cross compilation
apt -y update
apt -y --only-upgrade install docker-ee
apt -y install qemu-user-static jq
apt -y install qemu-user-static
cp /usr/bin/qemu-*-static .
# Register QEMU
docker run --rm --privileged multiarch/qemu-user-static:register --reset