You need to log out of windows then your docker users

docker,for-win | Docker for Windows - Requires log out You need to log out of Windows Then your "docker-users" membership will be taken into account

Recommend Projects

  • React photo

    React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo

    Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo

    Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo

    TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo

    Django

    The Web framework for perfectionists with deadlines.

  • Laravel photo

    Laravel

    A PHP framework for web artisans

  • D3 photo

    D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Visualization

    Some thing interesting about visualization, use data art

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo

    Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo

    Microsoft

    Open source projects and samples from Microsoft.

  • Google photo

    Google

    Google ❤️ Open Source for everyone.

  • Alibaba photo

    Alibaba

    Alibaba Open Source for everyone

  • D3 photo

    D3

    Data-Driven Documents codes.

  • Tencent photo

    Tencent

    China tencent open source team.

Top Asked Questions

  1. How to start Docker services at Windows Start-up?

    In the Register-ScheduledTaskline change the account user and password to an account user that needs Docker services to be started at the Windows start-up. Execute registerTask.ps1 Open Windows Powershell as Administrator and set the current directory to where you have placed registerTask.ps1. For example cd C:PewershellScripts

  2. Does Docker desktop work on Windows 10?

    Docker only supports Docker Desktop on Windows for those versions of Windows 10 that are still within Microsoft’s servicing timeline. Containers and images created with Docker Desktop are shared between all user accounts on machines where it is installed. This is because all Windows accounts use the same VM to build and run containers.

  3. Where does Docker desktop keep logs about startup issues?

    That location is for specific containers, not for Docker Desktop in general. Where does Docker Desktop keep logs about its startup issues? C:Users%username%AppDataRoamingDockerloghost This issue had to do with the proxy settings in settings.json found here:

  4. How to check Docker logs on Mac?

    Mac provides a built-in log viewer, named Console, which you can use to check Docker logs. The Console lives in /Applications/Utilities. You can search for it with Spotlight Search. To read the Docker app log messages, type docker in the Console window search bar and press Enter.

Recently Recipes

Yogurt-Filled Chocolate Cauldrons image

Yogurt-Filled Chocolate Cauldrons

Cute chocolate «cauldrons» hold a cool, creamy orange-flavored yogurt in this recipe. The unfilled cups…

Provided by Taste of Home

MOLTEN CHOCOLATE LAVA CAKE image

Demi-Glace image

Demi-Glace

This is my technique for veal demi-glace, and there’s not much to it. I’m going for a pure veal stock…

Provided by Chef John

Easy Butterfinger Cake image

Easy Butterfinger Cake

OMG!!! I had to make this cake this past Sunday for my Mary Kay party.. It was a huge hit. It was also…

Provided by vicky hunt

Pork Neck Slow Cooker Stew image

Pork Neck Slow Cooker Stew

Good food doesn’t always have to cost a fortune! Your family will love this. Full of flavor and easy…

Provided by Melissa Baldan

Steamed Parsley Red Potatoes image

Steamed Parsley Red Potatoes

This is a very good potato dish , I stem baby red potatoes and smother them in real butter and parsley…

Provided by Karla Everett

Classic Portuguese Beans - {Feijao A Portuguesa} Recipe - (5/5) image

ROAST PORK (LECHON ASADO) image

Tomato and Bacon Clam Chowder image

Homemade Chicken Pot Pie image

Homemade Chicken Pot Pie

Sure you can make a quick Chicken Pot Pie using already made pie crust, canned soups, vegetables and…

Provided by Julia Ferguson

Red Velvet Pound Cake image

Red Velvet Pound Cake

This delicious red velvet pound cake is the perfect combination of flavors. Make sure the cake has cooled…

Provided by Taste of Home

Boudreaux's Zydeco Stomp Gumbo image

Boudreaux’s Zydeco Stomp Gumbo

Dis is da toe curlin Texicajun hybrid of a classic dish. This will put a smile on everyone’s face that’s…

Provided by Lupe Boudreaux

Pesto Baked Pork Chops image

Pesto Baked Pork Chops

This is a tender and delicious baked pork chop recipe, with an Italian flair.

Provided by larvia57

RASPBERRY PUNCH image

RASPBERRY PUNCH image

Previous

Next

More about «docker desktop requires log out food»

DOCKER WINDOWS HOW TO KEEP CONTAINER RUNNING WITHOUT …

