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

feat: add devcontainers #7

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

carlosthe19916
Copy link
Member

This PR adds Devcontainers so developers can have a "ready to use" environment based on Ubuntu and with all configuration prepared for Playwright.

As described by https://github.com/trustification/trustify-ui-tests/blob/main/DEVELOPING.md if you have Fedora then you might find certain limitations. Personally I didn't find any so far but the use cases I had might have been basic I guess. So this should help scenarios where Ubuntu (supported OS for Playwright) is needed.

I personally find Devcontainers very useful and I tend to use it everywhere but I am not sure if others will find it useful. I am sharing it here as an alternative to https://github.com/trustification/trustify-ui-tests/blob/main/DEVELOPING.md . If people find it useful we can use it in other projects too but let's start here.

@mrrajan as you created DEVELOPING.md describing the limitations of OS like Fedora, perhaps you could review this PR and validate whether or not it works also for you :)

@carlosthe19916 carlosthe19916 requested a review from mrrajan January 3, 2025 21:28
Copy link
Contributor

@mrrajan mrrajan left a comment

Choose a reason for hiding this comment

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

Thanks for adding this @carlosthe19916 It is a great addition to have on our repository. I have added a clarification and a addition on README.md. Please let me know your thoughts.

While building the devcontainer I am getting an error
image

I have updated the extension settings
image
podman sockets are configured as well
image
Please let me know if I am missing anything.


- `Dev › Containers: Docker Compose Path` set `podman-compose`
- `Dev › Containers: Docker Path` set `podman`
- `Dev › Containers: Docker Socket Path` set `/run/podman/podman.sock`
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please add a step on running a devcontainer in vscode like "ctrl+shift+p" to open command palette and enter "Dev Containers: Rebuild and Reopen in Container"

Copy link
Member Author

Choose a reason for hiding this comment

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

Added, thanks

},
"onCreateCommand": "npx playwright install-deps && npx playwright install",
"postCreateCommand": "npm ci",
"postStartCommand": "echo \"source /usr/share/bash-completion/completions/git\" >> ~/.bashrc",
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure why we needed the git completion on bash.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've removed it.

@carlosthe19916
Copy link
Member Author

I still cannot reproduce the error but I will try to.

Note: it took me some time to configure it to work with Podman as Docker is the default choice. There might be something I might be missing definitely.

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.

2 participants