Skip to content

Commit

Permalink
docs: run amd on arm (#3923)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Jul 31, 2023
1 parent 8c1f01d commit e973654
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/documentation/sitespeed.io/docker/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ twitterdescription: Use Docker to run sitespeed.io.

Docker makes it easier to run sitespeed.io because you don't need to install every dependency needed for recording and analysing the browser screen. It's also easy to update your container to a new sitespeed.io version by changing the Docker tag. The drawback using Docker is that it will add some overhead, the container is Linux only (browsers are Linux version).

We publich containers for AMD and ARM. The AMD containers contains the latest Chrome/Firefox/Edge. The ARM container are behind and use latest Chrome/Firefox that was published for ARM.

We have a four ready made containers:
* One slim container that contains only Firefox. You run Firefox headless. Use the container `sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %}-slim`. The container do not have FFMpeg and Imagemagick so you can not get any Visual Metrics using this container.
Expand All @@ -42,7 +43,7 @@ The [slim container](https://github.com/sitespeedio/sitespeed.io/blob/main/Docke
We lock down the browsers to specific versions for maximum compatibility and stability with sitespeed.io's current feature set; upgrading once we verify browser compatibility.
{: .note .note-info}

## Running in Docker
## Running using Docker

The simplest way to run using Chrome:

Expand All @@ -65,6 +66,19 @@ docker run --shm-size 2g --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io
Using `-v "$(pwd):/sitespeed.io"` will map the current directory inside Docker and output the result directory there.
{: .note .note-info}


## Running on Mac M1 ARM
We have ARM container that will be used by default but they will use an older version of Chrome and Firefox. It's better to run the AMD containers. If you have a newer version of Docker desktop installed, you can *"Use Rosetta for x86/amd64 emulation"* to run the AMD containers. Go to settings and turn it on (see the screenshot).

![Turn on Rosetta]({{site.baseurl}}/img/rosetta-docker.jpg)
{: .img-thumbnail}

Then run by specifying the platform *--platform linux/amd64*.

```bash
docker run --rm -v "$(pwd):/sitespeed.io" --platform linux/amd64 sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %} https://www.sitespeed.io/
```

## More about volumes

If you want to feed sitespeed.io with a file with URLs or if you want to store the HTML result, you should setup a volume. Sitespeed.io will do all the work inside the container in a directory located at _/sitespeed.io_. To setup your current working directory add the _-v "$(pwd):/sitespeed.io"_ to your parameter list. Using "$(pwd)" will default to the current directory. In order to specify a static location, simply define an absolute path: _-v /Users/sitespeedio/html:/sitespeed.io_
Expand Down
Binary file added docs/img/rosetta-docker.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e973654

Please sign in to comment.