From 786a97aaa083293c7dd44bbca4d4117bd5faa1c2 Mon Sep 17 00:00:00 2001 From: Klaas van Schelven Date: Fri, 4 Apr 2025 11:41:45 +0200 Subject: [PATCH] Rename Dockerfile to Dockerfile.fromwheel See #68 for discussion (which is summarized at the top of the Dockerfile) --- Dockerfile => Dockerfile.fromwheel | 12 ++++++++++++ builddocker.bash | 2 +- buildxdocker.bash | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) rename Dockerfile => Dockerfile.fromwheel (67%) diff --git a/Dockerfile b/Dockerfile.fromwheel similarity index 67% rename from Dockerfile rename to Dockerfile.fromwheel index b8c9cf1..c998d1c 100644 --- a/Dockerfile +++ b/Dockerfile.fromwheel @@ -1,3 +1,15 @@ +# This is the Dockerfile that builds an image given a specified WHEEL_FILE, +# rather than from source/working dir. +# +# The reason for this is that, although Bugsink is certainly available as a +# Docker image, it is available as a Python package first. We thus want +# the Docker image to be as faithful as possible to the Python package. +# +# Because the typical expectation for a Dockerfile is that it "just works" +# and that it builds from source (the working directory), the present file +# is not named Dockerfile, but an explicitly postfixed one. Still, for the +# purpose of what actually ends up on Docker hub, the present file is the +# one that's used. ARG PYTHON_VERSION=3.12 # Build image: non-slim, in particular to build the mysqlclient wheel diff --git a/builddocker.bash b/builddocker.bash index 4e911da..3363228 100755 --- a/builddocker.bash +++ b/builddocker.bash @@ -26,4 +26,4 @@ else fi -docker build --build-arg WHEEL_FILE=$WHEEL_FILE $TAGS . +docker build -f Dockerfile.fromwheel --build-arg WHEEL_FILE=$WHEEL_FILE $TAGS . diff --git a/buildxdocker.bash b/buildxdocker.bash index 00d99a6..c69cf31 100755 --- a/buildxdocker.bash +++ b/buildxdocker.bash @@ -26,4 +26,4 @@ else fi -docker buildx build --platform linux/amd64,linux/arm64 --build-arg WHEEL_FILE=$WHEEL_FILE $TAGS . --push +docker buildx build -f Dockerfile.fromwheel --platform linux/amd64,linux/arm64 --build-arg WHEEL_FILE=$WHEEL_FILE $TAGS . --push