WebMar 8, 2019 Right click -> properties -> Log On and enter the service account details under «This account». Finally, under general, select automatic (delayed) start and start …
From stackoverflow.com
Reviews 3
See details »


HOW TO GET LOGS OUT OF A CRASHING DOCKER DESKTOP CONTAINER

WebIf you remove the docker run -d option, it will run in the foreground and print its logs directly to the local console. If it also crashes promptly, then you’ll get a shell prompt back right …
From stackoverflow.com
See details »


HOW TO FIX «YOU MUST BE IN THE DOCKER-USERS GROUP» ERROR IN …

Web1. Find username # First, we need to figure out what our username is. Open Windows + R Type netplwiz and press Enter This will list all User IDs of the computer. Find the …
From logfetch.com
See details »


NOT ABLE TO START DOCKER DESKTOP IN WINDOWS — STACK OVERFLOW

WebMay 5, 2021 -> docker —version As I found the error which is showing docker daemon is not running in windows while running any other docker commands on CMD. I also …
From stackoverflow.com
See details »


CHANGE DOCKER DESKTOP SETTINGS ON WINDOWS

WebStart Docker Desktop when you log in. Select to automatically start Docker Desktop when you log into your machine. Choose Theme for Docker Desktop. Choose whether you …
From docs.docker.com
See details »


DOCKER DESKTOP | DOCKER DOCUMENTATION

WebDocker Desktop Commercial use of Docker Desktop in larger enterprises (more than 250 employees OR more than $10 million USD in annual revenue) requires a paid …
From docs.docker.com
See details »


GETTING STARTED WITH DOCKER DESKTOP

WebMar 29, 2022 If you look at the command, there are a few flags after the command “ docker run” to get the container running. A simple explanation for them is:-d runs the …
From docker.com
See details »


CAN’T INSTALL DOCKER : DOCKER DESKTOP REQUIRES WINDOWS 10 PRO OR …

WebJan 19, 2021 Update: Windows 10 Home from build 2004 and above now supports Docker out of the box and it’s not necessary to follow any of the steps in the guide linked above. …
From stackoverflow.com
See details »


HOW DO I KEEP A DOCKER STACK RUNNING ON WINDOWS AFTER I LOGOUT?

WebNov 23, 2021 avbentem (Arjan van Bentem) November 23, 2021, 6:15am #3 Docker Desktop for Windows is meant for development, not for a production web server. If you …
From forums.docker.com
See details »


INSTALL ON WINDOWS | DOCKER DOCUMENTATION

WebDocker Desktop is free for small businesses (fewer than 250 employees AND less than $10 million in annual revenue), personal use, education, and non-commercial open source …
From docs.docker.com
See details »


UNABLE TO LOGIN TO DOCKER DESKTOP — DOCKER COMMUNITY …

WebDec 28, 2022 I am running Docker Desktop 4.5.1 on Windows 10, and it seems to function properly. However, I’m trying to use some features that require a paid account. I …
From forums.docker.com
See details »


UNABLE TO ACCESS DOCKER — DOCKER DESKTOP FOR WINDOWS — DOCKER …

WebOct 12, 2017 Unable to access docker Docker Desktop for Windows dawdocker (Dawdocker) July 24, 2017, 7:04am #1 When i click on Docker for Windows icon, i get a …
From forums.docker.com
See details »


DOCKER FOR WINDOWS CONTAINERS WHEN USER LOG OFF ON HOST MACHINE

WebSep 26, 2019 The active user runs docker-compose which consists of a linux container that has a port mapping XXXX:80. Everything works fine. When the user logs out their …
From forums.docker.com
See details »


DOCKER FOR WINDOWS — REQUIRES LOG OUT YOU NEED TO LOG …

WebJun 25, 2022 Docker for Windows — Requires log out You need to log out of Windows Then your «docker-users» membership will be taken into account #12798 Closed 2 of 3 tasks Fire-Break-158 opened this issue on Jun 25, 2022 · 2 comments Fire-Break-158 …
From github.com
See details »


WHERE CAN I SEE LOG FILES FOR FAILED DOCKER DESKTOP …

WebMay 11, 2021 Windows 10 Pro 64bit: 20H2, virtualization and hyper-v enabled Docker Desktop: 3.3.3.64133 Context: I used to successfully run Docker Desktop, but an …
From stackoverflow.com
See details »


