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

Workaround to mount docker.sock #1505

Merged
merged 3 commits into from
Feb 8, 2022
Merged

Workaround to mount docker.sock #1505

merged 3 commits into from
Feb 8, 2022

Conversation

diemol
Copy link
Member

@diemol diemol commented Feb 7, 2022

Thanks for contributing to the Docker-Selenium project!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines, applied for this repository.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

This PR enables users to mount docker.sock for the Dynamic Grid. It is using sudo and socat under the hood, so it is not ideal, but it was the path with the least amount of changes. It is expected to present issues in some restricted environments (no sudo allowed), but the idea is to iterate on the feature.

Fixes #1430

Motivation and Context

Some users cannot configurate in a simple way tcp for docker, so this is a way to simplify usage,

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@diemol
Copy link
Member Author

diemol commented Feb 7, 2022

Command in Windows

docker run --rm --name selenium-docker -p 4444:4444 `
    -v ${PWD}/NodeDocker/config.toml:/opt/bin/config.toml `
    -v ${PWD}/assets:/opt/selenium/assets `
    -v /var/run/docker.sock:/var/run/docker.sock `
    selenium/standalone-docker:4.1.3-beta-20220207

@diemol
Copy link
Member Author

diemol commented Feb 7, 2022

Linux/macOS

docker run --rm --name selenium-docker -p 4444:4444 \
    -v ${PWD}/NodeDocker/config.toml:/opt/bin/config.toml \
    -v ${PWD}/assets:/opt/selenium/assets \
    -v /var/run/docker.sock:/var/run/docker.sock \
    selenium/standalone-docker:4.1.2-20220131

@diemol diemol merged commit 459ebc2 into trunk Feb 8, 2022
@diemol diemol deleted the docker-sock branch February 8, 2022 09:29
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.

[🚀 Feature]: Being able to use docker.sock instead of the tcp API with Dynamic Grid
1 participant