-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): build and publish docker image
- Loading branch information
Showing
2 changed files
with
63 additions
and
33 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,40 +1,20 @@ | ||
FROM python:3.8-buster AS builder | ||
RUN apt-get -yq update \ | ||
&& apt-get -yq --no-install-suggests --no-install-recommends install \ | ||
git \ | ||
&& apt-get clean | ||
COPY . /src | ||
RUN cd src && python3 setup.py bdist_wheel | ||
|
||
FROM wakemeops/debian:bookworm | ||
|
||
FROM debian:buster AS base | ||
ARG WHEEL2DEB_PATH="dist/wheel2deb" | ||
COPY ${WHEEL2DEB_PATH} /usr/local/bin/wheel2deb | ||
|
||
RUN dpkg --add-architecture armhf \ | ||
&& apt-get -yq update \ | ||
&& apt-get -yq --no-install-suggests --no-install-recommends install \ | ||
libc6:armhf \ | ||
binutils-arm-linux-gnueabihf \ | ||
RUN install_packages \ | ||
build-essential \ | ||
debhelper \ | ||
devscripts \ | ||
fakeroot \ | ||
lintian \ | ||
apt-file \ | ||
python3-distutils \ | ||
python3-apt \ | ||
curl \ | ||
&& apt-get clean | ||
|
||
RUN curl -nSL https://bootstrap.pypa.io/get-pip.py > /tmp/get-pip.py \ | ||
&& chmod +x /tmp/get-pip.py \ | ||
&& python3 /tmp/get-pip.py \ | ||
&& rm /tmp/get-pip.py | ||
|
||
RUN pip3 install --no-cache-dir pytest pytest-cov | ||
debhelper \ | ||
binutils-arm-linux-gnueabihf \ | ||
binutils-aarch64-linux-gnu \ | ||
git \ | ||
ca-certificates \ | ||
apt-file | ||
|
||
COPY --from=builder /src/dist/*.whl / | ||
RUN pip3 install --no-cache-dir /*.whl && rm /*.whl | ||
RUN dpkg --add-architecture armhf \ | ||
dpkg --add-architecture arm64 | ||
|
||
VOLUME /data | ||
WORKDIR /data | ||
ENTRYPOINT ["wheel2deb"] | ||
USER 1000 |