Skip to main content

4 posts tagged with "compose"

View All Tags

Getting started with Compose on Podman Desktop

· 5 min read
Charlie Drage
Software Engineer

In this blog post we will learn how take a multi-container Compose application and use it within Podman Desktop.

Objectives

  • Start the Compose YAML through podman compose up.
  • View the guestbook web application.
  • Confirm the web application is being synchronized and running correctly with the database.
  • Use Podman Desktop to view, inspect and access the terminal of the Redis cluster.

What is Compose

Compose is a specification for defining and running multi-container Docker applications. With pose, you use a YAML file to configure your application’s services, networks, and volumes. This allows you to capture in a single file the entire configuration necessary to run a set of interconnected containers as an application. For example, if you have an application that requires a web server, a database, and a caching service, you can define these components and their relationships in your Compose file.

To use the Compose YAML, you can use a specification implementation such as podman compose and docker compose.

Before we begin

If you do not have Compose installed, let's go through the onboarding process to install the Compose implementation binary:

  1. Get to Resources under Settings > Resources.
  2. Click Setup under Compose (it will appear if it has not been installed yet).
  3. Go through the onboarding process.

Onboarding process

Confirm that you are able to run podman compose:

podman compose
Run compose workloads via an external provider such as docker-compose or podman-compose

Description:
This command is a thin wrapper around an external compose provider such as docker-compose or podman-compose. This means that podman compose is executing another tool that implements the compose functionality but sets up the environment in a way to let the compose provider communicate transparently with the local Podman socket. The specified options as well the command and argument are passed directly to the compose provider.
...

Download and run the example application

Our example application is located at github.com/redhat-developer/podman-desktop-demo.

We will use git clone so we can build the Go binary web application:

git clone https://github.com/redhat-developer/podman-desktop-demo
cd podman-desktop-demo/guestbook-compose

Run podman compose up -d to start the application:

podman compose up -d
>>>> Executing external compose provider "/usr/local/bin/docker-compose". Please refer to the documentation for details. <<<<

[+] Running 3/3
✔ Container redis-replica Started 0.0s
✔ Container web Started 0.0s
✔ Container redis-leader Started 0.0s

Viewing the guestbook application

Within Podman Desktop, you can now see that all three containers are up and operational.

Click the "Open Browser" button to view the web application:

Open browser

Within the Guestbook web application, you can:

  • "Sign" the guestbook, which will write to the Redis leader and synchronize to the replicas.
  • "Read" from the guestbook, which will read from the pool of Redis replicas. This allows for readability even if the Redis leader is unavailable.
  • /env: View the container's environment variables.
  • /info: View information about the Redis cluster.

Guestbook application

Viewing and modifying the database

Using Podman Desktop, you can also access the container's terminal directly from the GUI and modify the database.

Click "Open Terminal" to access the redis-leader terminal:

Open terminal

Modify the database as if you are doing database administration:

  1. Run redis-cli within the container to access the Redis database.
  2. Type LPUSH guestbook "Hello World!" and you will see your web application update in real-time.
  3. Type DEL guestbook and you will see that your database drops the guestbook key and clears the database.

Redis CLI

Changes will reflect in real-time on the guestbook.

You can further modify the database and see the changes propagate to the Redis replicas.

For example, view the logs of the redis-replica, and you will notice that there are periodic database synchronizations as well as reads to the database:

Redis replica logs

How does it work?

A quick overview of how the architecture works in this multi-container scenario:

  • Within the Guestbook application, it looks for a database with the names redis-leader and redis-replica on port 6379.
  • Because it is a Compose application, the containers are connected on the same network. This means that a neighboring container can be network-accessible simply by its container name.

There is a set of environment variables that the web application can modify in the Compose application:

  • REDIS_LEADER: The default is redis-leader.
  • REDIS_REPLICAS: The default is redis-replica. Can be comma-separated, such as redis-replica-1,redis-replica-2.
  • REDIS_PORT: The default is 6379.
  • SERVER_PORT: The default is 8080.

Scaling more replicas

Want to scale more replicas? This can be achieved by adding an environment variable to your compose.yaml and duplicating your redis-replica entry.

Modify your compose.yaml as follows:

services:
redis-leader:
container_name: redis-leader
image: redis:latest
ports:
- '6379'

redis-replica:
container_name: redis-replica
image: redis:latest
ports:
- '6379'
command: redis-server --replicaof redis-leader 6379

redis-replica-2:
container_name: redis-replica-2
image: redis:latest
ports:
- '6379'
command: redis-server --replicaof redis-leader 6379

