All Questions
43 questions
1
vote
1
answer
202
views
Shopware 6: Docker exec chown fails in Git Bash script with "No such file or directory"
I have a Git Bash script that runs some Docker commands to set up my Shopware container. One of the commands uses docker exec to run sudo chown on a path inside the container:
docker exec -it $...
0
votes
0
answers
66
views
docker-compose fails to change ownership on ubuntu 22.04.3 on VMware Workstation
VMware Workstation: 16.2.5/17.0.2
Ubuntu: 20.04.6/22.04.3
Dockerfile:
FROM debian:12.1-slim
WORKDIR /root
RUN groupadd -f ernie-1001 -g 1001 \
&& groupadd -f ernie-1000 -g 1000 \
&...
0
votes
1
answer
235
views
Сontent of the directory is only partially bonded in Docker Volumes
I have a Node.JS service running in a Docker container that deploys related Docker containers (Docker-outside-of-Docker) through REST.
The actions sequence (inside the NodeJS container):
Create a new ...
2
votes
0
answers
1k
views
Running Airflow in Docker \ chown: changing ownership of '/sources/{logs,dags,plugins}': Invalid argument
When I try to start the Airflow services with docker compose --profile flower up, the following errors occur when starting the airflow-airflow-init-1 container:
chown: changing ownership of '/sources/...
0
votes
0
answers
769
views
Docker COPY --chown ownership sometimes applies to
I have the following Dockerfile
FROM python:3.11
# Create non-root user to run with
ARG USERNAME=bean
ARG USER_UID=999
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME && useradd ...
0
votes
1
answer
1k
views
Limactl: How to fix chown problems?
I tried running this docker compose file
https://docs.sorry-cypress.dev/guide/dashboard-and-api
I used the docker template
limactl start --name=docker template://docker
With the following mounts ...
0
votes
0
answers
342
views
Docker chown folder on volume binded with magento
I am actually blocked because when I add this command in my Dockerfile
"RUN ln -s /etc/nginx/sites-available/local.magento /etc/nginx/sites-enabled" to activate my virtual host, I have ...
1
vote
1
answer
1k
views
Docker permissions with base image for non-root user
I have a base image that does a couple of installments with root permission, then create a new user, change owner of the WORKDIR then switch to the user. The child image will inherit this image with ...
5
votes
1
answer
20k
views
Docker EACCES permission denied mkdir
My friend gave me a project with a dockerfile which seems to work just fine for him but I get a permission error.
FROM node:alpine
RUN mkdir -p /usr/src/node-app && chown -R node:node /usr/...
0
votes
0
answers
232
views
Can't change ownership of '/dev/gpiomem' in a docker container in RPi
I'm trying to run a simple docker container with a python base image to control the LEDs on my RPi4.
The Dockerfile compiles fine and I'm running it as follows:
docker run --rm -ti --privileged --...
0
votes
0
answers
1k
views
Change file ownership for external persistent volume of MySQL Container
This is a tricky one.
I have the official MySQL Docker container with a persistent volume.
I realized that the performance was quite bad, so I stopped the container, moved the files on the host system ...
0
votes
0
answers
96
views
Chown in Dockerfile works sporadically
I already read the discussions about chown and volumes in dockerfile but I could not solve my problem.
My dockerfile:
FROM ubuntu:latest
WORKDIR /tests/
RUN mkdir /tests/logs
RUN mkdir /tests/...
0
votes
0
answers
4k
views
Docker MongoDB -> chown: changing ownership of *: Operation not permitted
I know this is a duplicate, but I tried every solution and there is no solution that works.
Informations:
Docker-Compose 3.9
MacOS Big Sur 11.5
My Docker-compose.yml
version: '3.9'
services:
...
0
votes
0
answers
705
views
Dockerfile chown is being overwritten
I am installing newrelic php agent in a customer dockerfile executing nginx and php-fpm.
The dwefault user and group running are www-data
I am creating the logs dir for newrelic and chowning to www-...
0
votes
2
answers
443
views
chown failed during docker container start up, when trying to change a config file mounted from host
I have a simple question regarding to docker. I am trying to run a openmicroscopy/apacheds container in a linux host using root. I have my own config.ldif file, and mapping into the container's ...
0
votes
0
answers
680
views
How to set owner of directory in Docker
I'm trying to create a directory owned by a specific user in Docker. I'm using this Dockerfile:
FROM node:14.4.0-alpine
COPY package*.json ./
RUN npm install .
ENV PATH=/node_modules/.bin:$PATH
RUN ...
1
vote
1
answer
3k
views
How to set laravel file permissions inside a docker image
I have the following dockerfile to build my Laravel web application. After I run it I get permission errors when trying to acccess the vendor and storage directories. My question is what is the ...
3
votes
1
answer
8k
views
Chown permission denied while Docker volume binding
I ran this command but container doesn't run:
docker container run -p 6379:6379 -v /home/user/redis/data:/data redis
And after checking its logs:
find: '.' Permission denied
chown: changing ownership ...
1
vote
0
answers
97
views
Docker: how to get ownership of $HOME?
I have a function Docker image which runs a specific analysis pipeline: the pipeline runs correctly, I get my results, the container exits etc. However, I am getting warnings/errors that a certain ...
2
votes
1
answer
3k
views
Docker inside Docker in a Kubernetes Cluster
I am trying to run a Jenkins pod in a Kubernetes cluster on bare metal.
I was trying to implement docker in docker as I need to build a Docker image in a pipeline so I mount /var/run/docker.sock as ...
3
votes
3
answers
3k
views
permission denied error on tomcat docker image deployment to openshift container - /usr/local/tomcat/conf/web.xml (permission denied)
Here is my Dockerfile content. When I run this locally it works well but when I try to deploy it on the openshift container it throws permission denied error
FROM tomcat:8.0.36-jre8
CMD ...
0
votes
1
answer
2k
views
Copy and chown files into a docker bind mount at runtime
I have nginx and wordpress in docker containers, which share a volume bind mount (i.e. mapped to files on disk) for /var/www/html.
At runtime I need to add files to the mapped directory, chown them, ...
0
votes
0
answers
509
views
What does chown 999 do? [duplicate]
I know what chmod (change mode) and what chown (change owner) do.
I also understand what the numbers mean after chmod do.
I was going through a docker tutorial and I saw chown 999 being used.
What ...
2
votes
1
answer
5k
views
Dockerfile chown command cannot change the containers folder permission
I tried the following post.
How to set up laravel nginx and mysql with docker compose
But Dockerfile is not changing the permission of /var/www to www:www.
due to that all the php artisan commands ...
-1
votes
1
answer
2k
views
Unable to change folder ownership using Chown in docker file
I'm unable to change ownership of a folder when running chown in the dockerfile. Currently /app/Data is owned by root and I'm trying to give ownership to moduleuser.
Here's my dockerfile:
FROM ...
1
vote
1
answer
4k
views
Permission in docker Container just partly working with chown
I have a problem with access rights in a Docker Container. I am copiyng a folder from the host to the docker image into the folder /var/www/html. This folder has a deeper folder structure. Then, I ...
31
votes
3
answers
127k
views
Dockerfile "RUN chmod" not taking effect
Everything else takes effect but permissions are not changing, am I missing something?
FROM joomla:3.9-php7.2-apache
RUN apt-get update \
&& apt-get install -y apt-utils vim curl
COPY ./...
0
votes
2
answers
363
views
Bash script incorrectly incorporating \r into variable
I have an environment setup script which I am building in a docker container. It takes a properties file which is key=value pairs, and then goes through and uses them to create an environment. The ...
2
votes
2
answers
2k
views
Docker changes owner of local files mounted as volume
I cannot find anywhere answer why docker changes owner of files mounted as volume. Before docker run:
$ ls -la
total 56
drwxrwxr-x 9 ci ci 4096 Mar 13 21:13 .
drwxrwxr-x 4 ci ci 4096 Mar 13 21:12 ..
-...
0
votes
1
answer
485
views
Docker - Ownership lost after mounting a single file
I'm trying to get used to Docker and I now stumbled upon a delicate problem which I was not able to solve yet.
(Im working on Windows 10, but the same problem applies to Debian)
I would like to run ...
3
votes
1
answer
13k
views
chown returns invalid user in Dockerfile
Can someone help me sort the below issue out? I am trying to spin up an ubuntu image with the below Dockerfile
FROM ubuntu:16.04
RUN apt-get -q -y update && \
apt-get -q -y upgrade &&...
3
votes
0
answers
3k
views
GitLab CI + Docker container and volume file permissions
I'm running a pipeline with GitLab CI, and I've set up a server with a runner, following GitLab's documentation (https://docs.gitlab.com/runner/install/linux-manually.html, and https://docs.gitlab.com/...
2
votes
2
answers
8k
views
How to fix denied permission to access a directory if that directory was added during docker build?
I using the following Dockerfile to extend a docker image:
FROM solr:6.6
COPY --chown=solr:solr ./services-core/search/A12Core /A12Core/
Note that solr:6.6 has a USER solr statement.
When running ...
1
vote
1
answer
2k
views
Installing global package with sudo yields permissions error during postinstall routine
I am trying to run this command on CircleCI:
sudo npm install -g --loglevel=warn @oresoftware/r2g
I get this error:
#!/bin/bash -eo pipefail
sudo npm install -g --loglevel=warn @oresoftware/r2g
/...
0
votes
0
answers
3k
views
Dockerfile chown not working
I have a dockerfile setup
FROM node:8.10.0
USER node
RUN mkdir /home/node/.npm-global
ENV PATH=/home/node/.npm-global/bin:$PATH
ENV NPM_CONFIG_PREFIX=/home/node.npm-global
RUN npm install -g @...
3
votes
1
answer
17k
views
Docker Entrypoint Script Root Permission
I have a Dockerfile that has 3 constraints:
1.) The final USER statement in the Dockerfile must be USER tomcat for security purposes (it is built off the tomcat:8.5.23-jre8-alpine image)
2.) It ...
0
votes
1
answer
2k
views
File permissions on docker display "?"
My docker file looks like
# https://github.com/elastic/elasticsearch-docker
FROM docker.elastic.co/elasticsearch/elasticsearch:5.5.1
USER root
RUN rm -rf /home/*
RUN adduser -d /home/backup backup
...
12
votes
1
answer
15k
views
docker-node: Running as non-root user, file permissions
Following docker-node’s best practices, I want to run my node app as non-root user. The recommendation is as follows:
FROM node:6.10.3
...
# At the end, set the user to use when running this image
...
21
votes
3
answers
14k
views
Wordpress on Docker: Could not create directory on mounted volume
Here is are the original files in the Wordpress Docker container on path /var/www/html:
$ docker exec 5b957c7b9c5ad054883694afbfb80d3c9df6707458d55011f471be0701f3890c ls -l
total 192
-rw-r--r-- 1 ...
4
votes
1
answer
11k
views
How to give docker container write/chmod permissions on mapped volume?
I have a synology NAS which has docker support and wanted to run some docker containers (I'm pretty new to Docker) on it. For example pocketmine-pm (but I believe I have the write issue also with ...
9
votes
1
answer
42k
views
chown docker volumes on host (possibly through docker-compose)
I have the following example
version: '2'
services:
proxy:
container_name: proxy
hostname: proxy
image: nginx
ports:
- 80:80
- 443:443
volumes:
- proxy_conf:/...
28
votes
6
answers
12k
views
Why does chown increase size of docker image?
I can't understand why the 'chown' command should increase the size of my docker image?
The following Dockerfile creates an image of size 5.3MB:
FROM alpine:edge
RUN adduser example -D -h /example -...
117
votes
6
answers
187k
views
why doesn't chown work in Dockerfile? [closed]
My Dockerfile creates a directory, chown's it, and then lists the directory afterwards. The directory is still owned by root. Why is that?
Here is the Dockerfile:
FROM ubuntu:precise
RUN useradd -...