Skip to content

Commit 25f1d72

Browse files
committed
Support running x86_64 Docker from other platforms
Now that my primary machine has an M1 processor, I need to specify a different architecture. This shouldn't have any effect at runtime, other than being a bit more specific. It is a bit slower to do the emulation, so I'm also making the Capybara timeout adjustable via environment variable.
1 parent 62245b4 commit 25f1d72

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tests/spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
Capybara.default_driver = Capybara.javascript_driver = :firefox
5959
Capybara.app_host = "http://#{ADDRESS}:#{PORT}"
6060
Capybara.run_server = false
61-
Capybara.default_max_wait_time = 5
61+
Capybara.default_max_wait_time = ENV.fetch('CAPYBARA_WAIT', 5).to_f
6262
Capybara.automatic_label_click = true
6363

6464
Capybara::Screenshot.register_driver(:firefox) do |driver, path|

ui/src/sandbox.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,8 @@ macro_rules! docker_command {
439439
fn basic_secure_docker_command() -> Command {
440440
let mut cmd = docker_command!(
441441
"run",
442+
"--platform",
443+
"linux/amd64",
442444
"--detach",
443445
"--cap-drop=ALL",
444446
// Needed to allow overwriting the file

0 commit comments

Comments
 (0)