Error While Creating Mount Source Path '/Host_Mnt/C/Users/Xxx/Redis.Conf': Mkdir /Host_Mnt/C/Users/Xxx: Permission Denied

error while creating mount source path '/host_mnt/c/Users/xxx/redis.conf': mkdir /host_mnt/c/Users/xxx: permission denied

I have found a fix it is to create a new users account which is the same username as your AzureAD account, but without the AzureAD prefix. Now it's working!

https://tomssl.com/2018/01/11/sharing-your-c-drive-with-docker-for-windows-when-using-azure-active-directory-azuread-aad/

Cannot change permissions for 'RUN chmod +x /app-entrypoint.sh' in Dockerfile

The COPY step will create the file with the uid/gid of 0:0 (root:root) within the / directory where normal users have no access. And the selected base image is configured to run as uid 1001. Probably the easiest is to switch back to root temporarily to run that step.

FROM docker.io/bitnami/jasperreports:7-debian-10
USER root
COPY custom-entrypoint.sh /app-entrypoint.sh
USER 1001
RUN chmod +x /app-entrypoint.sh

Alternatively, you can copy the script to a directory where the user has access with the right ownership on the file. Without pulling the image, I suspect /opt/bitnami/scripts may have different permissions:

FROM docker.io/bitnami/jasperreports:7-debian-10
COPY --chown=1001 custom-entrypoint.sh /opt/bitnami/scripts/app-entrypoint.sh
RUN chmod +x /opt/bitnami/scripts/app-entrypoint.sh

Issue: Error while running ubuntu bash shell in docker

It looks like your OS is missing pseudo-terminals (PTY) - a device that has the functions of a physical terminal without actually being one.

The file /dev/ptmx is a character file with major number 5
and minor number 2, usually of mode 0666 and owner.group
of root.root. It is used to create a pseudo-terminal mas­ter and slave pair.

FILES

  • /dev/ptmx - UNIX 98 master clone device
  • /dev/pts/* - UNIX 98 slave devices
  • /dev/pty[p-za-e][0-9a-f] - BSD master devices
  • /dev/tty[p-za-e][0-9a-f] - BSD slave devices

Reference: http://man7.org/linux/man-pages/man7/pty.7.html

This is by default included into Linux kernel. Maybe lack of it is somehow related to your OS architecture. Also, I'm not sure how can you fix, maybe try to update && upgrade OS.

Quick workaround if you don't need a tty would be to skip -t flag:

docker run -i ubuntu bash

In docker run -it, -i/--interactive means "keep stdin open" and -t/--tty means "tell the container that stdin is a pseudo tty". The key here is the word "interactive". If you omit the flag, the container still executes /bin/bash but exits immediately. With the flag, the container executes /bin/bash then patiently waits for your input. That means now you will have bash session inside the container, so you can ls, mkdir, or do any bash command inside the container.



Related Topics



Leave a reply



Submit