web:
container_name: web
build: ./web
environment:
- REDIS_REPLICAS=redis-replica1,redis-replica2
ports:
- '8080:8080'

Run podman compose up -d again to ensure the new container has been added and the new environment variable has propagated:

podman compose up -d
>>>> Executing external compose provider "/usr/local/bin/docker-compose". Please refer to the documentation for details. <<<<

[+] Running 4/4
✔ Container redis-replica-2 Started 0.0s
✔ Container redis-leader Running 0.0s
✔ Container web Started 0.0s
✔ Container redis-replica Running 0.0s

Podman Desktop 1.6 Release

· 11 min read
Stevan Le Meur
Product Manager

Podman Desktop 1.6 Release! 🎉

Podman-desktop-1-6-hero

This release introduces:

  • Minikube Featured Extension: Minikube extension to create local Kubernetes clusters in containers.
  • Podman 4.8.2: Podman 4.8.2 is now included in Windows and Mac installers.
  • Setting Page for Command-Line Tools: Manage and update your CLI tools.
  • Kubernetes Contexts Manager: Browse all your kubernetes contexts, set default and remove unused ones.
  • Editable Podman Machine for MacOS: Easy resize and reconfiguration of the Podman runtime environment.
  • Filters for Containers and Pods Lists: Focus on the containers and Pods you are working with.
  • Sorting on Volumes and Images List: Sort volumes or images with your prefered criterias.
  • Environment Colums on Containers and Pods lists: Easy catch of the environment on which a container or a pod is running on.
  • Extension API Improvements: Another set of improvements to the extension API enabling more goodness for 🦭 Podman Desktop's extensions.

Podman Desktop 1.6 is now available. Click here to download it!


Release Details

For developers who need to run Kubernetes locally and reproduce an environment close to production for development and experimentation purposes, Podman Desktop allows users to easily set up that environment on a local machine. There are two extensions providing the capability to configure a open source Kubernetes cluster locally, you can either choose between Kind or Minikube.

The Minikube extension allows you to install Minikube on your workstation and also to setup a Kubernetes cluster locally running in a container! Yes, you read that correctly - in a container similar to how Kind works. The advantage is that it's lighter and faster to start. With Minikube, one of the advantage, is that you can build your images locally with Podman and get them automatically available in your local Kubernetes cluster - which will speed up your turnarounds when you want to test your application. If you want to learn more this, read the following blog post.

Minikube-feature-extension

Command-Line Tools Configuration: Compose and Kubectl

Configuring and managing your setup is getting easier with the addition of a new section in the Settings to manage command-line tools. In Podman Desktop, extensions can list command-line tools that are helpful to their users or required to make use of the installed extensions.

There are two command-line tools within Podman Desktop that allows you to view whether they are installed or require an update:

  • Compose binary for running 'podman compose' commands.
  • kubectl for interacting with Kubernetes clusters.

cli-tools

From the settings you can see the command-line tools that are installed, and you can see the version - and when a new version is available, you'll get a small notification to allow you easily update to that version.

Compose-Update

Kubernetes Contexts Manager

We are introducing a new screen available from the Settings which allows you to easily manage your Kubernetes contexts. Podman Desktop was already providing the handy context switcher available from the status bar, but when you get to work with multiple Kubernetes environments, it's not uncommon to end with a big and long list of Kubernetes contexts.

The new Kubernetes Contexts screen allows you to easily see all your registered Kubernetes contexts. You can use the screen to clean up your registered contexts, or set the current (default) context.

Kubernetes Contexts List

Editable Podman Machine

A Podman machine is a virtual environment specifically designed to run Podman containers on Mac and Windows. It allows users to manage and operate containerized applications in an isolated and controlled setting. When creating a Podman machine, you configure its settings: memory, CPU(s) and disk size.

We've received the feedback regarding the ability to reconfigure your Podman machine on the go. This is now possible for macOS users, and particularly useful when you start with an environment and need to scale it up based on new needs and containers you would like to run in your Podman environment.

Editable podman machine

You'll notice we improved the sliders to configure the Podman machine's options - and also introduced a way to enter numeric values directly.

Tabs/Filters for Containers and Pods

Being able to quickly identify the containers and the pods you are working with is critical when you are iterating on the development of your application. For this reason, we added filters at the top of the lists of Containers and Pods that allow you to easily view all the containers/pods, only those that are running, or only those that are stopped.

Filters for containers and pods

Sorting for Volumes and Images lists

The lists of Volumes and Images have improved and are now have the ability to be sorted by the criteria of your choice. You can for example filter images by their size - which can be convenient when you want to clean up your environment.

Sorting for Volumes and Images

Environment columns on Containers and Pods lists

Podman Desktop is able to work with multiple providers: it could work with multiple container engines and multiple Kubernetes environments too. In order to make it easier to identify the containers and the pods and differentiate them depending on which environment they are running onto, we are introducing a new environment column in the list of Containers and Pods to display a badge.

Environment Column

Better visibility to the containers running in Pods

The list of Pods has been refined to provide easier visibility and access to the containers running within each of them. Each of the containers now have one dot and you can hover each dot to display the info about the container - and if you click on it you'll be able to access the details of the container.

Visibility for containers in Pods

Extension API improvements

The 🦭 Podman Desktop extension API received many improvements, including:

  • Documentation explaining how to create an onboarding workflow for an extension #4837
  • Documented how extensions hook into UI #4633
  • Documented how to implement api client #4636
  • Image checker extension API #4662
  • Added api to register cli updater #5064

Other Notable Enhancements

  • Show container connection type and endpoint #5098
  • Environment column to pods/containers #4583
  • Displaying extension icons in the list of extensions #5101
  • Introduced UI icon image component #5117
  • Added icon to extensionInfo #5089
  • Added encoding option on RunOptions #4942
  • Introduced property for appearance but for now only dark is supported #4887
  • Default table sorting #4860
  • Display notification for completed onboarding in task manager #4811
  • Added purple dot when new content is available in dashboard #4782
  • Argos CI: Introduce Argos CI to track and detect visual regressions on the website
  • Added command palette: add enablement property #4630
  • Added documentation for telemetry and usage data #4618
  • Introduced table component #4545
  • Added ability to abort build image #4538
  • Added support in command palette for category #4531
  • Upgraded flatpak to org.freedesktop.Platform version 23.08 #3968
  • Added open exposed url to pod details #3762

Notable Bug Fixes

  • Fix reconnect to /events if disconnected #4809
  • fix: reset loggerhandlerKey after restarting machine #5168
  • fix: fix: podman machine created with wrong flags #5178
  • fix: avoid to crash if configuration is invalid #5182
  • fix: extension installation checks architecture and os #5191
  • fix: use URL for proxy specification and add validation #4825
  • fix: do not change color and underline of markdown buttons #5138
  • fix: do not reconnect when connection is removed #5131
  • fix: table headers shouldn't allow text selection #5118
  • fix: add style to link #5108
  • fix: launch.json references wrong script #5094
  • fix: don't link to k8s cluster server 5087
  • fix: pass the complete imageInfo to the check function #5069
  • fix: container tabs should match pods #5057
  • fix: revert styling of disabled buttons #5056
  • fix: update current context reactively #5055
  • fix: make ProviderResultPage do not change input values #5030
  • fix: add rowgroup to tables #5005
  • fix: add path prop for route object #4981
  • fix: remove errant hash mark #4971
  • fix: check extension folder contains package.json #4964
  • fix: refactor List UI components #4953
  • fix: succeeded/completed state for Compose onboarding #4947
  • fix: remove flex class from markdown button rendering #4934
  • fix: unable to read wsl version when using chinese as syslang on Windows #4918
  • fix: retain autostart setting #4879
  • fix: use vi.waitUtnil instead of cycles with awaiting promises #4861
  • fix: docker host on windows when executing compose command #4855
  • fix: merged compose deploy to kube page in UI #4827
  • fix: use URL for proxy specification and add validation #4825
  • fix: reconnect to /events if disconnected #4809
  • fix: remove fixed height after patternfly removal #4804
  • fix background colours after patternfly removal #4803
  • fix: report metrics for stopped machines #4787
  • chore: update to docusaurus v3.0.0 #4764
  • chore: drop patternfly #4762
  • fix: avoid to send telemetry usage as this method is called every 5s #4692
  • fix: location of roots.exe in devmode #4654
  • fix: disable create/start container if any port is busy #4637
  • fix: fix setup in build image tests #4625
  • fix: find a free port #4616
  • fix: reduce size of provider cards on the dashboard #4615
  • fix: shorter doc nav section titles #4613
  • fix: report error if container engine action fails in details page #4556
  • fix: remove prev/next bar #4548
  • fix: reduce website footer #4546
  • fix: handle compose format json that is no longer a JSON array object #4540
  • fix: disable push to kind menu item if pushing is in progress #4530
  • fix: check for self signed cert message and use insecure param when editing registry password #4523
  • fix: add autoscroll to summary pages #4504
  • fix: report errors when analyzing extensions #4380
  • fix: allow editing of build containerfile #4471
  • refactor: updated compose onboarding installation #4479
  • refactor: remove compose from the status bar #4492

