garris / garris/BackstopJS

Docker command template

Open
#1,078 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
621
PR merge metrics
No merged PRs in 30d

Description

IMHO default docker command template is incorrect. Current template in version 4.1.12 is
```sh
docker run --rm -it --mount type=bind,source="{cwd}",target=/src backstopjs/backstopjs:{version} {backstopCommand} {args}
```
This template generate the following command:
```sh
docker run --rm -it --mount type=bind,source="/project_dir",target=/src backstopjs/backstopjs:4.1.12 test "--moby" "--network" "host"
```
In order to properly define `--network host` the docker command template needs to look like this:
```sh
docker run --rm -it --mount type=bind,source="{cwd}",target=/src --network host backstopjs/backstopjs:{version} {backstopCommand} {args}
```
With this docker command template, we can access running storybook instances on the host. Before this is resolved people can override the default docker command template by setting `dockerCommandTemplate` in backstop configuration file.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.