# Apple M1, Docker arm64 emulation

**URL:** https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590
**Category:** Development
**Tags:** arm
**Created:** [January 28, 2021, 7:05pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590 "2021-01-28T19:05:37Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Walker\_Blackwell](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/walker_blackwell/32/119568_2.png) [@Walker\_Blackwell](https://meta.discourse.org/u/Walker_Blackwell)
#### Post date: [January 28, 2021, 7:05pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/1 "2021-01-28T19:05:37Z")

</div>

Where do I specify --platform linux/arm64 in the ./launcher rebuild app sequence?

I need to test Discourse/Docker locally on M1.

Would be great to set this until such point as ARM build is fully implemented.

best regards,  
Walker

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [January 28, 2021, 7:18pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/2 "2021-01-28T19:18:36Z")

</div>

Discourse doesn’t work on arm64 at the moment, so there is no switch in launcher for it.

We are actively working on it, and we have quite a few members of our team running it on M1 already, but it still requires a branch of libv8, which is a transitive dependency coming from miniracer.

---

<div class="post-metadata">

### Author: ![Walker\_Blackwell](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/walker_blackwell/32/119568_2.png) [@Walker\_Blackwell](https://meta.discourse.org/u/Walker_Blackwell)
#### Post date: [January 28, 2021, 8:19pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/3 "2021-01-28T20:19:24Z")

</div>

Thanks Rafael.

You all rock.

best,  
Walker

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 28, 2021, 8:24pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/4 "2021-01-28T20:24:11Z")

</div>

You could try the docker args param launcher has, it may work

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [January 29, 2021, 8:15pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/5 "2021-01-29T20:15:54Z")

</div>

How’s it looking in dev performance wise?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [January 29, 2021, 8:19pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/6 "2021-01-29T20:19:08Z")

</div>

Incredible performance for single core Rails work, like Topic Create or Topic view. Still a lot slower than any recent x86\_64 offering in multicore or anything that touches disk IO.

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [January 29, 2021, 8:25pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/7 "2021-01-29T20:25:44Z")

</div>

