Run Ubuntu Docker


In this tutorial, we showed you how we can install Docker on Ubuntu 18.04 from the Terminal, and how we can fetch images and run Docker containers using the docker command. I hope this tutorial serves you well and clears any doubts regarding Docker installation or running a Docker container on Ubuntu. In this tutorial, we showed you how we can install Docker on Ubuntu 18.04 from the Terminal, and how we can fetch images and run Docker containers using the docker command. I hope this tutorial serves you well and clears any doubts regarding Docker installation or running a Docker container on Ubuntu. Sep 15, 2021 Run Ubuntu In Docker On Windows. Run a Docker Container in Ubuntu. In order to create and run a Docker container, first you need to run a command into a downloaded CentOS image, so a basic command would be to check the distribution version file inside the container using cat command, as shown. $ docker run centos cat /etc/issue 14. Aug 18, 2020 A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings. Installing Ubuntu From your CLI run the following command: 👉 docker pull ubuntu.

We can now finally start the container. Run docker.exe again, and tell it to run the new image: C: Users mathi. Docker.exe run -it ubuntu Congratulations! You have successfully set up your system to use containers with Hyper-V isolation on Windows, and have run your very own Ubuntu container.

Step 4 – Start Kafka Server. Kafka required ZooKeeper so first, start a ZooKeeper server on your system. You can use the script available with Kafka to get start a single-node ZooKeeper instance. Sudo systemctl start zookeeper Now start the Kafka server and view the running status: sudo systemctl start kafka sudo systemctl status kafka All done. Installing Docker on Ubuntu 20.04 is easy with this tutorial. Learn to install, start, and run Docker. Get started with this powerful virtualization tool! Official IBM WebSphere Application Server for Developers Liberty image.

The Jellyfin project and its contributors offer a number of pre-built binary packages to assist in getting Jellyfin up and running quickly on multiple systems.

  • Container images
    • Docker
  • Windows (x86/x64)
  • Linux
    • Linux (generic amd64)
    • Debian
    • Ubuntu

Container images

Official container image: jellyfin/jellyfin.

LinuxServer.io image: linuxserver/jellyfin.

hotio image: hotio/jellyfin.

Jellyfin distributes official container images on Docker Hub for multiple architectures. These images are based on Debian and built directly from the Jellyfin source code.

Additionally the LinuxServer.io project and hotio distribute images based on Ubuntu and the official Jellyfin Ubuntu binary packages, see here and here to see their Dockerfile.


For ARM hardware and RPi, it is recommended to use the LinuxServer.io or hotio image since hardware acceleration support is not yet available on the native image.


Docker allows you to run containers on Linux, Windows and MacOS.

The basic steps to create and run a Jellyfin container using Docker are as follows.

  1. Follow the offical installation guide to install Docker.

  2. Download the latest container image.

  3. Create persistent storage for configuration and cache data.

    Either create two persistent volumes:

    Or create two directories on the host and use bind mounts:

  4. Create and run a container in one of the following ways.


The default network mode for Docker is bridge mode. Bridge mode will be used if host mode is omitted. Use host mode for networking in order to use DLNA or an HDHomeRun.

Using Docker command line interface:

Using host networking (--net=host) is optional but required in order to use DLNA or HDHomeRun.

Bind Mounts are needed to pass folders from the host OS to the container OS whereas volumes are maintained by Docker and can be considered easier to backup and control by external programs. For a simple setup, it's considered easier to use Bind Mounts instead of volumes. Replace jellyfin-config and jellyfin-cache with /path/to/config and /path/to/cache respectively if using bind mounts. Multiple media libraries can be bind mounted if needed:


There is currently an issue with read-only mounts in Docker. If there are submounts within the main mount, the submounts are read-write capable.

Using Docker Compose:

Create a docker-compose.yml file with the following contents:

Then while in the same folder as the docker-compose.yml run:

To run the container in background add -d to the above command.

You can learn more about using Docker by reading the official Docker documentation.

Hardware Transcoding with Nvidia (Ubuntu)

You are able to use hardware encoding with Nvidia, but it requires some additional configuration. These steps require basic knowledge of Ubuntu but nothing too special.

Adding Package RepositoriesFirst off you'll need to add the Nvidia package repositories to your Ubuntu installation. This can be done by running the following commands:

Installing Nvidia container toolkitNext we'll need to install the Nvidia container toolkit. This can be done by running the following commands:

After installing the Nvidia Container Toolkit, you'll need to restart the Docker Daemon in order to let Docker use your Nvidia GPU:

Changing the docker-compose.ymlNow that all the packages are in order, let's change the docker-compose.yml to let the Jellyfin container make use of the Nvidia GPU.The following lines need to be added to the file:

Your completed docker-compose.yml file should look something like this:


For Nvidia Hardware encoding the minimum version of docker-compose needs to be 2. However we recommend sticking with version 2.3 as it has proven to work with nvenc encoding.

Unraid Docker

An Unraid Docker template is available in the repository.

  1. Open the unRaid GUI (at least unRaid 6.5) and click on the 'Docker' tab.

  2. Add the following line under 'Template Repositories' and save the options.

  3. Click 'Add Container' and select 'jellyfin'.

  4. Adjust any required paths and save your changes.


A community project to deploy Jellyfin on Kubernetes-based platforms exists at their repository. Any issues or feature requests related to deployment on Kubernetes-based platforms should be filed there.


Podman allows you to run containers as non-root. It's also the offically supported container solution on RHEL and CentOS.

Steps to run Jellyfin using Podman are almost identical to Docker steps:

  1. Install Podman:

  2. Download the latest container image:

  3. Create persistent storage for configuration and cache data:

    Either create two persistent volumes:

    Or create two directories on the host and use bind mounts:

  4. Create and run a Jellyfin container:

Note that Podman doesn't require root access and it's recommended to run the Jellyfin container as a separate non-root user for security.

If SELinux is enabled you need to use either --privileged or supply z volume option to allow Jellyfin to access the volumes.

Replace jellyfin-config and jellyfin-cache with /path/to/config and /path/to/cache respectively if using bind mounts.

To mount your media library read-only append ':ro' to the media volume:

To run as a systemd service see Running containers with Podman and shareable systemd services.


Cloudron is a complete solution for running apps on your server and keeping them up-to-date and secure. On your Cloudron you can install Jellyfin with a few clicks via the app library and updates are delivered automatically.

The source code for the package can be found here.Any issues or feature requests related to deployment on Cloudron should be filed there.

Windows (x86/x64)

Windows installers and builds in ZIP archive format are available here.


