Skip to content

fix(devcontainers): replace broken packages, improve usability#12029

Open
JonAnCla wants to merge 2 commits into
ibis-project:mainfrom
JonAnCla:devcontainer-improvements
Open

fix(devcontainers): replace broken packages, improve usability#12029
JonAnCla wants to merge 2 commits into
ibis-project:mainfrom
JonAnCla:devcontainer-improvements

Conversation

@JonAnCla

Copy link
Copy Markdown
Contributor

Description of changes

I've found devcontainers to be particularly useful for local development with AI tools (to reduce risk of them doing something damaging or exfiltrating other files on your system)

In trying to use the existing devcontainer config in ibis, I found following issues:

  • openjdk-17-jdk is not present on base python image
  • file edits made within container were not reflected back to the host
  • RUN chown ... command is very slow
  • duckdb-cli feature no longer builds with duckdb 1.5.x version

Changes below were made (I guided Claude) to address the above

Dockerfile

  • Replace openjdk-17-jdk with default-jdk so the correct JDK is selected regardless of the underlying Debian version.
  • Move the venv from /app/.venv to /opt/venv (via ENV VIRTUAL_ENV=/opt/venv). Because /opt/venv is outside the workspace mount point, the venv survives the bind-mount and remains usable at runtime. The editable ibis install inside the venv still points to /app, so it picks up live source changes from the host.
  • Use COPY --chown=$USERNAME . /app to set file ownership in a single pass, replacing the separate RUN chown -R $USERNAME /app step.
  • Remove the no-op SHELL ["/bin/bash", "-c", "source .venv/bin/activate"] directive — SHELL only affects subsequent RUN instructions during the build; it does not activate the venv at container runtime.
  • Remove the now-redundant VENV_DIR and IBIS_PROJECT env vars.

devcontainer.json

  • Add an explicit workspaceMount so the host workspace is always bind-mounted to /app, in both local VS Code and Codespaces.
  • Remove duckdb-cli devcontainer feature as it no longer builds

Thanks!

- openjdk-17-jdk not present on base python image
- file edits made within container not reflected back to the host
- COPY + RUN chown commands slow
- remove duckdb-cli feature which no longer builds with duckdb 1.5.x version
@JonAnCla

Copy link
Copy Markdown
Contributor Author

sorry for typo in title (fic should be fix)
:(

@deepyaman deepyaman changed the title fic(devcontainers): replace broken packages, improve usability fix(devcontainers): replace broken packages, improve usability Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant