Skip to content

Commit

Permalink
Fix Dockerfile (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
AttilaGombosER authored Jun 16, 2024
1 parent 704d411 commit 22677bf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Section: python
Priority: extra
Maintainer: Effective Range <[email protected]>
Build-Depends: debhelper (>= 9), python3, dh-virtualenv (>= 0.8)
Standards-Version: 3.9.2
Standards-Version: 3.11

Package: apt-server
Architecture: all
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 22677bf

Please sign in to comment.