If you installed a version prior to 10.4.0 using a PowerShell script, you will need to manually remove the service using the command nssm remove Jellyfin and uninstall the server by remove all the files manually. Also one might need to move the data files to the correct location, or point the installer at the old location.


The 32-bit or x86 version is not recommended. ffmpeg and its video encoders generally perform better as a 64-bit executable due to the extra registers provided. This means that the 32-bit version of Jellyfin is deprecated.

Install using Installer (x64)


  1. Download the latest version.
  2. Run the installer.
  3. (Optional) When installing as a service, pick the service account type.
  4. If everything was completed successfully, the Jellyfin service is now running.
  5. Open your browser at http://localhost:8096 to finish setting up Jellyfin.


  1. Download the latest version.
  2. Run the installer.
  3. If everything was completed successfully, the Jellyfin service is now running as the new version.


  1. Go to Add or remove programs in Windows.
  2. Search for Jellyfin.
  3. Click Uninstall.

Manual Installation (x86/x64)


  1. Download and extract the latest version.
  2. Create a folder jellyfin at your preferred install location.
  3. Copy the extracted folder into the jellyfin folder and rename it to system.
  4. Create jellyfin.bat within your jellyfin folder containing:

    • To use the default library/data location at %localappdata%:

    • To use a custom library/data location (Path after the -d parameter):

    • To use a custom library/data location (Path after the -d parameter) and disable the auto-start of the webapp:

  5. Run

  6. Open your browser at http://<--Server-IP-->:8096 (if auto-start of webapp is disabled)


  1. Stop Jellyfin
  2. Rename the Jellyfin system folder to system-bak
  3. Download and extract the latest Jellyfin version
  4. Copy the extracted folder into the jellyfin folder and rename it to system
  5. Run jellyfin.bat to start the server again


  1. Stop Jellyfin.
  2. Delete the system folder.
  3. Rename system-bak to system.
  4. Run jellyfin.bat to start the server again.


MacOS Application packages and builds in TAR archive format are available here.


  1. Download the latest version.
  2. Drag the .app package into the Applications folder.
  3. Start the application.
  4. Open your browser at


  1. Download the latest version.
  2. Stop the currently running server either via the dashboard or using the application icon.
  3. Drag the new .app package into the Applications folder and click yes to replace the files.
  4. Start the application.
  5. Open your browser at


  1. Stop the currently running server either via the dashboard or using the application icon.
  2. Move the .app package to the trash.

Deleting Configuation

This will delete all settings and user information. This applies for the .app package and the portable version.

  1. Delete the folder ~/.config/jellyfin/
  2. Delete the folder ~/.local/share/jellyfin/

Portable Version

  1. Download the latest version
  2. Extract it into the Applications folder
  3. Open Terminal and type cd followed with a space then drag the jellyfin folder into the terminal.
  4. Type ./jellyfin to run jellyfin.
  5. Open your browser at http://localhost:8096

Closing the terminal window will end Jellyfin. Running Jellyfin in screen or tmux can prevent this from happening.

Upgrading the Portable Version

  1. Download the latest version.
  2. Stop the currently running server either via the dashboard or using CTRL+C in the terminal window.
  3. Extract the latest version into Applications
  4. Open Terminal and type cd followed with a space then drag the jellyfin folder into the terminal.
  5. Type ./jellyfin to run jellyfin.
  6. Open your browser at http://localhost:8096

Uninstalling the Portable Version

  1. Stop the currently running server either via the dashboard or using CTRL+C in the terminal window.
  2. Move /Application/jellyfin-version folder to the Trash. Replace version with the actual version number you are trying to delete.

Using FFmpeg with the Portable Version

