Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Dockerfile #6

Merged
merged 1 commit into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading