This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git


The following commit(s) were added to refs/heads/main by this push:
     new cc1f662  Remove container build arguments and allow setting custom 
image names
cc1f662 is described below

commit cc1f6623915ac5a14d6114309e9ea887292aca6d
Author: Sean B. Palmer <s...@miscoranda.com>
AuthorDate: Thu Apr 3 19:47:29 2025 +0100

    Remove container build arguments and allow setting custom image names
---
 Dockerfile.alpine    | 2 --
 Dockerfile.ubuntu    | 2 --
 Makefile             | 5 +++--
 scripts/poetry/build | 5 ++++-
 start-atr.sh         | 1 +
 5 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/Dockerfile.alpine b/Dockerfile.alpine
index 3cdd162..7bd17eb 100644
--- a/Dockerfile.alpine
+++ b/Dockerfile.alpine
@@ -31,8 +31,6 @@ RUN make sync
 # final image
 FROM python:3.13.2-alpine3.21
 
-ARG BIND=127.0.0.1:4443
-ENV BIND=${BIND}
 ARG SCRIPTS=scripts/poetry
 ENV SCRIPTS=${SCRIPTS}
 
diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu
index bdfe3fd..d47c518 100644
--- a/Dockerfile.ubuntu
+++ b/Dockerfile.ubuntu
@@ -39,8 +39,6 @@ RUN make sync PYTHON="$(find /usr/bin -name python3.13 | head 
-n 1)"
 # final image
 FROM ubuntu:24.04
 
-ARG BIND=127.0.0.1:4443
-ENV BIND=${BIND}
 ARG SCRIPTS=scripts/poetry
 ENV SCRIPTS=${SCRIPTS}
 
diff --git a/Makefile b/Makefile
index 2fc3654..ac0e0f8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
 .PHONY: build build-alpine build-ubuntu certs check docs generate-version 
obvfix report run stop serve sync sync-dev
 
 BIND ?= 127.0.0.1:8080
+IMAGE ?= tooling-trusted-release
 PYTHON ?= $(which python3)
 SCRIPTS ?= scripts/poetry
 
@@ -9,10 +10,10 @@ GET_VERSION = $($(SCRIPTS)/run python atr/metadata.py)
 build: build-alpine
 
 build-alpine:
-       $(SCRIPTS)/build Dockerfile.alpine
+       $(SCRIPTS)/build Dockerfile.alpine $(IMAGE)
 
 build-ubuntu:
-       $(SCRIPTS)/build Dockerfile.ubuntu
+       $(SCRIPTS)/build Dockerfile.ubuntu $(IMAGE)
 
 certs:
        if test ! -f state/cert.pem || test ! -f state/key.pem; \
diff --git a/scripts/poetry/build b/scripts/poetry/build
index ee396e3..aefc12d 100755
--- a/scripts/poetry/build
+++ b/scripts/poetry/build
@@ -1,4 +1,7 @@
 #!/bin/sh
 set -eu
+
 DOCKERFILE="${1:-Dockerfile.alpine}"
-docker build -t tooling-trusted-release --build-arg BIND=0.0.0.0:4443 -f 
"${DOCKERFILE}" .
+IMAGE="${2:-tooling-trusted-release}"
+
+docker build -t "${IMAGE}" -f "${DOCKERFILE}" .
diff --git a/start-atr.sh b/start-atr.sh
index 0bb8324..41987b1 100644
--- a/start-atr.sh
+++ b/start-atr.sh
@@ -11,5 +11,6 @@ then
   python3 scripts/generate-certificates
 fi
 
+echo "Starting hypercorn on ${BIND}" >> /var/log/hypercorn.log
 exec hypercorn --bind "${BIND}" \
   --keyfile key.pem --certfile cert.pem atr.server:app >> 
/var/log/hypercorn.log 2>&1


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@tooling.apache.org
For additional commands, e-mail: commits-h...@tooling.apache.org

Reply via email to