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

Ldap deps group #250

Merged
merged 2 commits into from
Jul 30, 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
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ FROM --platform=linux/amd64 ghcr.io/owl-corp/python-poetry-base:$python_version
RUN apt-get update && apt-get install --no-install-recommends -y libldap2-dev libsasl2-dev gcc && apt autoclean && rm -rf /var/lib/apt/lists/*

COPY pyproject.toml poetry.lock ./
RUN poetry install --without dev --no-root

# Only the LDAP group has deps that requires gcc, so only build that for now
RUN poetry install --only ldap --no-root

FROM --platform=linux/amd64 ghcr.io/owl-corp/python-poetry-base:$python_version

RUN apt-get update && apt-get install --no-install-recommends -y libmagickwand-dev && rm -rf /var/lib/apt/lists/*

# Install project dependencies
WORKDIR /app

# Copy the pre-built LDAP group from the build stage that required gcc
COPY --from=wheel-builder /opt/poetry/cache /opt/poetry/cache

# Install the rest of the dependencies
COPY pyproject.toml poetry.lock ./
RUN poetry install --without dev --no-root
RUN poetry install --without dev --with ldap --no-root

# Set Git SHA environment variable for Sentry
ARG git_sha="development"
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ pre-commit = "3.7.1"
ruff = "0.5.4"
taskipy = "1.13.0"

[tool.poetry.group.ldap]
optional = true
[tool.poetry.group.ldap.dependencies]
bonsai = "^1.5.3"

Expand Down