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

Adds tabs for podman/docker docs and OS differences #6115

Merged
Merged
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
81 changes: 74 additions & 7 deletions docs/website/docs/user-guides/deploy/_prerequisites.mdx
Original file line number Diff line number Diff line change
@@ -1,24 +1,91 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

**Prerequisites:**

Before we begin, you must login to a container registry that we will be pushing our application to.
In order to use `odo deploy` you must be able to build an image as well as push to a registry.

#### Step 1. Login to your container registry

Login to a container registry that you will be pushing your application to:

<Tabs
defaultValue="podman"
values={[
{label: 'Podman', value: 'podman'},
{label: 'Docker', value: 'docker'},
]}>

Login to your container registry with either `podman` or `docker`:
<TabItem value="podman">

```console
podman login
```
Or

```console
$ podman login quay.io
Username:
Password:
Login Succeeded!
```

</TabItem>

<TabItem value="docker">

```console
docker login
```

In order for `odo deploy` to push your image, your container registry needs to be accessible.
```console
$ docker login docker.io
Username:
Password:
Login Succeeded!
```

</TabItem>

</Tabs>

#### Step 2. Set the appropriate container build platform

Your container image build must match the same architecture as the cluster you are deploying to.

**NOTE for MacOS:** If you are running Apple Silicon (M1/M2), you must set your Docker build platform to the cluster you are deploying to.
For example: you will have to cross-build a AMD64 image on a Mac M1 (ARM64) in order to deploy to a AMD64 cluster.

For example, if you are deploying to `linux/amd64`:
Choose your deployment architecture:

<Tabs
defaultValue="linuxamd64"
values={[
{label: 'Linux (AMD64)', value: 'linuxamd64'},
{label: 'Linux (ARM)', value: 'linuxarm64'},
{label: 'Windows (AMD64)', value: 'windowsamd64'},
]}>

<TabItem value="linuxamd64">

```console
export DOCKER_DEFAULT_PLATFORM=linux/amd64
```
```

</TabItem>

<TabItem value="linuxarm64">

```console
export DOCKER_DEFAULT_PLATFORM=linux/arm64
```

</TabItem>

<TabItem value="windowsamd64">

```console
export DOCKER_DEFAULT_PLATFORM=windows/amd64
```

</TabItem>

</Tabs>