From c7ac7655751dc83e1cf20034d0d0dac55a0b8555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Wed, 25 Oct 2023 15:40:00 +0200 Subject: [PATCH] docs: using standard OS tabs for registries docs (#4497) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: using standard OS tabs for registries docs Signed-off-by: Fabrice Flore-Thébault * Update website/docs/working-with-containers/registries/_insecure-registry-linux.md Signed-off-by: Fabrice Flore-Thébault --------- Signed-off-by: Fabrice Flore-Thébault --- .../registries/_insecure-registry-linux.md | 37 ++++++++ .../_insecure-registry-windows-macos.md | 44 +++++++++ .../_verification-private-registry.md | 8 ++ ...henticating-to-a-preconfigured-registry.md | 11 +-- .../registries/insecure-registry.md | 89 +++---------------- 5 files changed, 103 insertions(+), 86 deletions(-) create mode 100644 website/docs/working-with-containers/registries/_insecure-registry-linux.md create mode 100644 website/docs/working-with-containers/registries/_insecure-registry-windows-macos.md create mode 100644 website/docs/working-with-containers/registries/_verification-private-registry.md diff --git a/website/docs/working-with-containers/registries/_insecure-registry-linux.md b/website/docs/working-with-containers/registries/_insecure-registry-linux.md new file mode 100644 index 00000000000..38394601c1e --- /dev/null +++ b/website/docs/working-with-containers/registries/_insecure-registry-linux.md @@ -0,0 +1,37 @@ +#### Prerequisites + +- Podman is installed. + +#### Procedure + +1. Add your insecure registry within ** Settings > Registries**. + + ![Adding a custom registry](img/adding-a-custom-registry.png) + +1. Click "Yes" to the insecure registry warning. + + ![Podman Desktop Registry Warning](img/registry-warning-insecure.png) + +1. Open `registries.conf`. + + ```shell-session + $ sudo vi /etc/containers/registries.conf + ``` + +1. Add the insecure registry: Add a new `[[registry]]` section for the URL of the insecure registry you want to use. For example, if your insecure registry is located at `http://registry.example.com`, add the following lines: + + ```toml + [[registry]] + location = "registry.example.com" + insecure = true + ``` + + If you have multiple registries, you can add one `[[registry]]` block per registry: + +1. Save and exit the file. + +1. Restart Podman. + + ```shell-session + $ sudo systemctl restart podman + ``` diff --git a/website/docs/working-with-containers/registries/_insecure-registry-windows-macos.md b/website/docs/working-with-containers/registries/_insecure-registry-windows-macos.md new file mode 100644 index 00000000000..f78561ccb7e --- /dev/null +++ b/website/docs/working-with-containers/registries/_insecure-registry-windows-macos.md @@ -0,0 +1,44 @@ +#### Prerequisites + +- [A running Podman machine](/docs/onboarding-for-containers/installing-podman). + +#### Procedure + +1. Add your insecure registry within ** Settings > Registries**. + + ![Adding a custom registry](img/adding-a-custom-registry.png) + +1. Click "Yes" to the insecure registry warning. + + ![Podman Desktop Registry Warning](img/registry-warning-insecure.png) + +1. SSH into the Podman Machine to edit `registries.conf`. + + ```shell-session + $ podman machine ssh [optional-machine-name] + ``` + +1. Open `registries.conf`. + + ```shell-session + $ sudo vi /etc/containers/registries.conf + ``` + +1. Add the insecure registry: Add a new `[[registry]]` section for the URL of the insecure registry you want to use. For example, if your insecure registry is located at `http://registry.example.com`, add the following lines: + + ```toml + [[registry]] + location = "registry.example.com" + insecure = true + ``` + + If you have multiple registries, you can add one `[[registry]]` block per registry. + +1. Save and exit the file. + +1. Restart Podman by the CLI or through Podman Desktop. + + ```shell-session + $ podman machine stop + $ podman machine start + ``` diff --git a/website/docs/working-with-containers/registries/_verification-private-registry.md b/website/docs/working-with-containers/registries/_verification-private-registry.md new file mode 100644 index 00000000000..9f920ff4e08 --- /dev/null +++ b/website/docs/working-with-containers/registries/_verification-private-registry.md @@ -0,0 +1,8 @@ +#### Verification + +1. Go to ** Images**. +1. You can pull a private image from the registry. +1. You can push an image to the registry: + 1. Build an image with the fully qualified name required for your registry, such as `quay.io/my-repository/my-image`, `ghcr.io/my-repository/my-image`, `docker.io/my-repository/my-image`, or `my-registry.tld/my-repository/my-image`. + 1. On your image line, click ****. + 1. The contextual menu has a **Push Image** entry. diff --git a/website/docs/working-with-containers/registries/authenticating-to-a-preconfigured-registry.md b/website/docs/working-with-containers/registries/authenticating-to-a-preconfigured-registry.md index 3611fe990a9..958c240b1fb 100644 --- a/website/docs/working-with-containers/registries/authenticating-to-a-preconfigured-registry.md +++ b/website/docs/working-with-containers/registries/authenticating-to-a-preconfigured-registry.md @@ -6,6 +6,8 @@ keywords: [podman desktop, podman, containers, registry, registries] tags: [images] --- +import Verification from './\_verification-private-registry.md' + # Authenticating to a pre-configured registry With Podman Desktop, you can authenticate to a set of pre-configured registries: @@ -30,11 +32,4 @@ With Podman Desktop, you can authenticate to a set of pre-configured registries: ![Authenticating to a preconfigured registry](img/authenticating-to-a-preconfigured-registry.png) -#### Verification - -1. Go to ** Images**. -1. You can pull a private image from the registry. -1. You can push an image to the registry: - 1. Build an image the fully qualified name required for your registry, such as `quay.io/my-repository/my-image`, `ghcr.io/my-repository/my-image`, or `docker.io/my-repository/my-image`. - 1. On your image line, click ****. - 1. The contextual menu has a **Push Image** entry. + diff --git a/website/docs/working-with-containers/registries/insecure-registry.md b/website/docs/working-with-containers/registries/insecure-registry.md index 0bf0e7a94e1..9723c5a4e8b 100644 --- a/website/docs/working-with-containers/registries/insecure-registry.md +++ b/website/docs/working-with-containers/registries/insecure-registry.md @@ -8,97 +8,30 @@ tags: [pods] import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +import WindowsMacosProcedure from './\_insecure-registry-windows-macos.md' +import LinuxProcedure from './\_insecure-registry-linux.md' +import Verification from './\_verification-private-registry.md' # Adding an Insecure Registry to Podman Desktop In this guide, you will learn how to add an insecure registry to Podman Desktop. An insecure registry allows you to pull and push container images either over an unencrypted HTTP connection, or a HTTPS connection with a self-signed unverified certificate. Please note that using an insecure registry can expose your data to security risks, so it's recommended to use secure connections with a verifiable certificate whenever possible. -#### Prerequisites - -- Podman installed and running (VM if on macOS or Windows). - -#### Procedure - - + -1. Add your insecure registry within ** Settings > Registries**. + - ![Adding a custom registry](img/adding-a-custom-registry.png) + + -2. Click "Yes" to the insecure registry warning. - - ![Podman Desktop Registry Warning](img/registry-warning-insecure.png) - -3. SSH into the Podman Machine to edit `registries.conf`. - - ```shell-session - $ podman machine ssh [optional-machine-name] - ``` - -4. Open `registries.conf`. - - ```shell-session - $ sudo vi /etc/containers/registries.conf - ``` - -5. Add the insecure registry: Add a new `[[registry]]` section for the URL of the insecure registry you want to use. For example, if your insecure registry is located at `http://registry.example.com`, add the following lines: - - ```toml - [[registry]] - location = "registry.example.com" - insecure = true - ``` - - If you have multiple registries, you can add one `[[registry]]` block per registry. - -6. Save and exit the file. - -7. Restart Podman by the CLI or through Podman Desktop. - - ```shell-session - $ podman machine stop - $ podman machine start - ``` - -8. Pull or push container images: You can now use Podman Desktop to pull or push container images from/to the insecure registry you added. + -1. Add your insecure registry within ** Settings > Registries**. - - ![Adding a custom registry](img/adding-a-custom-registry.png) - -2. Click "Yes" to the insecure registry warning. - - ![Podman Desktop Registry Warning](img/registry-warning-insecure.png) - -3. Open `registries.conf`. - - ```shell-session - $ sudo vi /etc/containers/registries.conf - ``` - -4. Add the insecure registry: Add a new `[[registry]]` section for the URL of the insecure registry you want to use. For example, if your insecure registry is located at `http://registry.example.com`, add the following lines: - - ```toml - [[registry]] - location = "registry.example.com" - insecure = true - ``` - - If you have multiple registries, you can add one `[[registry]]` block per registry: - -5. Save and exit the file. - -6. Restart Podman. - - ```shell-session - $ sudo systemctl restart podman - ``` - -7. Pull or push container images: You can now use Podman Desktop to pull or push container images from/to the insecure registry you added. + + +