logo
down
shadow

Docker: permission on file created by npm inside the container


Docker: permission on file created by npm inside the container

By : user2954904
Date : November 22 2020, 10:33 AM
I think the issue was by ths following , Users and Groups do not sync from host->container.
Your services in the container are running as root (UID:0 GID:0). Any files created by root in the container will need root access on the host.
code :


Share : facebook icon twitter icon
How to mount the volume of host to docker container with executable file permission using docker api

How to mount the volume of host to docker container with executable file permission using docker api


By : user3437252
Date : March 29 2020, 07:55 AM
will help you I haven't used the remote API, but the problem is that you've passed it all as a single argument, so it's looking for a file called "pip install -r requirements.txt&& python manage.py runserver 0.0.0.0:8888".
You need to figure out how to pass the arguments separately, and you may need to give an absolute path to pip.
Permission denied error invoking Docker on Mac host from inside Docker Ubuntu container as non-root user

Permission denied error invoking Docker on Mac host from inside Docker Ubuntu container as non-root user


By : 胡屹然
Date : March 29 2020, 07:55 AM
Hope this helps I got this working, at least automated but currently only working on docker for Mac. Docker for Mac has a unique file permission model. Chowning /var/run/docker.sock to the jenkins user manually works, and it persists across container restarts and even image regeneration, but not past docker daemon restarts. Plus, you can't do the chown in the Dockerfile because docker.sock doesn't exist yet, and you can't do it in the entrypoint because that runs as jenkins.
So what I did was add jenkins to the "staff" group, because on my Mac, /var/run/docker.sock is symlinked down into /Users//Library/Containers/com.docker.docker/Data/‌​s60 and is uid and gid staff. This lets the jenkins user run docker commands on the host.
code :
FROM jenkins:latest

USER root

RUN \
    apt-get update && \
    apt-get install -y build-essential && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

COPY docker /usr/bin/docker

# To allow us to access /var/run/docker.sock on the Mac
RUN gpasswd -a jenkins staff

USER jenkins

ENTRYPOINT ["/bin/tini", "--", "/usr/local/bin/jenkins.sh"]
version: "3"
services:
  jenkins:
    build: ./cd_jenkins
    image: cd_jenkins:latest
    ports:
      - "8080:8080"
      - "5000:5000"
    volumes:
      - ./jenkins_home:/var/jenkins_home
      - /var/run/docker.sock:/var/run/docker.sock
How do I connect to local machine from inside of docker container created by docker-compose?

How do I connect to local machine from inside of docker container created by docker-compose?


By : Xander
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , Docker compose is just a utility for starting multiple Docker containers. Thus almost all things that apply to starting a container using docker run are the same for containers started with docker-compose.
In particular, since you are on a MAC, there is a special DNS name inside the container that resolved to the host machine.
code :
environment:
    REDIS_HOST: redis
    WEB_APP: host.docker.internal
Strange file permission in docker container (question marks on permission bit and user bit)

Strange file permission in docker container (question marks on permission bit and user bit)


By : siva
Date : March 29 2020, 07:55 AM
This might help you This problem is related to the storage-driver bug, see https://github.com/moby/moby/issues/28391, https://github.com/moby/moby/issues/20240. Currently I can only change storage-driver to overlay, use the default aufs or recommended overlay2 will break.
Copy files inside of docker container before volumes are created (Solr docker image with custom configuration)

Copy files inside of docker container before volumes are created (Solr docker image with custom configuration)


By : user3657974
Date : March 29 2020, 07:55 AM
Any of those help You can add your commands to your docker compose file ( https://docs.docker.com/compose/compose-file/#command)
code :
version: '3.3'
services:
  solr:
  image: "solr:7.3.1"
  ports:
    - "8983:8983"
  volumes:
      - ./solr/conf/solr-mapping.xml:/opt/solr/conf/schema.xml

  command: 'bash -e -c "precreate-core mycore; cp /opt/solr/conf/schema.xml /opt/solr/server/solr/mycores/mycore/conf/schema.xml; cp /opt/solr/conf/solrconfig.xml /opt/solr/server/solr/mycores/mycore/conf/solrconfig.xml; rm /opt/solr/server/solr/mycores/mycore/conf/managed-schema; solr-foreground;"'
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org