DOCKER LOGOUT | DOCKER DOCUMENTATION

Webdocker logout | Docker Documentation Reference Command-line reference Docker CLI (docker) docker logout docker logout Log out from a registry Usage 🔗 $ docker logout …
From docs.docker.com
See details »


DOCKER DESKTOP REQUIRES LOG OUT — NEED TO LOG OUT WINDOWS

WebMay 19, 2020 Docker desktop requires log out — need to log out windows Docker Desktop for Windows prateeksichem (Prateeksichem) May 19, 2020, 3:50am #1 Hi, …
From forums.docker.com
See details »


OVERVIEW | DOCKER DOCUMENTATION

WebHow to diagnose and troubleshoot Docker Desktop issues Check the logs Find workarounds for common problems Troubleshoot menu 🔗 To navigate to Troubleshoot …
From docs.docker.com
See details »


Related Search


I am getting the following error

The current user is not in the ‘docker-users’ group. Add yourself to
the ‘docker-users’ group and then log out and back in to Windows.

How do I solve this on Windows 10 Home? All the examples I find are for enterprise or pro versions of Windows.

Promise Preston's user avatar

asked Apr 30, 2020 at 19:02

coolblue2000's user avatar

coolblue2000coolblue2000

3,3669 gold badges40 silver badges59 bronze badges

1

Run this command from an administrator command window to add your user id to the docker-users group and log back into your user account for it to take effect.

net localgroup docker-users "your-user-id" /ADD

your-user-id is your local Windows user name. You can determine this by looking at the folder name under C:Users .

Marco Faustinelli's user avatar

answered Aug 6, 2020 at 19:51

Pradyumna Revur's user avatar

Pradyumna RevurPradyumna Revur

1,0811 gold badge4 silver badges3 bronze badges

8

It might occur that the user-group «docker-users» not exist on your machine. In that case enter the following commands in the Powershell

New-LocalGroup -Name 'docker-users' -Description 'docker Users Group'

Add-LocalGroupMember -Group 'Administrators' -Member ('docker-users') –Verbose

Add-LocalGroupMember -Group 'docker-users' -Member ('Username','Administrators') –Verbose

answered Oct 10, 2020 at 12:18

Belekz's user avatar

1

Try restarting the system, that worked for me, as it pushed me to the group automatically.

answered Jun 3, 2022 at 7:46

Raw_Wish's user avatar

If you are installing Docker Desktop from Chocolatey, you might only need a restart, as you are put in that group automatically.

answered Mar 18, 2022 at 9:11

cederlof's user avatar

cederlofcederlof

7,0764 gold badges44 silver badges62 bronze badges

In my case, I just uninstall and reinstall the docker. And it fine now.

answered Jun 10, 2022 at 7:47

Muhammad Awais's user avatar

Muhammad AwaisMuhammad Awais

4,0801 gold badge38 silver badges36 bronze badges

After installing docker on my Windows 10 machine, When I tried to open the docker desktop application encountered with You are not allowed to use Docker . You must be in the “docker-users” group error.

To resolve this issue, You need to add your user to docker-users named group created under Computer Management/user and groups/groups

screenshot

Click on docker-users and add your username in the group.

docker

Apply the changes and then you need to restart your windows to let the changes come in effect

afterdocker

Note: You can refer “Docker Deep Dive” book if you want to understand the underlying concept of Docker. Very well designed for beginners and people who are looking to enhance their knowledge. It can also help you crack the interviews for DevOps with Docker concepts

Published by codenamebazinga

Just Another Geek!
View all posts by codenamebazinga

Published
October 10, 2019July 3, 2021

In this post, I describe how to install WSL 2 to serve as the backend for Docker Desktop for Windows. Previously I’ve always worked with Linux in a Virtual Machine using something like VMWare or Virtual Box, but I decided to give Docker Desktop a try, and was pleasantly surprised by the experience!

I’ll start by describing how to install WSL 2 based on the install documents, then show how to install Docker Desktop. Finally, I show the the experience of running a container and how it looks in Docker Desktop.

Installing WSL2

The Windows Subsystem for Linux (WSL) is a way to run a full Linux environment on your Windows machine, without having to install a «heavier» virtual machine, such as Virtual Box, VM Ware, or Hyper-V. WSL 2 also provides a mechanism for running Docker (with Linux containers) on your Windows machine. We’ll install it as a prerequisite for Docker Desktop for Windows.

