From 03ad894b7ae8a31ec7cb11b17b9c4a82e25b597a Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 12 Nov 2024 20:21:08 -0600 Subject: [PATCH] Add an image for installing from PyPI via pip --- .gitlab-ci.yml | 22 ++++++++++++++++++++++ Dockerfile.pypi | 5 +++++ 2 files changed, 27 insertions(+) create mode 100644 Dockerfile.pypi diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c83dd52..8eb6a91 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,6 +23,16 @@ lint-dockerfiles: rules: - when: always +test-pypi: + stage: test + script: + - docker pull $IMAGE_BASE/pypi || true + - docker build --cache-from $IMAGE_BASE/pypi --tag $IMAGE_BASE/pypi:$CI_COMMIT_SHA --tag $IMAGE_BASE/pypi:latest -f Dockerfile.pypi . + rules: + - if: $CI_COMMIT_BRANCH != "master" + changes: + - Dockerfile.pypi + test-debian: stage: test script: @@ -83,6 +93,18 @@ test-documentation: changes: - Dockerfile.documentation +build-pypi: + stage: build + script: + - docker pull $IMAGE_BASE/pypi || true + - docker build --cache-from $IMAGE_BASE/pypi --tag $IMAGE_BASE/pypi:$CI_COMMIT_SHA --tag $IMAGE_BASE/pypi:latest -f Dockerfile.pypi . + - docker push $IMAGE_BASE/pypi:$CI_COMMIT_SHA + - docker push $IMAGE_BASE/pypi:latest + rules: + - if: $CI_COMMIT_BRANCH == "master" + changes: + - Dockerfile.pypi + build-debian: stage: build script: diff --git a/Dockerfile.pypi b/Dockerfile.pypi new file mode 100644 index 0000000..0bc16a9 --- /dev/null +++ b/Dockerfile.pypi @@ -0,0 +1,5 @@ +FROM python:3.12 + +RUN apt-get update && DEBIAN_FRONTEND=noninteractive \ + apt-get install -y python3-dev libdbus-1-dev libegl1 libxkbcommon0 libnss3 libxcomposite1 libxdamage1 libxtst6 \ + libxi6 libasound2 libpulse0 xvfb