Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add orbstack guide #856

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ cargo 1.69.0 (6e9a83356 2023-04-12)

Currently, iceberg-rust uses Docker to set up environment for integration tests. Native Docker has some limitations, please check (https://github.com/apache/iceberg-rust/pull/748). Please use Orbstack or Podman.

For MacOS users, you can install [OrbStack](https://orbstack.dev/) as a docker alternative.
For MacOS users, you can install [OrbStack as a docker alternative](docs/contributing/orbstack.md).
Copy link
Contributor

@xxchan xxchan Dec 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding guide about how to use a tool seems strange to me, unless we need project-specific settings. It should be enough to link to the tool's doc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have podman guide in repo. I think adding orbstack guide is helpful to new contributer as it's not trival to run tests like other rust projects, we should lower the threshold for new contributers as much as possible.


For podman, refer to [Using Podman instead of Docker](docs/contributing/podman.md)

Expand Down
39 changes: 39 additions & 0 deletions docs/contributing/orbstack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

# OrbStack as a docker alternative on macOS
1. Install OrbStack by downloading [installer](https://orbstack.dev/download) or using Homebrew.
```shell
brew install orbstack
```

2. Migrate Docker data
```shell
orbstack migrate docker
```

3. (Optional) Add registry mirrors

You can edit the config directly at `~/.orbstack/config/docker.json` and restart the engine with `orb restart docker`.

```
{
"registry-mirrors": ["https://registry.docker.ir", "https://docker.iranserver.com"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: why are these registry mirrors part of the PR? The only reference i can find about these registry mirrors is here orbstack/orbstack#51 (comment)

It doesnt seem like these mirrors are commonly used

can we remove this recommendation or change it to a more commonly used mirror?
cc @liurenjie1024 @lewiszlw

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These registry mirrors are just example, copied from orbstack/orbstack#51 (comment) . I think we can change it like

{
        "registry-mirrors": ["<mirror_addr>"]
}

Copy link
Contributor

@kevinjqliu kevinjqliu Dec 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that sounds good to me, thanks!

Let's see if I can change it right here from github:

Suggested change
"registry-mirrors": ["https://registry.docker.ir", "https://docker.iranserver.com"]
"registry-mirrors": ["<mirror_addr>"]

edit: guess not since its already merged. Would you like to make the change?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
```
Loading