If you’re running Windows Home, WSL 2 is the only way to run Docker Desktop. On Windows Pro, you can also use Hyper-V, but that is deprecated now, so WSL 2 is the way to go in all cases.

1. Install WSL 1

We’ll start by installing WSL 1 by enabling the WSL feature.

Open PowerShell as Administrator (I hit the Start key, type powershell and hit ctrl+shift+enter to open an elevated command prompt). Run the following, to enable WSL 1

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

You should see the following:

> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Deployment Image Servicing and Management tool
Version: 10.0.19041.746

Image Version: 10.0.19042.804

Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.

That enables WSL, but we’re going to enable the newer WSL 2 version, which Docker Desktop can use to run the VM it needs to run containers.

2. Enable the Virtual Machine feature

WSL 2 uses a lightweight VM, so you need to enable the Virtual Machine feature available in Windows 10 version 1903 and higher. In the same, elevated command prompt, run:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

You should see something like the following:

> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Deployment Image Servicing and Management tool
Version: 10.0.19041.746

Image Version: 10.0.19042.804

Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.

3. Restart

Time to restart your machine to ensure everything is registered correctly.

4. Install the WSL 2 update

Download the WSL2 Linux kernel update package for x64 machines and install it.

Note, if you see the following error when running the update, make sure you’ve restarted your machine afer installing the WSL 1 and VM features:

Error installing the WSL 2 update if you haven't restarted

The installer runs very quickly, and hopefully you’ll see a confirmation screen, something like the following:

Successfully installing the WSL 2 update

5. Set WSL 2 as your default version

This is an easy step, just run wsl --set-default-version 2 in any PowerShell window:

>wsl --set-default-version 2
For information on key differences with WSL 2 please visit https://aka.ms/wsl2

6. (Optional) Install a Linux distribution

We actually don’t need to install a Linux distribution to use Docker Desktop, but if you want to shell into Linux directly, you’ll need to install one. You can install a distribution directly from the Microsoft Store.

WSL 2 distributions available in the MS Store

The first time you launch the distribution, the distribution will extract and install, and you’ll need to set a username and password.

7. (Optional) Add to Windows Terminal

If you’re using Windows Terminal (you should be!) you can configure it to open your WSL distribution. The easiest way to do this is to open up the settings.json file and reset it. You can do this by deleting the contents of the file—Terminal will automatically repopulate it with the defaults, which will include a tab for WSL.

Obviously you won’t want to lose your setting customisations, so make sure to backup the contents of the file first!

You’re looking for WSL in the profiles list—add that to you profile list, and you’ll be able to quickly open up your WSL instance from Windows Terminal!

That’s the prerequisite starter for Docker Desktop covered, so now lets get to the main course!

1. Download and Install

Head to the Docker Desktop website and download the Installer for Windows.. This is a hefty ~500MB, but once it’s finished, run the installer.

On the first screen, ensure you keep «Install required components for WSL 2» checked:

Installing Docker Desktop for Windows

After clicking OK, the installer will unpack a whole load of files:

Installing Docker Desktop for Windows log

Before finally prompting you to log out of your Windows account to complete the installation:

Completing Docker Desktop for Windows install

2. Logout and back in

The Docker Desktop installer will automatically log you out of your Windows account on completion. When you sign back in, you’ll get a notification that Docker is starting the Linux Containers WSL 2 backend. Eventually, the main Docker Desktop window will pop up, and offer you a tutorial

Docker Desktop for Windows

3. Give it a try!

With Docker Desktop installed, you now have the docker command available in your command prompt:

> docker

Usage:  docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Options:
...

Now it’s installed, let’s take it for a spin!

Trying out Docker Desktop for Windows

For simplicity, we’ll run one of the .NET 5.0 sample apps available on DockerHub:

