GithubHelp home page GithubHelp logo

Comments (5)

smishr4 avatar smishr4 commented on April 30, 2024 1

I think probably something to do the way docker creates the directory on linux machine.
docker/compose#2781 (comment)

https://stackoverflow.com/questions/33509752/docker-compose-creates-file-owned-by-root

Anyways instead of doing mkdir build the neater solution would be to just give the permission using chown

Doing this works too:

sudo chown -R $USER:$USER .
docker-compose up

Thanks
Since this is problem with the way docker is working on ubuntu, you can close this issue and create a reference. Again its a great project and I am kinda struggling with graphql-relay as I have only learned graphql just recently using express-graphql with graphiql interface to write queries, if you can suggest me a good place to start from, that would be a good help.

from relay-starter-kit.

smishr4 avatar smishr4 commented on April 30, 2024

And I forgot to mention, my operating system is ubuntu-16.04 -- xfce desktop

from relay-starter-kit.

shadowbrush avatar shadowbrush commented on April 30, 2024

Out of the box, Docker on Ubuntu requires root, see: https://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo

from relay-starter-kit.

smishr4 avatar smishr4 commented on April 30, 2024

That I fixed when I tried my first docker program. I made a small express program, and a simple Dockerfile:
# Use latest node image
FROM node:9-alpine
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
CMD ["npm", "start" ]
EXPOSE 4000

and I built image using the following:
docker build -t node-docker .
and then ran the image using:
docker run -p 4000:4000 -v ~/testProjects/node-docker/:/usr/src/app node-docker

the source, node_modules and package.json everything inside my project directory and I am able to run this without sudo after adding the $USER to docker usergroup.

but I still have the problem that I created the issue for.

from relay-starter-kit.

 avatar commented on April 30, 2024

@smishr4 On our side, other than running an initial mkdir build as the account running docker-compose up. I don't know another way around it. The interesting thing is that this only happens for me on my ubuntu server, not on my local macOS. would be curious as to why that initial folder creation is run under root context.

from relay-starter-kit.

Related Issues (20)

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.

  • 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.

  • 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.

  • D3 photo D3

    Data-Driven Documents codes.