The portable version doesn't come with FFmpeg by default, so to install FFmpeg you have three options.

  • use the package manager homebrew by typing brew install ffmpeg into your Terminal (here's how to install homebrew if you don't have it already
  • download the most recent static build from this link (compiled by a third party see this page for options and information), or
  • compile from source available from the official website

More detailed download options, documentation, and signatures can be found.

If using static build, extract it to the /Applications/ folder.

Navigate to the Playback tab in the Dashboard and set the path to FFmpeg under FFmpeg Path.


Linux (generic amd64)

Generic amd64 Linux builds in TAR archive format are available here.

Installation Process

Create a directory in /opt for jellyfin and its files, and enter that directory.

Download the latest generic Linux build from the release page. The generic Linux build ends with 'linux-amd64.tar.gz'. The rest of these instructions assume version 10.4.3 is being installed (i.e. jellyfin_10.4.3_linux-amd64.tar.gz). Download the generic build, then extract the archive:

Create a symbolic link to the Jellyfin 10.4.3 directory. This allows an upgrade by repeating the above steps and enabling it by simply re-creating the symbolic link to the new version.

Create four sub-directories for Jellyfin data.

If you are running Debian or a derivative, you can also download and install an ffmpeg release built specifically for Jellyfin. Be sure to download the latest release that matches your OS (4.2.1-5 for Debian Stretch assumed below).

If you run into any dependency errors, run this and it will install them and jellyfin-ffmpeg.

Due to the number of command line options that must be passed, it is easiest to create a small script to run Jellyfin.

Then paste the following commands and modify as needed.

Assuming you desire Jellyfin to run as a non-root user, chmod all files and directories to your normal login user and group. Also make the startup script above executable.

Finally you can run it. You will see lots of log information when run, this is normal. Setup is as usual in the web browser.

Portable DLL

Platform-agnostic .NET Core DLL builds in TAR archive format are available here. These builds use the binary jellyfin.dll and must be loaded with dotnet.

Arch Linux

Jellyfin can be found in the AUR as jellyfin, jellyfin-bin and jellyfin-git.


Fedora builds in RPM package format are available here for now but an official Fedora repository is coming soon.

  1. You will need to enable rpmfusion as ffmpeg is a dependency of the jellyfin server package


    You do not need to manually install ffmpeg, it will be installed by the jellyfin server package as a dependency

  2. Install the jellyfin server

  3. Install the jellyfin web interface

  4. Enable jellyfin service with systemd

  5. Open jellyfin service with firewalld


    This will open the following ports8096 TCP used by default for HTTP traffic, you can change this in the dashboard8920 TCP used by default for HTTPS traffic, you can change this in the dashboard1900 UDP used for service auto-discovery, this is not configurable7359 UDP used for auto-discovery, this is not configurable

  6. Reboot your box

  7. Go to localhost:8096 or ip-address-of-jellyfin-server:8096 to finish setup in the web UI


CentOS/RHEL 7 builds in RPM package format are available here and an official CentOS/RHEL repository is planned for the future.

The default CentOS/RHEL repositories don't carry FFmpeg, which the RPM requires. You will need to add a third-party repository which carries FFmpeg, such as RPM Fusion's Free repository.

You can also build Jellyfin's version on your own. This includes gathering the dependencies and compiling and installing them. Instructions can be found at the FFmpeg wiki.



The Jellyfin team provides a Debian repository for installation on Debian Stretch/Buster. Supported architectures are amd64, arm64, and armhf.


Microsoft does not provide a .NET for 32-bit x86 Linux systems, and hence Jellyfin is not supported on the i386 architecture.

  1. Install HTTPS transport for APT as well as gnupg and lsb-release if you haven't already.

  2. Import the GPG signing key (signed by the Jellyfin Team):

  3. Add a repository configuration at /etc/apt/sources.list.d/jellyfin.list:


    Supported releases are stretch, buster, and bullseye.

  4. Update APT repositories:

  5. Install Jellyfin:

  6. Manage the Jellyfin system service with your tool of choice:


Raw Debian packages, including old versions, are available here.


The repository is the preferred way to obtain Jellyfin on Debian, as it contains several dependencies as well.

  1. Download the desired jellyfin and jellyfin-ffmpeg.deb packages from the repository.

  2. Install the downloaded .deb packages:

  3. Use apt to install any missing dependencies:

  4. Manage the Jellyfin system service with your tool of choice:


Migrating to the new repository

Previous versions of Jellyfin included Ubuntu under the Debian repository. This has now been split out into its own repository to better handle the separate binary packages. If you encounter errors about the ubuntu release not being found and you previously configured an ubuntujellyfin.list file, please follow these steps.

  1. Remove the old /etc/apt/sources.list.d/jellyfin.list file:

  2. Proceed with the following section as written.

Ubuntu Repository

The Jellyfin team provides an Ubuntu repository for installation on Ubuntu Xenial, Bionic, Cosmic, Disco, Eoan, and Focal. Supported architectures are amd64, arm64, and armhf. Only amd64 is supported on Ubuntu Xenial.


Microsoft does not provide a .NET for 32-bit x86 Linux systems, and hence Jellyfin is not supported on the i386 architecture.

  1. Install HTTPS transport for APT if you haven't already:

  2. Enable the Universe repository to obtain all the FFMpeg dependencies:


    If the above command fails you will need to install the following package software-properties-common.This can be achieved with the following command sudo apt-get install software-properties-common

  3. Import the GPG signing key (signed by the Jellyfin Team):

  4. Add a repository configuration at /etc/apt/sources.list.d/jellyfin.list:


    Supported releases are xenial, bionic, cosmic, disco, eoan, and focal.

  5. Update APT repositories:

  6. Install Jellyfin:

  7. Manage the Jellyfin system service with your tool of choice:

Ubuntu Packages

Raw Ubuntu packages, including old versions, are available here.


The repository is the preferred way to install Jellyfin on Ubuntu, as it contains several dependencies as well.

  1. Enable the Universe repository to obtain all the FFMpeg dependencies, and update repositories:

  2. Download the desired jellyfin and jellyfin-ffmpeg.deb packages from the repository.

  3. Install the required dependencies:

  4. Install the downloaded .deb packages:

  5. Use apt to install any missing dependencies:

  6. Manage the Jellyfin system service with your tool of choice:

Migrating native Debuntu install to docker

It's possible to map your local installation's files to the official docker image.


You need to have exactly matching paths for your files inside the docker container! This means that if your media is stored at /media/raid/ this path needs to be accessible at /media/raid/ inside the docker container too - the configurations below do include examples.

To guarantee proper permissions, get the uid and gid of your local jellyfin user and jellyfin group by running the following command:

Start Docker Daemon In Ubuntu

You need to replace the <uid>:<gid> placeholder below with the correct values.

Using docker

Using docker-compose

Complete Docker CLI

Container Management CLIs

Inspecting The Container

Interacting with Container

Image Management Commands

Image Transfer Comnands

Builder Main Commands

The Docker CLI

Manage images

docker build

Create an image from a Dockerfile.

docker run

Run a command in an image.

Manage containers

docker create


Create a container from an image.

docker exec

Run ubuntu docker on windows


Run commands in a container.

docker start

Start/stop a container.

docker ps

Manage containers using ps/kill.


docker images

Manages images.

docker rmi

Deletes images.

Also see

  • Getting Started(docker.io)








Configures a container that will run as an executable.

This will use shell processing to substitute shell variables, and will ignore any CMD or docker run command line arguments.


See also

Basic example






Environment variables


Other options

Advanced features

Run Ubuntu Docker


DNS servers


External links



To view list of all the services runnning in swarm

To see all running services

to see all services logs

To scale services quickly across qualified node

clean up

To clean or prune unused (dangling) images

To remove all images which are not in use containers , add - a

Start Docker In Ubuntu Vm

To Purne your entire system

To leave swarm

To remove swarm ( deletes all volume data and database info)

To kill all running containers

Contributor -

Run Docker In Ubuntu 16.04

Sangam biradar - Docker Community Leader

Run a Docker Container in Ubuntu. In order to create and run a Docker container, first you need to run a command into a downloaded CentOS image, so a basic command would be to check the distribution version file inside the container using cat command, as shown. $ docker run centos cat /etc/issue 14. Docker run microsoft/dotnet-samples:dotnetapp-nanoserver-1809. The container will start, print the hello world message, and then exits. Running Linux Containers on Windows Server 2019. Out of the box, Docker on Windows only run Windows container. This is not a server platform upon which you will host websites, run server infrastructure, etc. For running production workloads on Ubuntu, we have some great solutions using Azure, Hyper-V, and Docker, and we have great tooling for developing containerized apps within Windows using Docker Tools for Visual Studio, Visual Studio Code and yo docker. Prior to WSL2, one could run the Docker client in WSL1, using it to drive Docker for Windows running atop Hyper-V on the local host, or to manage a remote Docker server. But one cannot run Docker Engine on WSL1 for many technical reasons. However, you can do the same in Docker on WSL2, but you can also run the Docker Engine itself atop WSL if.

Estimated reading time: 15 minutes

Welcome to Docker Desktop! The Docker Desktop for Windows user manual provides information on how to configure and manage your Docker Desktop settings.

For information about Docker Desktop download, system requirements, and installation instructions, see Install Docker Desktop.


The Docker Desktop menu allows you to configure your Docker settings such as installation, updates, version channels, Docker Hub login,and more.

This section explains the configuration options accessible from the Settings dialog.

  1. Open the Docker Desktop menu by clicking the Docker icon in the Notifications area (or System tray):

  2. Select Settings to open the Settings dialog:


On the General tab of the Settings dialog, you can configure when to start and update Docker.

  • Start Docker when you log in - Automatically start Docker Desktop upon Windows system login.

  • Expose daemon on tcp://localhost:2375 without TLS - Click this option to enable legacy clients to connect to the Docker daemon. You must use this option with caution as exposing the daemon without TLS can result in remote code execution attacks.

  • Send usage statistics - By default, Docker Desktop sends diagnostics,crash reports, and usage data. This information helps Docker improve andtroubleshoot the application. Clear the check box to opt out. Docker may periodically prompt you for more information.


The Resources tab allows you to configure CPU, memory, disk, proxies, network, and other resources. Different settings are available for configuration depending on whether you are using Linux containers in WSL 2 mode, Linux containers in Hyper-V mode, or Windows containers.



The Advanced tab is only available in Hyper-V mode, because in WSL 2 mode and Windows container mode these resources are managed by Windows. In WSL 2 mode, you can configure limits on the memory, CPU, and swap size allocatedto the WSL 2 utility VM.

Use the Advanced tab to limit resources available to Docker.

CPUs: By default, Docker Desktop is set to use half the number of processorsavailable on the host machine. To increase processing power, set this to ahigher number; to decrease, lower the number.

Memory: By default, Docker Desktop is set to use 2 GB runtime memory,allocated from the total available memory on your machine. To increase the RAM, set this to a higher number. To decrease it, lower the number.

Swap: Configure swap file size as needed. The default is 1 GB.

Disk image size: Specify the size of the disk image.

Disk image location: Specify the location of the Linux volume where containers and images are stored.

You can also move the disk image to a different location. If you attempt to move a disk image to a location that already has one, you get a prompt asking if you want to use the existing image or replace it.

File sharing


The File sharing tab is only available in Hyper-V mode, because in WSL 2 mode and Windows container mode all files are automatically shared by Windows.

Use File sharing to allow local directories on Windows to be shared with Linux containers.This is especially useful forediting source code in an IDE on the host while running and testing the code in a container.Note that configuring file sharing is not necessary for Windows containers, only Linux containers. If a directory is not shared with a Linux container you may get file not found or cannot start service errors at runtime. See Volume mounting requires shared folders for Linux containers.

File share settings are:

  • Add a Directory: Click + and navigate to the directory you want to add.

  • Apply & Restart makes the directory available to containers using Docker’sbind mount (-v) feature.

Tips on shared folders, permissions, and volume mounts

  • Share only the directories that you need with the container. File sharing introduces overhead as any changes to the files on the host need to be notified to the Linux VM. Sharing too many files can lead to high CPU load and slow filesystem performance.

  • Shared folders are designed to allow application code to be edited on the host while being executed in containers. For non-code items such as cache directories or databases, the performance will be much better if they are stored in the Linux VM, using a data volume (named volume) or data container.

  • Docker Desktop sets permissions to read/write/execute for users, groups and others 0777 or a+rwx.This is not configurable. See Permissions errors on data directories for shared volumes.

  • Windows presents a case-insensitive view of the filesystem to applications while Linux is case-sensitive. On Linux it is possible to create 2 separate files: test and Test, while on Windows these filenames would actually refer to the same underlying file. This can lead to problems where an app works correctly on a developer Windows machine (where the file contents are shared) but fails when run in Linux in production (where the file contents are distinct). To avoid this, Docker Desktop insists that all shared files are accessed as their original case. Therefore if a file is created called test, it must be opened as test. Attempts to open Test will fail with “No such file or directory”. Similarly once a file called test is created, attempts to create a second file called Test will fail.

Shared folders on demand

You can share a folder “on demand” the first time a particular folder is used by a container.

If you run a Docker command from a shell with a volume mount (as shown in theexample below) or kick off a Compose file that includes volume mounts, you get apopup asking if you want to share the specified folder.

You can select to Share it, in which case it is added your Docker Desktop Shared Folders list and available tocontainers. Alternatively, you can opt not to share it by selecting Cancel.


Docker Desktop lets you configure HTTP/HTTPS Proxy Settings andautomatically propagates these to Docker. For example, if you set your proxysettings to http://proxy.example.com, Docker uses this proxy when pulling containers.

Your proxy settings, however, will not be propagated into the containers you start.If you wish to set the proxy settings for your containers, you need to defineenvironment variables for them, just like you would do on Linux, for example:

For more information on setting environment variables for running containers,see Set environment variables.



The Network tab is not available in Windows container mode because networking is managed by Windows.

You can configure Docker Desktop networking to work on a virtual private network (VPN). Specify a network address translation (NAT) prefix and subnet mask to enable Internet connectivity.

DNS Server: You can configure the DNS server to use dynamic or static IP addressing.


Some users reported problems connecting to Docker Hub on Docker Desktop. This would manifest as an error when trying to rundocker commands that pull images from Docker Hub that are not alreadydownloaded, such as a first time run of docker run hello-world. If youencounter this, reset the DNS server to use the Google DNS fixed address: For more information, seeNetworking issues in Troubleshooting.

Updating these settings requires a reconfiguration and reboot of the Linux VM.

WSL Integration

Run Ubuntu Docker

In WSL 2 mode, you can configure which WSL 2 distributions will have the Docker WSL integration.

By default, the integration will be enabled on your default WSL distribution. To change your default WSL distro, run wsl --set-default <distro name>. (For example, to set Ubuntu as your default WSL distro, run wsl --set-default ubuntu).

You can also select any additional distributions you would like to enable the WSL 2 integration on.

For more details on configuring Docker Desktop to use WSL 2, see Docker Desktop WSL 2 backend.

Docker Engine

The Docker Engine page allows you to configure the Docker daemon to determine how your containers run.

Type a JSON configuration file in the box to configure the daemon settings. For a full list of options, see the Docker Enginedockerd commandline reference.

Click Apply & Restart to save your settings and restart Docker Desktop.

Command Line

On the Command Line page, you can specify whether or not to enable experimental features.

You can toggle the experimental features on and off in Docker Desktop. If you toggle the experimental features off, Docker Desktop uses the current generally available release of Docker Engine.

Experimental features

Experimental features provide early access to future product functionality.These features are intended for testing and feedback only as they may changebetween releases without warning or can be removed entirely from a futurerelease. Experimental features must not be used in production environments.Docker does not offer support for experimental features.

For a list of current experimental features in the Docker CLI, see Docker CLI Experimental features.

Run docker version to verify whether you have enabled experimental features. Experimental modeis listed under Server data. If Experimental is true, then Docker isrunning in experimental mode, as shown here:



The Kubernetes tab is not available in Windows container mode.

Docker Desktop includes a standalone Kubernetes server that runs on your Windows machince, sothat you can test deploying your Docker workloads on Kubernetes. To enable Kubernetes support and install a standalone instance of Kubernetes running as a Docker container, select Enable Kubernetes.

For more information about using the Kubernetes integration with Docker Desktop, see Deploy on Kubernetes.


The Restart Docker Desktop and Reset to factory defaults options are now available on the Troubleshoot menu. For information, see Logs and Troubleshooting.


Visit our Logs and Troubleshooting guide for more details.

Log on to our Docker Desktop for Windows forum to get help from the community, review current user topics, or join a discussion.

Log on to Docker Desktop for Windows issues on GitHub to report bugs or problems and review community reported issues.

For information about providing feedback on the documentation or update it yourself, see Contribute to documentation.

Switch between Windows and Linux containers

From the Docker Desktop menu, you can toggle which daemon (Linux or Windows)the Docker CLI talks to. Select Switch to Windows containers to use Windowscontainers, or select Switch to Linux containers to use Linux containers(the default).

For more information on Windows containers, refer to the following documentation:

  • Microsoft documentation on Windows containers.

  • Build and Run Your First Windows Server Container (Blog Post)gives a quick tour of how to build and run native Docker Windows containers on Windows 10 and Windows Server 2016 evaluation releases.

  • Getting Started with Windows Containers (Lab)shows you how to use the MusicStoreapplication with Windows containers. The MusicStore is a standard .NET application and,forked here to use containers, is a good example of a multi-container application.

  • To understand how to connect to Windows containers from the local host, seeLimitations of Windows containers for localhost and published ports

Settings dialog changes with Windows containers

When you switch to Windows containers, the Settings dialog only shows those tabs that are active and apply to your Windows containers:

If you set proxies or daemon configuration in Windows containers mode, theseapply only on Windows containers. If you switch back to Linux containers,proxies and daemon configurations return to what you had set for Linuxcontainers. Your Windows container settings are retained and become availableagain when you switch back.


The Docker Desktop Dashboard enables you to interact with containers and applications and manage the lifecycle of your applications directly from your machine. The Dashboard UI shows all running, stopped, and started containers with their state. It provides an intuitive interface to perform common actions to inspect and manage containers and Docker Compose applications. For more information, see Docker Desktop Dashboard.

Docker Hub

Select Sign in /Create Docker ID from the Docker Desktop menu to access your Docker Hub account. Once logged in, you can access your Docker Hub repositories directly from the Docker Desktop menu.

For more information, refer to the following Docker Hub topics:

Two-factor authentication

Docker Desktop enables you to sign into Docker Hub using two-factor authentication. Two-factor authentication provides an extra layer of security when accessing your Docker Hub account.

You must enable two-factor authentication in Docker Hub before signing into your Docker Hub account through Docker Desktop. For instructions, see Enable two-factor authentication for Docker Hub.

After you have enabled two-factor authentication:

  1. Go to the Docker Desktop menu and then select Sign in / Create Docker ID.

  2. Enter your Docker ID and password and click Sign in.

  3. After you have successfully signed in, Docker Desktop prompts you to enter the authentication code. Enter the six-digit code from your phone and then click Verify.

After you have successfully authenticated, you can access your organizations and repositories directly from the Docker Desktop menu.

Adding TLS certificates

Run Ubuntu Docker Container

You can add trusted Certificate Authorities (CAs) to your Docker daemon to verify registry server certificates, and client certificates, to authenticate to registries.

How do I add custom CA certificates?

Docker Desktop supports all trusted Certificate Authorities (CAs) (root orintermediate). Docker recognizes certs stored under Trust RootCertification Authorities or Intermediate Certification Authorities.

Docker Desktop creates a certificate bundle of all user-trusted CAs based onthe Windows certificate store, and appends it to Moby trusted certificates. Therefore, if an enterprise SSL certificate is trusted by the user on the host, it is trusted by Docker Desktop.

To learn more about how to install a CA root certificate for the registry, seeVerify repository client with certificatesin the Docker Engine topics.

How do I add client certificates?

You can add your client certificatesin ~/.docker/certs.d/<MyRegistry>:<Port>/client.cert and~/.docker/certs.d/<MyRegistry>:<Port>/client.key. You do not need to push your certificates with git commands.

When the Docker Desktop application starts, it copies the~/.docker/certs.d folder on your Windows system to the /etc/docker/certs.ddirectory on Moby (the Docker Desktop virtual machine running on Hyper-V).

You need to restart Docker Desktop after making any changes to the keychainor to the ~/.docker/certs.d directory in order for the changes to take effect.

The registry cannot be listed as an insecure registry (seeDocker Daemon). Docker Desktop ignorescertificates listed under insecure registries, and does not send clientcertificates. Commands like docker run that attempt to pull from the registryproduce error messages on the command line, as well as on the registry.

To learn more about how to set the client TLS certificate for verification, seeVerify repository client with certificatesin the Docker Engine topics.

Where to go next

  • Try out the walkthrough at Get Started.

  • Dig in deeper with Docker Labs example walkthroughs and source code.

  • Refer to the Docker CLI Reference Guide.

windows, edge, tutorial, run, docker, local, machine


Run a command in a new container


Extended description

The docker run command first creates a writeable container layer over thespecified image, and then starts it using the specified command. That is,docker run is equivalent to the API /containers/create then/containers/(id)/start. A stopped container can be restarted with all itsprevious changes intact using docker start. See docker ps -a to view a listof all containers.

The docker run command can be used in combination with docker commit tochange the command that a container runs. There is additional detailed information about docker run in the Docker run reference.

For information on connecting a container to a network, see the “Docker network overview”.

For example uses of this command, refer to the examples section below.


Name, shorthandDefaultDescription
--add-hostAdd a custom host-to-IP mapping (host:ip)
--attach , -aAttach to STDIN, STDOUT or STDERR
--blkio-weightBlock IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
--blkio-weight-deviceBlock IO weight (relative device weight)
--cap-addAdd Linux capabilities
--cap-dropDrop Linux capabilities
--cgroup-parentOptional parent cgroup for the container
--cgroupnsAPI 1.41+
Cgroup namespace to use (host private)'host': Run the container in the Docker host's cgroup namespace'private': Run the container in its own private cgroup namespace': Use the cgroup namespace as configured by the default-cgroupns-mode option on the daemon (default)
--cidfileWrite the container ID to the file
--cpu-countCPU count (Windows only)
--cpu-percentCPU percent (Windows only)
--cpu-periodLimit CPU CFS (Completely Fair Scheduler) period
--cpu-quotaLimit CPU CFS (Completely Fair Scheduler) quota
--cpu-rt-periodAPI 1.25+
Limit CPU real-time period in microseconds
--cpu-rt-runtimeAPI 1.25+
Limit CPU real-time runtime in microseconds
--cpu-shares , -cCPU shares (relative weight)
--cpusAPI 1.25+
Number of CPUs
--cpuset-cpusCPUs in which to allow execution (0-3, 0,1)
--cpuset-memsMEMs in which to allow execution (0-3, 0,1)
--detach , -dRun container in background and print container ID
--detach-keysOverride the key sequence for detaching a container
--deviceAdd a host device to the container
--device-cgroup-ruleAdd a rule to the cgroup allowed devices list
--device-read-bpsLimit read rate (bytes per second) from a device
--device-read-iopsLimit read rate (IO per second) from a device
--device-write-bpsLimit write rate (bytes per second) to a device
--device-write-iopsLimit write rate (IO per second) to a device
--disable-content-trusttrueSkip image verification
--dnsSet custom DNS servers
--dns-optSet DNS options
--dns-optionSet DNS options
--dns-searchSet custom DNS search domains
--domainnameContainer NIS domain name
--entrypointOverwrite the default ENTRYPOINT of the image
--env , -eSet environment variables
--env-fileRead in a file of environment variables
--exposeExpose a port or a range of ports
--gpusAPI 1.40+
GPU devices to add to the container ('all' to pass all GPUs)
--group-addAdd additional groups to join
--health-cmdCommand to run to check health
--health-intervalTime between running the check (ms s m h) (default 0s)
--health-retriesConsecutive failures needed to report unhealthy
--health-start-periodAPI 1.29+
Start period for the container to initialize before starting health-retries countdown (ms s m h) (default 0s)
--health-timeoutMaximum time to allow one check to run (ms s m h) (default 0s)
--helpPrint usage
--hostname , -hContainer host name
--initAPI 1.25+
Run an init inside the container that forwards signals and reaps processes
--interactive , -iKeep STDIN open even if not attached
--io-maxbandwidthMaximum IO bandwidth limit for the system drive (Windows only)
--io-maxiopsMaximum IOps limit for the system drive (Windows only)
--ipIPv4 address (e.g.,
--ip6IPv6 address (e.g., 2001:db8::33)
--ipcIPC mode to use
--isolationContainer isolation technology
--kernel-memoryKernel memory limit
--label , -lSet meta data on a container
--label-fileRead in a line delimited file of labels
--linkAdd link to another container
--link-local-ipContainer IPv4/IPv6 link-local addresses
--log-driverLogging driver for the container
--log-optLog driver options
--mac-addressContainer MAC address (e.g., 92:d0:c6:0a:29:33)
--memory , -mMemory limit
--memory-reservationMemory soft limit
--memory-swapSwap limit equal to memory plus swap: '-1' to enable unlimited swap
--memory-swappiness-1Tune container memory swappiness (0 to 100)
--mountAttach a filesystem mount to the container
--nameAssign a name to the container
--netConnect a container to a network
--net-aliasAdd network-scoped alias for the container
--networkConnect a container to a network
--network-aliasAdd network-scoped alias for the container
--no-healthcheckDisable any container-specified HEALTHCHECK
--oom-kill-disableDisable OOM Killer
--oom-score-adjTune host's OOM preferences (-1000 to 1000)
--pidPID namespace to use
--pids-limitTune container pids limit (set -1 for unlimited)
--platformAPI 1.32+
Set platform if server is multi-platform capable
--privilegedGive extended privileges to this container
--publish , -pPublish a container's port(s) to the host
--publish-all , -PPublish all exposed ports to random ports
--pullmissingPull image before running ('always' 'missing' 'never')
--read-onlyMount the container's root filesystem as read only
--restartnoRestart policy to apply when a container exits
--rmAutomatically remove the container when it exits
--runtimeRuntime to use for this container
--security-optSecurity Options
--shm-sizeSize of /dev/shm
--sig-proxytrueProxy received signals to the process
--stop-signalSIGTERMSignal to stop a container
--stop-timeoutAPI 1.25+
Timeout (in seconds) to stop a container
--storage-optStorage driver options for the container
--sysctlSysctl options
--tmpfsMount a tmpfs directory
--tty , -tAllocate a pseudo-TTY
--ulimitUlimit options
--user , -uUsername or UID (format: <name uid>[:<group gid>])
--usernsUser namespace to use
--utsUTS namespace to use
--volume , -vBind mount a volume
--volume-driverOptional volume driver for the container
--volumes-fromMount volumes from the specified container(s)
--workdir , -wWorking directory inside the container


Assign name and allocate pseudo-TTY (--name, -it)

This example runs a container named test using the debian:latestimage. The -it instructs Docker to allocate a pseudo-TTY connected tothe container’s stdin; creating an interactive bash shell in the container.In the example, the bash shell is quit by enteringexit 13. This exit code is passed on to the caller ofdocker run, and is recorded in the test container’s metadata.

Capture container ID (--cidfile)

This will create a container and print test to the console. The cidfileflag makes Docker attempt to create a new file and write the container ID to it.If the file exists already, Docker will return an error. Docker will close thisfile when docker run exits.

Full container capabilities (--privileged)

This will not work, because by default, most potentially dangerous kernelcapabilities are dropped; including cap_sys_admin (which is required to mountfilesystems). However, the --privileged flag will allow it to run:

The --privileged flag gives all capabilities to the container, and it alsolifts all the limitations enforced by the device cgroup controller. In otherwords, the container can then do almost everything that the host can do. Thisflag exists to allow special use-cases, like running Docker within Docker.

Set working directory (-w)

The -w lets the command being executed inside directory given, here/path/to/dir/. If the path does not exist it is created inside the container.

Set storage driver options per container

This (size) will allow to set the container rootfs size to 120G at creation time.This option is only available for the devicemapper, btrfs, overlay2,windowsfilter and zfs graph drivers.For the devicemapper, btrfs, windowsfilter and zfs graph drivers,user cannot pass a size less than the Default BaseFS Size.For the overlay2 storage driver, the size option is only available if thebacking fs is xfs and mounted with the pquota mount option.Under these conditions, user can pass any size less than the backing fs size.

Mount tmpfs (--tmpfs)

The --tmpfs flag mounts an empty tmpfs into the container with the rw,noexec, nosuid, size=65536k options.

Mount volume (-v, --read-only)

The -v flag mounts the current working directory into the container. The -wlets the command being executed inside the current working directory, bychanging into the directory to the value returned by pwd. So thiscombination executes the command using the container, but inside thecurrent working directory.

When the host directory of a bind-mounted volume doesn’t exist, Dockerwill automatically create this directory on the host for you. In theexample above, Docker will create the /doesnt/existfolder before starting your container.


Volumes can be used in combination with --read-only to control wherea container writes files. The --read-only flag mounts the container’s rootfilesystem as read only prohibiting writes to locations other than thespecified volumes for the container.

By bind-mounting the docker unix socket and statically linked dockerbinary (refer to get the linux binary),you give the container the full access to create and manipulate the host’sDocker daemon.

On Windows, the paths must be specified using Windows-style semantics.

The following examples will fail when using Windows-based containers, as thedestination of a volume or bind mount inside the container must be one of:a non-existing or empty directory; or a drive other than C:. Further, the sourceof a bind mount must be a local directory, not a file.

For in-depth information about volumes, refer to manage data in containers

Add bind mounts or volumes using the --mount flag

The --mount flag allows you to mount volumes, host-directories and tmpfsmounts in a container.

The --mount flag supports most options that are supported by the -v or the--volume flag, but uses a different syntax. For in-depth information on the--mount flag, and a comparison between --volume and --mount, refer tothe service create command reference.

Even though there is no plan to deprecate --volume, usage of --mount is recommended.


Publish or expose port (-p, --expose)

This binds port 8080 of the container to TCP port 80 on of the hostmachine. You can also specify udp and sctp ports.The Docker User Guideexplains in detail how to manipulate ports in Docker.

Note that ports which are not bound to the host (i.e., -p 80:80 instead of-p will be accessible from the outside. This also applies ifyou configured UFW to block this specific port, as Docker manages hisown iptables rules. Read more

This exposes port 80 of the container without publishing the port to the hostsystem’s interfaces.

Set environment variables (-e, --env, --env-file)

Use the -e, --env, and --env-file flags to set simple (non-array)environment variables in the container you’re running, or overwrite variablesthat are defined in the Dockerfile of the image you’re running.

You can define the variable and its value when running the container:

You can also use variables that you’ve exported to your local environment:

When running the command, the Docker CLI client checks the value the variablehas in your local environment and passes it to the container.If no = is provided and that variable is not exported in your localenvironment, the variable won’t be set in the container.

You can also load the environment variables from a file. This file should usethe syntax <variable>=value (which sets the variable to the given value) or<variable> (which takes the value from the local environment), and # for comments.

Set metadata on container (-l, --label, --label-file)

A label is a key=value pair that applies metadata to a container. To label a container with two labels:

The my-label key doesn’t specify a value so the label defaults to an emptystring ('). To add multiple labels, repeat the label flag (-l or --label).

The key=value must be unique to avoid overwriting the label value. If youspecify labels with identical keys but different values, each subsequent valueoverwrites the previous. Docker uses the last key=value you supply.

Use the --label-file flag to load multiple labels from a file. Delimit eachlabel in the file with an EOL mark. The example below loads labels from alabels file in the current directory:

The label-file format is similar to the format for loading environmentvariables. (Unlike environment variables, labels are not visible to processesrunning inside a container.) The following example illustrates a label-fileformat:

You can load multiple label-files by supplying multiple --label-file flags.

For additional information on working with labels, see Labels - custommetadata in Docker inthe Docker User Guide.

Connect a container to a network (--network)

When you start a container use the --network flag to connect it to a network.This adds the busybox container to the my-net network.

You can also choose the IP addresses for the container with --ip and --ip6flags when you start the container on a user-defined network.

If you want to add a running container to a network use the docker network connect subcommand.

You can connect multiple containers to the same network. Once connected, thecontainers can communicate easily need only another container’s IP addressor name. For overlay networks or custom plugins that support multi-hostconnectivity, containers connected to the same multi-host network but launchedfrom different Engines can also communicate in this way.


Service discovery is unavailable on the default bridge network. Containers cancommunicate via their IP addresses by default. To communicate by name, theymust be linked.

You can disconnect a container from a network using the docker networkdisconnect command.

Mount volumes from container (--volumes-from)

The --volumes-from flag mounts all the defined volumes from the referencedcontainers. Containers can be specified by repetitions of the --volumes-fromargument. The container ID may be optionally suffixed with :ro or :rw tomount the volumes in read-only or read-write mode, respectively. By default,the volumes are mounted in the same mode (read write or read only) asthe reference container.

Labeling systems like SELinux require that proper labels are placed on volumecontent mounted into a container. Without a label, the security system mightprevent the processes running inside the container from using the content. Bydefault, Docker does not change the labels set by the OS.

To change the label in the container context, you can add either of two suffixes:z or :Z to the volume mount. These suffixes tell Docker to relabel fileobjects on the shared volumes. The z option tells Docker that two containersshare the volume content. As a result, Docker labels the content with a sharedcontent label. Shared volume labels allow all containers to read/write content.The Z option tells Docker to label the content with a private unshared label.Only the current container can use a private volume.


The -a flag tells docker run to bind to the container’s STDIN, STDOUTor STDERR. This makes it possible to manipulate the output and input asneeded.

This pipes data into a container and prints the container’s ID by attachingonly to the container’s STDIN.

This isn’t going to print anything unless there’s an error because we’veonly attached to the STDERR of the container. The container’s logsstill store what’s been written to STDERR and STDOUT.

This is how piping a file into a container could be done for a build.The container’s ID will be printed after the build is done and the buildlogs could be retrieved using docker logs. This isuseful if you need to pipe a file or something else into a container andretrieve the container’s ID once the container has finished running.

Add host device to container (--device)

It is often necessary to directly expose devices to a container. The --deviceoption enables that. For example, a specific block storage device or loopdevice or audio device can be added to an otherwise unprivileged container(without the --privileged flag) and have the application directly access it.

By default, the container will be able to read, write and mknod these devices.This can be overridden using a third :rwm set of options to each --deviceflag. If the container is running in privileged mode, then the permissions specifiedwill be ignored.


The --device option cannot be safely used with ephemeral devices. Block devicesthat may be removed should not be added to untrusted containers with --device.

For Windows, the format of the string passed to the --device option is inthe form of --device=<IdType>/<Id>. Beginning with Windows Server 2019and Windows 10 October 2018 Update, Windows only supports an IdType ofclass and the Id as a device interface classGUID.Refer to the table defined in the Windows containerdocsfor a list of container-supported device interface class GUIDs.

If this option is specified for a process-isolated Windows container, alldevices that implement the requested device interface class GUID are madeavailable in the container. For example, the command below makes all COMports on the host visible in the container.


The --device option is only supported on process-isolated Windows containers.This option fails if the container isolation is hyperv or when running LinuxContainers on Windows (LCOW).

Run Ubuntu Docker Interactive

Access an NVIDIA GPU

The --gpus­ flag allows you to access NVIDIA GPU resources. First you need toinstall nvidia-container-runtime.Visit Specify a container’s resourcesfor more information.

To use --gpus, specify which GPUs (or all) to use. If no value is provied, allavailable GPUs are used. The example below exposes all available GPUs.

Use the device option to specify GPUs. The example below exposes a specificGPU.

The example below exposes the first and third GPUs.

Restart policies (--restart)

Use Docker’s --restart to specify a container’s restart policy. A restartpolicy controls whether the Docker daemon restarts a container after exit.Docker supports the following restart policies:

noDo not automatically restart the container when it exits. This is the default.
on-failure[:max-retries]Restart only if the container exits with a non-zero exit status. Optionally, limit the number of restart retries the Docker daemon attempts.
unless-stoppedRestart the container unless it is explicitly stopped or Docker itself is stopped or restarted.
alwaysAlways restart the container regardless of the exit status. When you specify always, the Docker daemon will try to restart the container indefinitely. The container will also always start on daemon startup, regardless of the current state of the container.

This will run the redis container with a restart policy of alwaysso that if the container exits, Docker will restart it.

More detailed information on restart policies can be found in theRestart Policies (--restart)section of the Docker run reference page.

Run Ubuntu Docker On Mac

Add entries to container hosts file (--add-host)

You can add other hosts into a container’s /etc/hosts file by using one ormore --add-host flags. This example adds a static address for a host nameddocker:

Sometimes you need to connect to the Docker host from within yourcontainer. To enable this, pass the Docker host’s IP address tothe container using the --add-host flag. To find the host’s address,use the ip addr show command.

The flags you pass to ip addr show depend on whether you areusing IPv4 or IPv6 networking in your containers. Use the followingflags for IPv4 address retrieval for a network device named eth0:

For IPv6 use the -6 flag instead of the -4 flag. For other networkdevices, replace eth0 with the correct device name (for example docker0for the bridge device).

Set ulimits in container (--ulimit)

Since setting ulimit settings in a container requires extra privileges notavailable in the default container, you can set these using the --ulimit flag.--ulimit is specified with a soft and hard limit as such:<type>=<soft limit>[:<hard limit>], for example:


If you do not provide a hard limit, the soft limit is usedfor both values. If no ulimits are set, they are inherited fromthe default ulimits set on the daemon. The as option is disabled now.In other words, the following script is not supported:

The values are sent to the appropriate syscall as they are set.Docker doesn’t perform any byte conversion. Take this into account when setting the values.

Run Ubuntu Docker Image On Mac

For nproc usage

Be careful setting nproc with the ulimit flag as nproc is designed by Linux to set themaximum number of processes available to a user, not to a container. For example, start fourcontainers with daemon user:

The 4th container fails and reports “[8] System error: resource temporarily unavailable” error.This fails because the caller set nproc=3 resulting in the first three containers using upthe three processes quota set for the daemon user.

Stop container with signal (--stop-signal)

The --stop-signal flag sets the system call signal that will be sent to the container to exit.This signal can be a valid unsigned number that matches a position in the kernel’s syscall table, for instance 9,or a signal name in the format SIGNAME, for instance SIGKILL.

Optional security options (--security-opt)

On Windows, this flag can be used to specify the credentialspec option.The credentialspec must be in the format file://spec.txt or registry://keyname.

Stop container with timeout (--stop-timeout)

The --stop-timeout flag sets the timeout (in seconds) that a pre-defined (see --stop-signal) system callsignal that will be sent to the container to exit. After timeout elapses the container will be killed with SIGKILL.

Specify isolation technology for container (--isolation)

This option is useful in situations where you are running Docker containers onWindows. The --isolation <value> option sets a container’s isolation technology.On Linux, the only supported is the default option which usesLinux namespaces. These two commands are equivalent on Linux:

On Windows, --isolation can take one of these values:

defaultUse the value specified by the Docker daemon’s --exec-opt or system default (see below).
processShared-kernel namespace isolation (not supported on Windows client operating systems older than Windows 10 1809).
hypervHyper-V hypervisor partition-based isolation.

Run Ubuntu In Docker On Windows 7

The default isolation on Windows server operating systems is process. The defaultisolation on Windows client operating systems is hyperv. An attempt to start a container on a clientoperating system older than Windows 10 1809 with --isolation process will fail.

On Windows server, assuming the default configuration, these commands are equivalentand result in process isolation:

If you have set the --exec-opt isolation=hyperv option on the Docker daemon, orare running against a Windows client-based daemon, these commands are equivalent andresult in hyperv isolation:

Specify hard limits on memory available to containers (-m, --memory)

These parameters always set an upper limit on the memory available to the container. On Linux, thisis set on the cgroup and applications in a container can query it at /sys/fs/cgroup/memory/memory.limit_in_bytes.

On Windows, this will affect containers differently depending on what type of isolation is used.

  • With process isolation, Windows will report the full memory of the host system, not the limit to applications running inside the container

  • With hyperv isolation, Windows will create a utility VM that is big enough to hold the memory limit, plus the minimal OS needed to host the container. That size is reported as “Total Physical Memory.”

Configure namespaced kernel parameters (sysctls) at runtime

The --sysctl sets namespaced kernel parameters (sysctls) in thecontainer. For example, to turn on IP forwarding in the containersnetwork namespace, run this command:


Not all sysctls are namespaced. Docker does not support changing sysctlsinside of a container that also modify the host system. As the kernelevolves we expect to see more sysctls become namespaced.

Currently supported sysctls

IPC Namespace:

Run Ubuntu Docker On Mac

Can We Run Ubuntu Docker On Windows

  • kernel.msgmax, kernel.msgmnb, kernel.msgmni, kernel.sem,kernel.shmall, kernel.shmmax, kernel.shmmni, kernel.shm_rmid_forced.
  • Sysctls beginning with fs.mqueue.*
  • If you use the --ipc=host option these sysctls are not allowed.

Network Namespace:

Run Ubuntu Docker On Windows

  • Sysctls beginning with net.*
  • If you use the --network=host option using these sysctls are not allowed.

Parent command

Run Ubuntu In Docker On Windows 10

dockerThe base command for the Docker CLI.
  • Most Viewed News

    • Best Free Unzip For Mac
    • Soundcloud Downloader Safari Extension
    • Bigo Connector For Mac
    • Microsoft Download For Mac Student