Skip to main content

2 posts tagged with "container"

View All Tags

Supercharge Your Container Development in VS Code with Podman and Podman Desktop

· 5 min read
Matt Demyttenaere
Product Manager

Developing containerized applications can sometimes feel complex, but with the right tools, it can be a smooth and efficient process. In this blog post, we'll explore how to leverage the power of Visual Studio Code (VS Code) together with Podman and Podman Desktop to streamline your container development workflow. We'll cover setting up and using two VS Code extensions that integrate with Podman.

VS Code: Your IDE for Container Development

VS Code is a popular and versatile code editor that can be extended to enhance its functionality. For container development, several excellent extensions integrate seamlessly with Podman.

Prerequisites

Before we begin, ensure you have the following installed:

VS Code Extensions

To integrate VS Code with Podman, we have 2 extensions as options:

  1. Microsoft’s Container Tools extension: The "Container Tools" extension provides excellent support for container-related tasks, including building images, managing containers, and working with Containerfiles and Dockerfiles. Microsoft recently announced that they will be evolving the Docker extension into the Container Tools extension to support other tools like Podman!
  2. Pod Manager: This extension was created by one of the members of our community and is completely open source. It is designed to help you manage Podman containers, images, volumes, and networks directly from the VS Code interface.

While it's unlikely that you would use both extensions simultaneously, comparing them will help you understand the strengths and weaknesses of each, ultimately making it easier to select the one that best fits your needs. So for this blog post, we'll install them one by one.

Option 1: Microsoft’s Container Tools extension

To install the extension:

  1. Open VS Code.
  2. Click on the Extensions icon in the Activity Bar (or press Ctrl+Shift+X or Cmd+Shift+X).
  3. Search for "Container Tools" and install the extension by Microsoft.

Configuring VS Code for Podman

The Container Tools extension usually automatically detects Podman if Docker isn't running, by looking at the DOCKER_HOST environment variable. In Podman Desktop navigate to Settings > Docker Compatibility > Third-Party Tool Compatibility and make sure the option is enabled. Learn more about the Docker Compatibility in our documentation.

enabling docker compatibility in the settings

Option 2: Pod Manager

To install the extension:

  1. Open VS Code.
  2. Click on the Extensions icon in the Activity Bar (or press Ctrl+Shift+X or Cmd+Shift+X).
  3. Search for "Pod Manager" and install the extension by dreamcatcher45.

Using the VS Code Extensions

Now that we have the extensions installed and configured, let's see how to use them.

Working with Containerfiles and Dockerfiles

Both extensions provide syntax highlighting, code completion, and linting for Containerfiles and Dockerfiles. Open a Containerfile in VS Code, and you'll immediately benefit from these features.

You can also build images directly from VS Code:

  1. Right-click on the Containerfile in the Explorer view.
  2. Select "Build Image".
  3. VS Code will prompt you for an image name and tag.
  4. The extension will then build the image using Podman.
  5. After that you will see the built image in the sidebar.

If you are using the CLI commands to build images, you will also see them here.

building a Containerfile in vs code using the microsoft extension

Managing Containers

The extensions also allow you to manage containers directly from VS Code. You can start, stop, restart, and remove containers, as well as view their logs and inspect their configuration.

To view the container logs:

  1. Click on the Container icon in the Activity Bar.
  2. You'll see a list of your containers, images, and networks.
  3. Right-click on a container to perform actions.

using Container Tools extension to view the logs of the container

Similarly using the Pod manager extension we can visually inspect containers, images, and volumes.

  1. Click on the Pod manager icon in the Activity Bar.
  2. You'll see a list of your containers, images, and networks.

using podmanager to view all the running containers, images and volumes

and manage the container lifecycle.

using podmanager to manage the lifecycle of the container

and of course troubleshoot issues with a visual interface.

using podmanager to enter the container

Conclusion

In comparison, both extensions provide a nearly identical set of features, so it is really up to you which UI you prefer. Personally I will stick with the Pod Manager because the logo is a seal 🦭. Remember if you encounter any issues using these tools or with Podman Desktop let us know by starting a discussion or creating an issue.

By combining the power of VS Code, Podman, and Podman Desktop, you can create a streamlined and efficient container development workflow. The VS Code extensions provide excellent integration with Podman, allowing you to manage containers, build images, and work with Containerfiles directly from your code editor. We are excited to see that Microsoft is embracing Podman and building support into their ecosystem. Podman Desktop complements this with a visual interface for managing your container environment and will help to move from your development environment to a production Kubernetes environment. Embrace these tools and elevate your container development experience!

Podman Desktop + CNCF - Community Driven Move

· 5 min read
Markus Eisele
Product Marketing
Stevan Le Meur
Product Manager

banner

Today, we're thrilled to announce our application for Podman Desktop to join the Cloud Native Computing Foundation (CNCF) as a Sandbox project.This is a huge milestone for our project and our community, and we're incredibly excited for what the future holds.

About Podman Desktop

Podman Desktop builds upon the innovations brought by Podman, offering a powerful yet user-friendly environment for containerized development. Podman provides a daemonless, rootless container engine that enhances security and flexibility, while Podman Desktop delivers an intuitive graphical interface for managing containers and interacting with Kubernetes. Enhanced by a plug-in system that allows developers to customize their inner loop container workflows to their needs and offers flexible extension points for other projects as well as other container engines.

Why the CNCF?

The CNCF is a vital organization for the cloud-native world, supporting collaboration and driving innovation for critical projects like Kubernetes, Prometheus, and Envoy. As a CNCF project, Podman Desktop will benefit from increased visibility, a neutral home for open governance, and access to a wealth of resources and expertise. CNCF projects will take a renewed interest in collaborating with us. This move will help us grow our community, ensure the project's long-term sustainability, and accelerate its development.

How Podman Desktop simplifies containers and Kubernetes

Developing with containers can be complex. Podman Desktop simplifies this by providing an intuitive interface and powerful tools for building, managing, and running containers. This allows developers to focus on writing code, not wrestling with infrastructure. Why is this important? Because in today's complex world, developer productivity is paramount. By removing friction and simplifying workflows, Podman Desktop empowers developers to deliver value faster. Podman Desktop enables developers to run Kubernetes locally, mirroring their production environment. This eliminates the "works on my machine" problem and allows for early detection of configuration issues. By closing the gap between development and production, Podman Desktop reduces deployment risks and accelerates the feedback loop. This leads to higher quality software and faster release cycles.

Open source and the CNCF: A perfect match for developer tools

We believe in the power of open source. Open source software fosters transparency, encourages collaboration, and drives innovation. By donating Podman Desktop to the CNCF, we're ensuring it remains open and accessible to all, fostering a vibrant community around it. The CNCF is the perfect home for Podman Desktop because it champions open source values and provides a neutral ground for collaborative development. This ensures that Podman Desktop remains vendor-neutral and driven by the needs of its users, keeping options open and avoiding vendor lock-in.

Furthermore, while the CNCF has fostered incredible innovation and many developers profit from the number of projects available through the CNCF, there's a recognized need for more developer-focused tooling. Podman Desktop fills this gap perfectly by providing a developer-centric, streamlined, and intuitive experience for containerizing, managing, and deploying cloud-native applications. Podman Desktop has a natural affinity to Kubernetes due to its design and features that seamlessly bridge the gap between local container development and Kubernetes deployments. This close relationship aligns perfectly with the CNCF's mission to drive the adoption of cloud-native technologies.

Join the growing Podman Desktop community

As a CNCF project, we have the opportunity to open our doors to a wider community of contributors and users. We believe that open source thrives on collaboration and diverse perspectives. By broadening our contributor base, we can accelerate innovation, improve the quality of Podman Desktop, and ensure it meets the needs of a diverse range of users.

You can contribute in various ways

  • Reporting issues: If you encounter bugs or have suggestions for improvements, you can report them on the GitHub issue tracker. Be sure to provide detailed information and steps to reproduce the issue.

  • Working on issues: You can browse the issue tracker and contribute by fixing bugs or implementing new features. This involves forking the repository, making changes, and submitting pull requests.

  • Contributing code: Beyond addressing existing issues, you can propose and contribute entirely new features or enhancements to Podman Desktop's functionality, user interface, or integrations with other tools. Learn more about how to contribute.

  • Contributing plug-ins: Feel like there is an integration missing? You can contribute your own plug-in functionality for Podman Desktop. Check out the guide.

  • Improving documentation: Clear and comprehensive documentation is essential. You can contribute by improving existing documentation, adding new guides, or creating tutorials.

  • Providing website contributions: The Podman Desktop website is also open source. You can contribute to its content, design, or translations.

  • Becoming an Adopter: If you are a happy user, we’d love to know and share the word. Consider adding yourself or your organization to the list of adopters with a pull request.

Before you start contributing, it's helpful to familiarize yourself with the project's contribution guidelines and code architecture. These resources provide valuable information on coding style, testing procedures, and the overall development process. You can also join #podman-desktop on the Kubernetes Slack to connect with other contributors and get help.

KubeCon 2024 and beyond

We are at KubeCon NA 2024 in Salt Lake, to officially announce this exciting news and share more about Podman Desktop and our roadmap. Stop by the Red Hat booth to say hello, contribute to the project, and help us shape the future of cloud-native development.

Get involved and learn more

We're incredibly excited about this new chapter for Podman Desktop and can't wait to see what we can achieve together with the CNCF community.