docker run -it --rm `
    -p 8000:80 `
    --name my-sample `
    mcr.microsoft.com/dotnet/samples:aspnetapp

This is a simple Razor Pages app, packaged in a Docker image, and ready to run. You can see the Dockerfile for the app here. When you run the above command Docker will pull the image, run it and start listening:

Unable to find image 'mcr.microsoft.com/dotnet/samples:aspnetapp' locally
aspnetapp: Pulling from dotnet/samples
45b42c59be33: Extracting [=========================>                         ]  13.57MB/27.1MB
752dcc4c3a04: Download complete
5ccb476d6b8b: Download complete
513626bd05cb: Downloading [======================>                            ]  472.8kB/1.
...
Status: Downloaded newer image for mcr.microsoft.com/dotnet/samples:aspnetapp
info: Microsoft.Hosting.Lifetime[0]
      Now listening on: http://[::]:80

If you navigate to http://localhost:8000/, you’ll see the app running there—a Linux container, running on Windows 🤯

Running the Linux app on Windows

The interesting thing, which I didn’t realise until I installed it, is that Docker Desktop for Windows installs a very nice UI for managing your containers!

The Docker Desktop container interface

If you click on the my-sample container row, you’ll see the logs for the container:

The Logs from a container in Docker Desktop

You can also inspect the environment variables, view stats about the container, or click CLI to open a shell inside (exec into) the container! You can do all these things from the command line obviously, and if you’re automating things, that’s definitely the right option. For casual or local development, personally I find you can’t beat a nice GUI!

Summary

In this post I described how to Install WSL, upgrade it to WSL 2, and how to install Docker Desktop. This requires a restart of Windows and a logout which is a bit annoying, but otherwise it went very smoothly. The Docker Desktop UI also looks very handy, in particular the ability to exec into a container—I’m always getting the CLI command wrong, so that will be very unseful!

By design Docker service and Docker Desktop start only when the user has logon to the Windows account. However, there is a way to start theses services as soon as the Windows has started or rebooted without having the user to manually login.

Why does it matter ..

There are some scenarios where this becomes useful when

  • docker services are accessed remotely by other machines
  • docker services are needed by the Build Pipelines such as Azure Devops

Usually in these cases the Windows machine running Docker services are unattended. It becomes painful when there are multiple servers in the network that are running Docker services and these servers restart due to windows update. In these scenarios a user will have to manually logon to the servers running Docker to have the Docker services started.

There is a way ..

Thankfully there is way to make this automatic. Thanks to inbuilt windows feature “Task Scheduler”. The Task Scheduler enables you to automatically perform routine tasks on a chosen computer.

For this you will need two sets of Powershell scripts;

registerTask script: This script will register a task with the Task Scheduler. This script needs to be executed once.

startDocker script: This will start docker on windows startup. This will get executed automatically by the registered task.

Follow these steps to achieve ..

1. Logon to the windows server/machine where you want the Docker services to start automatically.

2. Create a file called startDocker.ps1 at your location of choice and save the following script inside it:

start-service -Name com.docker.service
start C:'Program Files'DockerDocker'Docker Desktop.exe'

Verify that the location of Docker.exe is correct on your machine otherwise modify it in the script accordingly.

3. Create a file called registerTask.ps1 and save the following script inside it.

$trigger = New-ScheduledTaskTrigger -AtStartup
$action = New-ScheduledTaskAction -Execute "C:WindowsSystem32WindowsPowerShellv1.0powershell.exe" -Argument "-File C:PowershellScriptsstartDocker.ps1"
$settings = New-ScheduledTaskSettingsSet -Compatibility Win8 -AllowStartIfOnBatteries
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "Start Docker on Start up" -Settings $settings -User "Your user" -Password "Your user password" -RunLevel Highest

# Add the user to the docker-users user-group
# This is needed so that this user has access to docker services
try {
	Add-LocalGroupMember -Group docker-users -Member "Your user" -ErrorAction Stop
} catch [Microsoft.PowerShell.Commands.MemberExistsException] {
}

4. Modify the script: You will have to change a couple of things in the scripts above according to your computer/server.

In the $action line, change the location of startdocker.ps1 script file to where you have placed this file.

In the Register-ScheduledTask line change the account user and password to an account user that needs Docker services to be started at the Windows start-up.

5. Execute registerTask.ps1

Open Windows Powershell as Administrator and set the current directory to where you have placed registerTask.ps1. For example

cd C:PewershellScripts

Next execute this script as follows

.PowershellScripts

That’s all! Now Docker services will start automatically on Windows start. Please leave a feedback if it helped you or ask for help in the comments if you had troubles following this guide.

Понравилась статья? Поделить с друзьями:
  • You need to apply patch when licence screen appears windows 10
  • You need permission to perform this action windows 10
  • You need at least windows 10
  • You need a new app to open this windows defender
  • You must install the 64 bit windows imaging component