Answers: <p>I don't think you can containerize MacOS, but you could create a Mac OS VM and snapshot it, that way you can easily restore to the same exact Mac OS version for each test.</p>
  
Answers: CC BY-SA 4.0
Answers: 2018-11-19T09:46:42.513Z
Answers: a VM is a good idea, any more info on how to do?
Answers: Alexander Mills
Answers: CC BY-SA 4.0
Answers: 2018-11-19T22:02:47.427Z
Answers: Looks like these instructions to compile Swift code on Linux should suffice? https://www.raywenderlich.com/1448-introduction-to-open-source-swift-on-linux
Answers: Alexander Mills
Answers: CC BY-SA 4.0
Answers: 2018-11-19T09:24:39.150Z
Answers: 2018-11-19T09:24:39.150Z
Answers: Brandon Helwig
Answers: <p>From what I can tell so far, the best way to replicate a clean MacOS fs on Linux is to use a VM. These instructions should suffice:</p>
  
  <p><a href="https://www.raywenderlich.com/1448-introduction-to-open-source-swift-on-linux" rel="nofollow noreferrer">https://www.raywenderlich.com/1448-introduction-to-open-source-swift-on-linux</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2018-11-19T22:03:25.137Z
Answers: 2018-11-19T22:03:25.137Z
Answers: Alexander Mills
Body: <p>In developing/testing OSS libraries I can replicate a clean Linux fs using containers. However, if I want to test oss libs for MacOS end users, I seem to be in a bit of a quandary. Is there any way to create a clean fs on MacOS that I can test libraries with? Perhaps using <code>chroot</code>? Can someone explain exactly instead of just saying "use chroot"?</p>
  
Tags: <containers><macos>
Title: Create clean/blank MacOS fs on MacOS or Linux
UserDisplayName: Alexander Mills
ThreadText: # Create clean/blank MacOS fs on MacOS or Linux
  
  (Asked by: username_0 on 2018-11-18)
  
  In developing/testing OSS libraries I can replicate a clean Linux fs using containers. However, if I want to test oss libs for MacOS end users, I seem to be in a bit of a quandary. Is there any way to create a clean fs on MacOS that I can test libraries with? Perhaps using `chroot`? Can someone explain exactly instead of just saying "use chroot"?
  
  **Tags:** containers, macos
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-11-19. Score: 2
  
  I don't think you can containerize MacOS, but you could create a Mac OS VM and snapshot it, that way you can easily restore to the same exact Mac OS version for each test.
  
  > **Comments:**
  > **username_0**: a VM is a good idea, any more info on how to do?  
  > **username_0**: Looks like these instructions to compile Swift code on Linux should suffice? https://www.raywenderlich.com/1448-introduction-to-open-source-swift-on-linux  
  
  ---
  
  ### Answer by username_0 on 2018-11-19. Score: 0
  
  From what I can tell so far, the best way to replicate a clean MacOS fs on Linux is to use a VM. These instructions should suffice:
  
  <https://www.raywenderlich.com/1448-introduction-to-open-source-swift-on-linux>
  
  
  ---
  
  