From 22677bfe18623948ca14f541b6dbdc08f831f020 Mon Sep 17 00:00:00 2001 From: AttilaGombosER Date: Sun, 16 Jun 2024 18:06:43 +0200 Subject: [PATCH] Fix Dockerfile (#6) --- Dockerfile | 4 ++-- Makefile | 4 ++-- debian/control | 2 +- debian/rules | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index b13a708..c1fb3ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ RUN apt update && apt upgrade -y # Install apt-server COPY dist/*.deb /etc/apt-server/ RUN apt install -y /etc/apt-server/*.deb +ENV PATH="/opt/venvs/apt-server/bin:$PATH" # Copy keys COPY tests/keys/* /etc/apt-server/keys/ @@ -14,7 +15,6 @@ ARG PACKAGE_ARCHS=$PACKAGE_ARCHS ENV ARCHITECTURES=${PACKAGE_ARCHS} # Start apt-server -CMD /opt/venvs/apt-server/bin/python3 /opt/venvs/apt-server/bin/apt-server.py \ ---port 80 --architectures ${ARCHITECTURES} \ +CMD apt-server.py --port 80 --architectures ${ARCHITECTURES} \ --private-key-path /etc/apt-server/keys/private-key.asc \ --public-key-path /etc/apt-server/keys/public-key.asc diff --git a/Makefile b/Makefile index 3f2af56..38c299f 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ IMG_TAG=latest PACKAGE_ARCHS=armhf,arm64,amd64 ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) -.PHONY: clean package build-image +.PHONY: clean package image clean: rm -rf build dist *.egg-info @@ -13,5 +13,5 @@ package: apt-get update && apt-get install -y build-essential debhelper devscripts equivs dh-virtualenv python3-virtualenv dpkg-buildpackage -us -ui -uc --buildinfo-option=-udist --buildinfo-option=-Odist/apt-server.buildinfo --changes-option=-udist --changes-option=-Odist/apt-server.changes -build-image: +image: docker build $(ROOT_DIR) --file Dockerfile --tag effectiverange/apt-server$(:)$(IMG_TAG) --build-arg PACKAGE_ARCHS=$(PACKAGE_ARCHS) diff --git a/debian/control b/debian/control index b0f1999..dda02c7 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: python Priority: extra Maintainer: Effective Range Build-Depends: debhelper (>= 9), python3, dh-virtualenv (>= 0.8) -Standards-Version: 3.9.2 +Standards-Version: 3.11 Package: apt-server Architecture: all diff --git a/debian/rules b/debian/rules index 67cf0c6..94f45e1 100755 --- a/debian/rules +++ b/debian/rules @@ -8,4 +8,4 @@ override_dh_builddeb: dh_builddeb $@ --destdir=$(ARTIFACTS_DIR) -- -Zgzip %: - dh $@ --with python-virtualenv --python `which python3` + dh $@ --with python-virtualenv --python python3