Skip to content

Introduce devcontainer service container based development environment (#705)#706

Open
bedrich-schindler wants to merge 16 commits intomasterfrom
task/705
Open

Introduce devcontainer service container based development environment (#705)#706
bedrich-schindler wants to merge 16 commits intomasterfrom
task/705

Conversation

@bedrich-schindler
Copy link
Copy Markdown
Contributor

All development is now done inside the container named devcontainer which contains all necessary tools and dependencies. The devcontainer orchestrates other service containers behind the scenes via Docker-from-Docker. Other containers are implementation details and should not be accessed directly.

This is breaking change commit for development environment, so it is required to remove all the env files and start with fresh one.

There are two supported ways to access the development environment. Recommended way is to use Development Containers with an IDE. The alternative is to use Docker Compose directly. Local development is officially no more supported.

What more, documentation of contribution and CLAUDE.md was updated to match with the changes.


Closes #705

…ent (#705)

All development is now done inside the container named `devcontainer`
which contains all necessary tools and dependencies. The devcontainer
orchestrates other service containers behind the scenes
via Docker-from-Docker. Other containers are implementation details
and should not be accessed directly.

This is breaking change commit for development environment,
so it is required to remove all the env files and start with
fresh one.

There are two supported ways to access the development environment.
Recommended way is to use Development Containers with an IDE.
The alternative is to use Docker Compose directly. Local development
is officially no more supported.

What more, documentation of contribution and CLAUDE.md was updated
to match with the changes.
Comment thread docker/react_ui_devcontainer/files/usr/local/bin/mkdocs
Comment thread .devcontainer/devcontainer.json
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the repo’s development workflow to a single devcontainer-centric environment that orchestrates supporting service containers via Docker-from-Docker, updating scripts, Compose files, and contributor docs accordingly.

Changes:

  • Add a devcontainer image (with wrapper CLIs) and new Compose layout (docker-compose.base.yml + generated docker-compose.yml).
  • Introduce setup.sh + docker/build-docker-images.sh to generate config files and build images.
  • Consolidate Playwright configuration into .env and update contribution/testing documentation.

Reviewed changes

Copilot reviewed 16 out of 25 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
tests/playwright/env/parseDotEnvFile.ts Switch Playwright env parsing from .env.playwright to .env.
src/docs/contribute/testing-guidelines.md Update test-running guidance for the new container-agnostic workflow.
src/docs/contribute/general-guidelines.md Rewrite development environment docs around the devcontainer model.
setup.sh New host-side setup script to generate .env and docker-compose.yml and build images.
package.json Remove postinstall env-file bootstrap.
docker/react_ui_devcontainer_local/Dockerfile.dist Add template for locally extending the devcontainer image.
docker/react_ui_devcontainer/files/usr/local/bin/* Add wrapper scripts (npm/node/npx/mkdocs + AI tool shims) to route commands into service containers.
docker/react_ui_devcontainer/files/usr/local/bin/docker-entrypoint Add entrypoint that runs fixuid and home ownership setup.
docker/react_ui_devcontainer/files/home/developer/shell-init.sh Add SSH-agent forwarding blocking helper.
docker/react_ui_devcontainer/Dockerfile Add new devcontainer image build.
docker/build-docker-images.sh Add helper to build the devcontainer image and compose services.
docker-compose.yml.dist Add dist template for generated docker-compose.yml.
docker-compose.yml Remove old compose file (now generated).
docker-compose.base.yml Add new base compose defining devcontainer + node/playwright/docs services.
CLAUDE.md Update assistant guidance to assume devcontainer usage.
.gitignore Ignore generated compose + local devcontainer customization dir; stop ignoring .env.playwright.
.env.playwright.dist Remove dedicated Playwright env template.
.env.dist Expand .env.dist to include compose/devcontainer + Playwright settings.
.devcontainer/devcontainer.json Add Dev Container configuration to bootstrap via setup.sh.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/docs/contribute/general-guidelines.md
Comment thread src/docs/contribute/testing-guidelines.md Outdated
Comment thread src/docs/contribute/testing-guidelines.md Outdated
Comment thread setup.sh Outdated
Comment thread setup.sh
Comment thread docker/react_ui_devcontainer/Dockerfile Outdated
Comment thread docker/react_ui_devcontainer/Dockerfile Outdated
Comment thread docker-compose.base.yml Outdated
Comment thread docker/react_ui_devcontainer/Dockerfile Outdated
Comment thread docker/react_ui_devcontainer_local/Dockerfile.dist Outdated
Comment thread docker/react_ui_devcontainer/files/home/developer/shell-init.sh
Comment thread docker/react_ui_devcontainer/files/usr/local/bin/docker-entrypoint
Comment thread docker/build-docker-images.sh
Comment thread .env.dist
bedrich-schindler and others added 2 commits March 27, 2026 16:04
…nvironment (#705)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 25 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker-compose.base.yml
Comment thread docker/build-docker-images.sh
Comment thread src/docs/contribute/testing-guidelines.md Outdated
Comment thread CLAUDE.md Outdated
…rvice container based development environment (#705)
…ner` service container based development environment (#705)
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 27, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://react-ui-org.github.io/react-ui/pr-preview/pr-706/

Built to branch gh-pages at 2026-04-21 12:25 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 25 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker/react_ui_devcontainer/Dockerfile
Comment thread setup.sh
Comment thread docker-compose.base.yml Outdated
Comment thread setup.sh
Comment on lines +101 to +102
# Build Docker images
sh ./docker/build-docker-images.sh
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup.sh always rebuilds Docker images (docker/build-docker-images.sh) even when .env and docker-compose.yml already exist. In Dev Container workflows, initializeCommand can run frequently, so this can add significant repeated startup time. Consider making image builds conditional (e.g., only on first setup, or behind a flag like --build, or when relevant inputs change).

Suggested change
# Build Docker images
sh ./docker/build-docker-images.sh
# Build Docker images (can be skipped by setting SKIP_DOCKER_BUILD=1)
if [ "${SKIP_DOCKER_BUILD:-0}" != "1" ]; then
echo "Building Docker images..."
sh ./docker/build-docker-images.sh
else
echo "Skipping Docker image build because SKIP_DOCKER_BUILD=1"
fi

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamkudrna, speaking of this. We can have a check as in WECL (internal project) that checks if image exists or not and skip it if yes. But in case the image changes, user may end up with out-of-date image. So for first phase of dev containers, I've left it without condition so it is build every time. BUT - image is cached, so it is quick as it is loaded from cache.

This is because we allow users to locally extend Dockerfile. It would not be possible without built Docker image.

There are way to solve it for sure, but I spent a lot of time on devcontainers so this is where I chose compromise.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with your approach. Docker images and container layers are cached, so it shouldn't take long to hook up the environment. And we prefer being up-to-date over fast startups, at least at the time being.

⚠️ BUT — there is something that is being downloaded each time the dev container starts. Its size is over 1 GB so it takes time. I am not sure what it is, maybe it's even JetBrains specific, but I'd try to fix it:

Snímek obrazovky 2026-03-30 v 12 42 04

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not have answers yet. This is not an issue with VS Code and it is not happening in WebStorm as well. Do you use Mount Sources or Clone Sources?

image

Clone Sources is not working for me in any repo and JetBrains team stopped responding to my ticket. But Mount Sources in 2026.1 does not have the issue you mention.

My guess is that they are publishing IDE backends instantly, so it might get downloaded every time they publish new version of IDE Backend. But it is just guess. It is probably up to you, I am sorry.

I think that this is not related to this PR, so I suggest closing it here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamkudrna, any update?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamkudrna, any update (again)?

Comment thread setup.sh
Comment thread docker/build-docker-images.sh
…vcontainer` service container based development environment (#705)
Comment thread src/docs/contribute/general-guidelines.md Outdated
@adamkudrna adamkudrna added the claude Ask Claude to perform code review. label Apr 1, 2026
Copy link
Copy Markdown
Member

@adamkudrna adamkudrna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a lot of comments, but I really like it! You have done a great job 👏🏻.

Comment thread docker/react_ui_devcontainer/files/home/developer/shell-init.sh
Comment thread docker/react_ui_devcontainer/files/usr/local/bin/copilot
Comment thread docker/react_ui_devcontainer/files/usr/local/bin/mkdocs
Comment thread docker/react_ui_devcontainer/files/usr/local/bin/mkdocs
Comment thread src/docs/contribute/testing-guidelines.md
Comment thread .env.dist
Comment thread .env.dist
Comment thread src/docs/contribute/general-guidelines.md
Comment thread docker-compose.base.yml
Comment thread setup.sh
@adamkudrna adamkudrna removed the claude Ask Claude to perform code review. label Apr 1, 2026
Copy link
Copy Markdown
Member

@adamkudrna adamkudrna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are a few points by Claude. I believe they are relevant.

(Once you rebase the branch, we can try asking Claude to do CR right here, just by adding the claude label.)

Comment thread setup.sh Outdated
Comment thread docker/react_ui_devcontainer/Dockerfile Outdated
Comment thread docker-compose.base.yml Outdated
Comment thread src/docs/contribute/general-guidelines.md Outdated
Comment thread .env.dist Outdated
…uce `devcontainer` service container based development environment (#705)
… Introduce `devcontainer` service container based development environment (#705)
… !fixup Introduce `devcontainer` service container based development environment (#705)
@bedrich-schindler
Copy link
Copy Markdown
Contributor Author

@claude make code review.

… fixup! !fixup Introduce `devcontainer` service container based development environment (#705)
… fixup! fixup! !fixup Introduce `devcontainer` service container based development environment (#705)
… fixup! fixup! fixup! !fixup Introduce `devcontainer` service container based development environment (#705)
Comment thread src/docs/contribute/general-guidelines.md
All service containers mount the workspace at `/workspace` so that file changes
are shared.

## Automatic Service Bootstrap
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We spoke about this mode several times. I did my best to solve it fast and easy.

I added this section together with designated scripts. I tried to craft it with Claude as much as I can to be simple, covering as most cases as I can. Hope that documentation emphasize that this is for experienced users only and if it causes some problems, lets turn it off, restart container and continue without it.

But unless new deps are installed, it should work a pretty good and it also make sure on startup that your deps are up to date! Personally, I sometimes forget to update them and for example Playwright might result in incorrect snapshots.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread setup.sh
Comment on lines +101 to +102
# Build Docker images
sh ./docker/build-docker-images.sh
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamkudrna, any update (again)?

… fixup! fixup! fixup! fixup! !fixup Introduce `devcontainer` service container based development environment (#705)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce development containers

4 participants