-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add multi platform image build to release workflow (#2)
- Loading branch information
1 parent
d045c16
commit 18c512f
Showing
9 changed files
with
94 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
ARG SERVER_ARCH=$SERVER_ARCH | ||
ARG IMAGE_REPO=${SERVER_ARCH}/debian | ||
ARG IMAGE_VER=bullseye-slim | ||
|
||
FROM ${IMAGE_REPO}:${IMAGE_VER} | ||
FROM debian:bullseye-slim | ||
|
||
RUN apt update && apt upgrade -y | ||
|
||
# Install apt-server | ||
COPY dist/*.deb /etc/apt-server/ | ||
RUN apt install -y /etc/apt-server/*.deb | ||
|
||
ARG CLIENT_ARCH=$CLIENT_ARCH | ||
ENV ARCHITECTURES=${CLIENT_ARCH} | ||
# Copy keys | ||
COPY tests/keys/* /etc/apt-server/keys/ | ||
|
||
# Set package architectures | ||
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 \ | ||
--architectures ${ARCHITECTURES} \ | ||
--release-template /opt/venvs/apt-server/templates/Release.template \ | ||
--signing-key-path /opt/venvs/apt-server/.gnupg/private-key.asc \ | ||
--public-key-path /opt/venvs/apt-server/.gnupg/public-key.asc | ||
--port 80 --architectures ${ARCHITECTURES} \ | ||
--private-key-path /etc/apt-server/keys/private-key.asc \ | ||
--public-key-path /etc/apt-server/keys/public-key.asc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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.5 | ||
Standards-Version: 3.9.2 | ||
|
||
Package: apt-server | ||
Architecture: all | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[Unit] | ||
Description=APT Server Container | ||
After=docker.service | ||
Requires=docker.service | ||
StartLimitIntervalSec=0 | ||
|
||
[Service] | ||
Type=simple | ||
Restart=always | ||
RestartSec=10 | ||
TimeoutStartSec=0 | ||
ExecStartPre=-/usr/bin/docker pull effectiverange/apt-server:latest | ||
ExecStart=/usr/bin/docker run --net=host --name=apt-server -v /opt/debs:/opt/debs -v /var/log/effective-range/apt-server:/var/log/effective-range/apt-server effectiverange/apt-server:latest | ||
ExecStop=/usr/bin/docker kill apt-server | ||
ExecStopPost=/usr/bin/docker rm apt-server | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters