New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

with myself dockfile , fork/exec playground permission denied #295

Closed
xladykiller opened this Issue Dec 15, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@xladykiller

xladykiller commented Dec 15, 2016

1. this is my dockfile:

FROM centos:6.6

MAINTAINER pangm "shizc@asto-inc.com" 2016.12.15

ENV DEBIAN_FRONTEND noninteractive
ENV GOROOT /root/go/
ENV GOPATH /root/gopath/
ENV PATH $PATH:$GOROOT/bin/:$GOPATH/bin/
ENV TMPDIR /root/playground/

RUN useradd wide && useradd runner

RUN mkdir /root/gopath

ADD bin /root/bin

ADD conf /root/conf/

ADD static /root/static/

COPY views /root/views/

ADD go /root/go/

COPY gocode /root/gocode

COPY gotools /root/gotools

#COPY gotools /root/gopath/src/github.com/visualfc/gotools/

#COPY gocode /root/gopath/src/github.com/nsf/gocode/

RUN chmod +x /root/bin
RUN chmod +x /root/gocode
RUN chmod +x /root/gotools
RUN chmod -R +x /root/go/bin/

EXPOSE 17070

WORKDIR /root

CMD ["/root/bin","-docker=true","-channel=ws://192.168.7.7:17070"]

2. this is my startup script:

#!/usr/bin/env bash

sudo docker build -t wide .

sudo docker kill wide

sudo docker rm wide

#sudo docker run -it -d -p 7070:17070 -v /data/logs/ddd/:/data/logs/ddd --name wide wide:latest
sudo docker run -it -d -p 17070:17070 --name wide wide:latest

3. the result: when i run the playground, it show me permission denied

{
"IP": "${ip}",
"Port": "17070",
"Context": "",
"Server": "{IP}:{Port}",
"StaticServer": "",
"LogLevel": "debug",
"Channel": "ws://192.168.7.7:{Port}",
"HTTPSessionMaxAge": 86400,
"StaticResourceVersion": "${time}",
"MaxProcs": 4,
"RuntimeMode": "dev",
"WD": "${pwd}",
"Locale": "en_US",
"Playground": "${home}/playground",
"UsersWorkspaces": "${WD}/workspaces",
"AllowRegister": true,
"Autocomplete": true
}
D 2016/12/15 08:17:32 wide.go:176: ${pwd} [/root]
D 2016/12/15 08:17:32 wide.go:186: ${user.home} [/root]
D 2016/12/15 08:17:32 wide.go:221: ${ip} [172.17.0.71]
D 2016/12/15 08:17:32 wide.go:252: ${time} [1481789852658086506]
D 2016/12/15 08:17:32 main.go:91: host [go1.7.4, linux_amd64], cross-compilation [linux_amd64]
I 2016/12/15 08:17:32 main.go:188: Wide is running [172.17.0.71:17070]
D 2016/12/15 08:18:35 playgrounds.go:97: User [playground] has [0] sessions
D 2016/12/15 08:18:37 playgrounds.go:97: User [playground] has [0] sessions
E 2016/12/15 08:18:39 run.go:84: fork/exec /root/playground/8b7cc38b4c12e6fde5c4d15a4f2f32e5: permission denied

@88250

This comment has been minimized.

Show comment
Hide comment
@88250

88250 Dec 16, 2016

Member

add docker volume: -v ~/wide/playground:/playground/
then setup arg: -docker=true -playground=/playground

Member

88250 commented Dec 16, 2016

add docker volume: -v ~/wide/playground:/playground/
then setup arg: -docker=true -playground=/playground

@xladykiller

This comment has been minimized.

Show comment
Hide comment
@xladykiller

xladykiller Dec 19, 2016

@88250
it don't work,
E 2016/12/19 03:42:32 run.go:84: fork/exec /root/playground/8b7cc38b4c12e6fde5c4d15a4f2f32e5: permission denied

xladykiller commented Dec 19, 2016

@88250
it don't work,
E 2016/12/19 03:42:32 run.go:84: fork/exec /root/playground/8b7cc38b4c12e6fde5c4d15a4f2f32e5: permission denied

@88250

This comment has been minimized.

Show comment
Hide comment
@88250

88250 Dec 19, 2016

Member

Do you add -docker=true -playground=/playground in setup arg?

Member

88250 commented Dec 19, 2016

Do you add -docker=true -playground=/playground in setup arg?

@xladykiller

This comment has been minimized.

Show comment
Hide comment
@xladykiller

xladykiller Dec 19, 2016

in Dockfile, i add params in CMD.

/root/bin is wide.


WORKDIR /root

CMD ["/root/bin","-docker=true","-channel=ws://192.168.7.7:17070", "-playground=/root/playground/"]

xladykiller commented Dec 19, 2016

in Dockfile, i add params in CMD.

/root/bin is wide.


WORKDIR /root

CMD ["/root/bin","-docker=true","-channel=ws://192.168.7.7:17070", "-playground=/root/playground/"]

@88250

This comment has been minimized.

Show comment
Hide comment
@88250

88250 Dec 19, 2016

Member

I don't think I can help you..

Please research it by yourself, sorry :(

Member

88250 commented Dec 19, 2016

I don't think I can help you..

Please research it by yourself, sorry :(

@88250 88250 closed this Dec 19, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment