How-To: Docker on Windows and Mac with Multipass

See the full post here ➡️ https://ubuntu.com//blog/replacing-docker-desktop-on-windows-and-mac-with-multipass

Excerpt below:

If you’re looking for an alternative to Docker Desktop or to integrate Docker into your Multipass workflow, this how-to is for you.

Multipass can host a docker engine inside an Ubuntu VM in a manner similar to Docker Desktop. That Docker instance can be controlled either directly from the VM, or remotely from the host machine with no additional software required. This allows you to run Docker locally on your Windows or Mac machine directly from your host terminal.

Summary

In this tutorial, we will run the Docker Hello World container within a Multipass VM, from the host command line. To do so, we will:

Install Multipass (if not already installed)Use cloud-init to:Create a Multipass VMInstall docker engine on the VMAlias the docker command to the host command lineRun the Docker Hello World container from the host terminal Preparation

First, install Multipass by heading to multipass.run and following the installation instructions there for your operating system.

Windows

We will start by running some cloud-init code to configure the VM. This creates a  virtual machine running with the latest Ubuntu LTS (20.04 at the time of writing) installed. This machine is configured with 4 CPUs, 4GB of RAM, and 40GB of disk. If you think you’ll need different specs, you can modify these steps as shown here.

In PowerShell, run the following cloud-init code to create a new VM called docker-vm with docker engine installed:

@’ groups: – docker snap: commands: – [install, docker] runcmd: – adduser ubuntu docker ‘@

...


Click >>> here <<< to share your news for free!

About Linux Chatter

Linux Chatter is a news aggregator service that curates some of the best Linux, Cloud, Technical Guides, Hardware, and Security news. We display just enough content from the original post to spark your interest. If you like the topic, click on the 'read full post' button to visit the author's website. Then, use Linux Chatter to find content from amazing authors!

Why should you share your news?

Contributing is one of the best ways to promote a website. This technique has been used for decades now and is still very effective. But, this strategy can make or break your rankings depending on its application.

A news website is one of the best places to publish your blog. This is because such sites always have massive amounts of targeted traffic. If you write quality content, your post will get lots of hits, and many people will follow your blog.

Disclaimer

The content provided has been modified and is not displayed as intended by the author. Any trademarks, copyrights, and rights remain with the source. Linux Chatter sources content from RSS feeds and personal content submissions. The views and opinions expressed in these articles are those of the authors and do not necessarily reflect Linux Chatter.