Documentation

Coming with this new version of 🦭 Podman Desktop, the documentation has been getting the following improvements:

  • Reorganize doc navigation by provider #4558
  • Added vsc runtime dependency for Windows development #5091
  • Show location of lima podman socket #5090
  • Fixed typo in URI for releases #4909
  • Explain how to create an onboarding workflow for an extension #4837
  • Make it possible for lima to provide both #4789
  • Blog post about minikube/sharing images #4735
  • Remove duplicate text from windows troubleshooting #4652
  • Add step to implement api client #4636
  • Fixed the main lima command for limactl #4623
  • Lima provider cleanup after the improvements in the implementation #4622
  • Update documentation regarding auto merge #4519
  • Using standard OS tabs for registries docs #4497
  • Fixed mahine -> machine #4495
  • Added screenshots and fixed formatting to the registries section #4472

Community Thank You

🎉 We’d like to say a big thank you to everyone who helped to make 🦭 Podman Desktop even better. In this release we received pull requests from the following people:


Final notes

Fixed Issues

The complete list of issues fixed in this release is available here.

Where to Download

Get the latest release from the Downloads section of the website and boost your development journey with Podman Desktop. Additionally, visit the GitHub repository and see how you can help us make Podman Desktop better.

Podman Desktop 1.5 Release

· 9 min read
Máirín Duffy
User Experience Designer

Podman Desktop 1.5 Release! 🎉

With this release of Podman Desktop, we're introducing a new onboarding feature that we hope will earn your 🦭 seal of approval! But wait... there's so much more!

  • Onboarding: Guided setup and configuration of Podman and Compose
  • Podman 4.7.2: Podman 4.7.2 is now included in Windows and Mac installers
  • Command Palette: Gain easy access to various commands via a new keyboard-driven command palette
  • Expanded "Summary" tab for Kubernetes pods: Go deep with extended details on Kubernetes pods in the pod "Summary" tab
  • Environment file support: Chart out environment variables for new containers to access on creation
  • Enhancements to the Settings area: Get your bearings with improved Docker compatibility mode controls
  • Improved user experience for state changes: No more dead reckoning on container state with improved visual indication of status
  • Extension API improvements: A boatload of improvements to the extension API enabling more goodness from 🦭 Podman Desktop's extensions

Podman Desktop 1.5 is now available. Click here to download it!

Podman-desktop-1-5-hero


Release Details

Onboarding

We are introducing a new feature providing guided flows for the initial setup of specific 🦭 Podman Desktop extensions. Release 1.5 features two new onboarding flows: Podman and Compose.

To start the Podman onboarding flow, you can start from the dashboard notification by clicking the "Set up" button: podman-onboarding-start podman-onboarding

Visit Settings > Resources screen and click the Compose "Setup ..." button in order to start Compose onboarding: compose-onboarding-start compose-onboarding

Command Palette

A new, search-driven command palette is now available to enable quick access to various commands available across 🦭 Podman Desktop. You can try this new tool out by hitting the F1 key. #4081 && #3979

Expanded "Summary" tab for Kubernetes pods

Kubernetes pods now offer a more comprehensive set of information under the "Summary" tab, including networking, volumes, environment variables, and other key metadata.

Environment file support

When creating a container from the Images list, there's now an option to provide an environment file to set env variables for the new container. #4026 && #4025

Enhancements to the Settings area

The user experience for enabling or disabling Docker compatibility is improved, with a new entry in the Settings > Preferences screen that includes contextual guidance. #4093

Improved user experience for state changes

The user experience around state changes for containers, pods, and other objects in the UI is improved, with clear status messages and improved animated visual indicator of state changes. #4056

Extension API improvements

The 🦭 Podman Desktop extension API received many improvements, including:

  • In addition to pushing and listing image from an extension, it's now possible to pull images from a 🦭 Podman Desktop extension #4155

  • The 🦭 Podman Desktop extension API has been enhanced with both the ability to list images & networks and the ability to create containers & networks. #4172

  • 🦭 Podman Desktop extensions now have a consistent way to run administrative tasks. #4049

  • Extensions now have the ability to register a custom Kubernetes config generator. #3970

  • The ability of extensions to add commands to UI menus has been extended; previously for action menus it was only available in the Image list screen. It is now possible for extensions to add commands to the action menus of items listed on the Containers list screen as well. #3947 & #3963

  • Extensions have gained the ability to contribute menu items in the UI based on specific conditions. #3959

  • Enhanced logic for displaying or hiding properties listed under the Settings > Preferences screens is now available. #4159


