Linux/Ubuntu Server

[docker] php에 권한주기

php에서 자동화시키려면 (docker 연동하려면)


php(apache)에게 sudo권한을주던가 해야한다.


docker는 docker 그룹에있ㄱ

php(apache)는 www-data에있다.


아 그리고... 쉘 스크립트 shell script를 통해서 docker 매크로를만들었을시엔

해당 쉘스크립트의 권한이 필요하므로 

실행시 소유자의 권한실행 (소유자가 root이거나 docker그룹이어야겠지) 으로 파일을 세팅해주면되겟다


난 root으로만들었으니

chmod 4755 해주면된다.


고로 둘이 합쳐주면 댄다.


^^


http://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo


^^^^^^^


뭐 로그아웃하면댄다던데

내가보기엔 로그아웃해도 아파치켜져잇어서

걍 리붓이 속시원 ^^



ample:

  • Add the docker group if it doesn't already exist:

    sudo groupadd docker
    
  • Add the connected user "${USER}" to the docker group. Change the user name to match your preferred user:

    sudo gpasswd -a ${USER} docker
    
  • Restart the Docker daemon:

    sudo service docker restart
    
  • If you are on Ubuntu 14.04 and up use docker.io instead:

    sudo service docker.io restart
    
  • Either do a newgrp docker or log out/in to activate the changes to groups.


,

알림

이 블로그는 구글에서 제공한 크롬에 최적화 되어있고, 네이버에서 제공한 나눔글꼴이 적용되어 있습니다.

카운터

Today :
Yesterday :
Total :

태그