diff --git a/Dockerfile b/Dockerfile index feb5658..0b2ae89 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ RUN apt-get update && \ ## Copy project files needed by hatch COPY README.md pyproject.toml ./ -COPY guacamole_user_sync guacamole_user_sync +COPY guacamole_user_sync/*.py guacamole_user_sync/ ## Build wheels for dependencies then use auditwheel to include shared libraries ## Note that we need to specify psycopg[c] in order to ensure that dependencies are included in the wheel @@ -38,13 +38,16 @@ RUN /root/.local/bin/hatch run pip freeze | grep -v "^-e" > requirements.txt && mkdir -p /app/wheels && \ for WHEEL in /app/repairable/*.whl; do \ auditwheel repair --wheel-dir /app/wheels --plat manylinux_2_34_aarch64 "${WHEEL}" 2> /dev/null || mv "${WHEEL}" /app/wheels/; \ - done; + done && \ + rm -rf /app/repairable && \ + ls -alh /app/wheels/; ## Build a separate pip wheel which can be used to install itself RUN python -m pip wheel --no-cache-dir --wheel-dir /app/wheels pip && \ mv /app/wheels/pip*whl /app/wheels/pip-0-py3-none-any.whl ## Build a separate wheel for the project +COPY guacamole_user_sync guacamole_user_sync RUN /root/.local/bin/hatch build -t wheel && \ mv dist/guacamole_user_sync*.whl /app/wheels/ && \ echo "guacamole-user-sync>=0.0" >> requirements.txt