Other Notable Enhancements

  • The progress of loading an image into Kind is now visible as a task in the task manager. #4061

kind-progress-task

  • It's now possible to start a new Podman machine right after creation, or you can create it and wait to start it later. It's up to you! #4046

podman-start-now-or-later

  • The Podman machine and Kubernetes provider creation forms have an updated look & feel consisted with other forms in the user interface, along with minor bug fixes. #4317

Updated provider creation forms

  • The empty screen message shown when a search filter results in no matches now provides a message specific to filter matching, including the specific filter terms and an explicit button for clearing the filter. Previously, the screen displayed a generic message about how to create new objects of the type displayed on the screen, which led to some confusion about the status of the system. #3988
  • New support for adding spin animations to icons is now available. #4188

  • There is a new indeterminate progress bar type available for the task manager; this is meant for providing limited status for actions whose APIs do not provide detailed status information. #4016

  • For authenticating as admin to perform administrative tasks, 🦭 Podman Desktop now provides touchID support for macOS. #4050

touchID-support

  • Support for connecting to interactive terminals for containers via tty was added. #3900

  • It's now more clear which container/pod providers will autostart when 🦭 Podman Desktop starts. Previously autostart had both a global and a per-provider setting. It has been simplified by removing the global setting. #3840

  • The "Working with containers" section of the documentation has been reworked and improved. #3951


Notable Bug Fixes

  • The disable registry command was not blocking subsequent pulls from disabled registries. This has been corrected. #4183

  • Some users behind network proxies were unable to complete workflow involving the download of online resources. The mechanism for fetching these resources has been fixed to be proxy compatible to address this issue. #3994

  • The status of pods running in Kubernetes that are undergoing the deletion process is now accurately reflected in the 🦭 Podman Desktop UI. #3877

  • The image details page always listed the image as being "not used" even when it was. This has been corrected. #3985

  • Previously, deleting a specific image tag would cause all tags with the same Image ID to be deleted. This has been fixed so only the selected image tag will be deleted. #3837

  • Could not view the pod details for some remote Kubernetes cluster pods due to an encoding error. #4371

  • Error logs were being tracked separately from the actions they applied to. This has been addressed for kind cluster creation failure #4427 and Compose installation failure #4407.

  • For Linux users, 🦭 Podman Desktop previously did not appear under the "Development" menu when installed via Flatpak; it appeared under "Utilities." 🦭 Podman Desktop now appears under the "Development" menu. #3911

  • Podman Machine names are no longer prefixed with the "Podman Machine" string. #3878

touchID-support

  • The initial action state of pods and containers was being displayed as "STARTING" regardless of actual state; this has been corrected. #3889

  • Resizing the application window no longer makes the last lines of a container's terminal invisible. #3993

  • An issue with incorrect terminal behavior in response to long lines in the terminal attached to a container has been resolved. #3955

  • A spacing issue on the run image form has been corrected. #4089

  • The "podify" icon & button on the Containers list was unusually large in release 1.4. That regression has been corrected in this release. #4122

  • An error in the instructions for Windows users on migrating from Docker has been corrected. #4157


Community Thank You

🎉 We’d like to say a big thank you to everyone who helped to make 🦭 Podman Desktop even better. In this release we received pull requests from the following people:


Final notes

Known Issues

We have a discussion board topic where we have posted known issues with this release. If you run into problems, please check this list before filing a bug - if we already have an issue open for it, it saves you the time and trouble of filing, and there may be a workaround posted in the issue.

Known Issues: Podman Desktop 1.5.2

Fixed Issues

The complete list of issues fixed in this release is available here.

Where to Download

Get the latest release from the Downloads section of the website and boost your development journey with Podman Desktop. Additionally, visit the GitHub repository and see how you can help us make Podman Desktop better.

Release Notes - Podman Desktop 0.13

· 4 min read
Tim deBoer
Architect

This release note covers Podman Desktop 0.13 release changes.

  • Podman Version: Podman 4.4.4 now included in Windows and Mac installers.
  • Compose: Support for installing Docker Compose.
  • Extensions: Improved extension support for Podman Desktop with additional capabilities.
  • UX and UI Improvements: Welcome page, task manager, resources, and update alerts.

Podman Desktop 0.13 is now available. Click here to download it!

Podman-desktop-0-13-hero