How to solve the problem of insufficient permissions when switching users in docker container

How to solve the problem of insufficient permissions when switching users in docker container

When switching users in the docker container, it prompts that the permissions are insufficient:

Solution:

The container is started with privileges:

docker run -i -t --privileged -v /home/dora:/home/dora centos_ora /bin/bash

Additional knowledge: Docker runs with normal permissions under Linux

When installing Docker in Linux, it will be installed by default with the permission of the user named docker. It is inconvenient to switch users when using it.

In order to use the command directly, you need to add the current user to the docker group

sudo usermod -aG docker your_username

Restart to take effect!

The above article on how to solve the problem of insufficient permissions when switching users in a docker container is all I have to share with you. I hope it can give you a reference, and I also hope that you will support 123WORDPRESS.COM.

You may also be interested in:
  • Directory permissions when creating a container with Docker
  • How to enable minimum privileges when using iptables in a Docker container
  • Solution to the Docker container not having permission to write to the host directory

<<:  Detailed explanation of the use of MySQL concatenation function CONCAT

>>:  Detailed explanation of how two Node.js processes communicate

Blog    

Recommend

Detailed explanation of html printing related operations and implementation

The principle is to call the window.print() metho...

Analysis of the difference between emits and attrs in Vue3

Table of contents in conclusion Practice Analysis...

MySQL configuration SSL master-slave replication

MySQL5.6 How to create SSL files Official documen...

Introduction to TypeScript basic types

Table of contents 1. Basic types 2. Object Type 2...

Using zabbix to monitor the ogg process (Windows platform)

This article introduces how to monitor the ogg pr...

Vue uses vue-quill-editor rich text editor and uploads pictures to the server

Table of contents 1. Preparation 2. Define the gl...

Installation and configuration tutorial of MongoDB under Linux

MongoDB Installation Choose to install using Yum ...

HTML table only displays the outer border of the table

I would like to ask a question. In Dreamweaver, I...

Vue+Vant implements the top search bar

This article example shares the specific code of ...

A few front-end practice summaries of Alipay's new homepage

Of course, it also includes some personal experien...

Recommended 20 best free English handwriting fonts

Jellyka BeesAntique Handwriting [ank]* Jellyka Cut...

Summary of Mysql update multi-table joint update method

Next, I will create two tables and execute a seri...