> [@Falco](#):
>
> Still a lot slower than any recent x86\_64 offering in multicore or anything that touches disk IO.

I see. Thanks for this info. I think the software support for M1 will take some time to get right but future is looking bright.

It sounds notorious but it makes me a little happy that my recently bought device isn’t obsolete all of a sudden. 😉

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [January 29, 2021, 8:36pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/8 "2021-01-29T20:36:57Z")

</div>

> [@sam](#):
>
> You could try the docker args param launcher has, it may work

If that doesn’t work, you can use the `DOCKER_DEFAULT_PLATFORM` environment variable. I currently have:

```plaintext
export DOCKER_DEFAULT_PLATFORM=linux/amd64

```

in my zsh profile. When using Docker I pretty much always want the architecture to match production systems.

> [@fzngagan](#):
>
> How’s it looking in dev performance wise?

Compared to previous generation **MacBooks** it’s a big improvement, even though [the filesystem performance issues](https://discuss.rubyonrails.org/t/why-is-rails-boot-so-slow-on-macos/74021) still exist. A high-end linux desktop is still going to beat it though.

For example, I can run `bin/turbo_rspec` on core in about 2m50s (M1 Macbook pro, with Discourse, Redis & Postgres running natively). Team members on high-end linux desktops can do that in about 1 minute.

---

<div class="post-metadata">

### Author: ![awslabspl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awslabspl/32/207789_2.png) [@awslabspl](https://meta.discourse.org/u/awslabspl)
#### Post date: [January 30, 2021, 3:48pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/9 "2021-01-30T15:48:08Z")

</div>

> [@Falco](#):
>
> We are actively working on it

whats the roadmap for this to be enabled as `stable`?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 1, 2021, 1:39am UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/10 "2021-02-01T01:39:16Z")

</div>

We need a new mini racer / v8 gem to be released, no eta yet, we are testing alpha versions at the moment

---

<div class="post-metadata">

### Author: ![awslabspl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awslabspl/32/207789_2.png) [@awslabspl](https://meta.discourse.org/u/awslabspl)
#### Post date: [February 4, 2021, 12:50pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/12 "2021-02-04T12:50:42Z")

</div>

@sam and how are tests going? Im **highly** interested in M1-compatible version.

> [@david](#):
>
> 2m50s

Its not that bad timing… there are people (developers) out there who dont even come close to this…

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 4, 2021, 12:52pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/13 "2021-02-04T12:52:18Z")

</div>

For **development** of Discourse on M1, you can find some info over on the Rails forum: [Tips and tricks for developing Rails applications on Apple Silicon - rubyonrails-talk - Ruby on Rails Discussions](https://discuss.rubyonrails.org/t/tips-and-tricks-for-developing-rails-applications-on-apple-silicon/77089). A few of us on the team are using this day-to-day, and it works.

I would not recommend trying to run a production Discourse server on M1 though.

---

<div class="post-metadata">

### Author: ![awslabspl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awslabspl/32/207789_2.png) [@awslabspl](https://meta.discourse.org/u/awslabspl)
#### Post date: [February 4, 2021, 12:53pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/14 "2021-02-04T12:53:17Z")

</div>

> [@david](#):
>
> A few of us on the team are using this day-to-day, and it works.

if so, than why do not release it to GA?

> I would not recommend trying to run a production Discourse server on M1 though.

Why not?

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [February 4, 2021, 12:55pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/15 "2021-02-04T12:55:06Z")

</div>

@david

Its absolutely lovely. I’m lost for words on how to thank you for this. Great job.

Also, is the M1 macbook air good enough for discourse dev?

---

<div class="post-metadata">

### Author: ![awslabspl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awslabspl/32/207789_2.png) [@awslabspl](https://meta.discourse.org/u/awslabspl)
#### Post date: [February 4, 2021, 12:56pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/16 "2021-02-04T12:56:27Z")

</div>

> [@fzngagan](#):
>
> Also, is the M1 macbook air good enough for discourse dev?

I suppose so 🙂

> Its absolutely lovely. I’m lost for words on how to thank you for this. Great job.

I suppose spreading word about Discourse would be enough…

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 4, 2021, 12:58pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/17 "2021-02-04T12:58:55Z")

</div>

> [@awslabspl](#):
>
> if so, than why do not release it to GA?

I don’t follow… all of this is public, you can follow those instructions yourself and get things going.

> [@awslabspl](#):
>
> > I would not recommend trying to run a production Discourse server on M1 though.
> 
> Why not?

Our production install instructions are intended for running on an AMD64 linux host. You might be able to get it running on other OS/architectures using the tips in this topic, but there are no guarantees.

> [@fzngagan](#):
>
> Also, is the M1 macbook air good enough for discourse dev?

Absolutely. I have the Pro, but we also have people using M1 MacBook Airs and Mac Minis. There seems to be very little performance difference between them in our development benchmarks.

---

<div class="post-metadata">

### Author: ![awslabspl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awslabspl/32/207789_2.png) [@awslabspl](https://meta.discourse.org/u/awslabspl)
#### Post date: [February 4, 2021, 1:13pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/18 "2021-02-04T13:13:11Z")

</div>

> [@david](#):
>
> all of this is public

where? in official public repo?

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 4, 2021, 1:14pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/19 "2021-02-04T13:14:08Z")

</div>

In the article I linked:

> [@david](#):
>
> For **development** of Discourse on M1, you can find some info over on the Rails forum: [Tips and tricks for developing Rails applications on Apple Silicon - rubyonrails-talk - Ruby on Rails Discussions](https://discuss.rubyonrails.org/t/tips-and-tricks-for-developing-rails-applications-on-apple-silicon/77089).

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [February 4, 2021, 4:00pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/20 "2021-02-04T16:00:00Z")

</div>

> [@awslabspl](#):
>
> where? in official public repo?

We didn’t make any changes to Discourse that are in some private development branch, if that’s what you’re wondering. You can get Discourse to work on an M1 system by installing the ARM64 versions of dependencies we use, which is in the guide posted above by David.

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [February 4, 2021, 4:37pm UTC](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590/21 "2021-02-04T16:37:38Z")

</div>

> [@awslabspl](#):
>
> where? in official public repo?

We would all like the official repo to work with the new hardware right 😉 and not some code hidden in the closet.

[Next page](https://meta.discourse.org/t/apple-m1-docker-arm64-emulation/177590.md?page=2)
