This commit is contained in:
parent
10a39edcf2
commit
e3df23a09e
|
@ -3,7 +3,7 @@ MAINTAINER Liang Ding <dl88250@gmail.com>
|
|||
|
||||
ADD . /wide/gogogo/src/github.com/b3log/wide
|
||||
|
||||
RUN useradd runner
|
||||
RUN useradd wide && chown -R wide:wide /wide && useradd wide_runner
|
||||
|
||||
ENV GOROOT /usr/src/go
|
||||
ENV GOPATH /wide/gogogo
|
||||
|
|
|
@ -110,12 +110,12 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
|
|||
cmd.SysProcAttr = &syscall.SysProcAttr{}
|
||||
cmd.SysProcAttr.Cloneflags = syscall.CLONE_NEWUSER | syscall.CLONE_NEWNS | syscall.CLONE_NEWUTS | syscall.CLONE_NEWPID | syscall.CLONE_NEWIPC | syscall.CLONE_NEWNET
|
||||
cmd.SysProcAttr.Credential = &syscall.Credential{
|
||||
Uid: 1000,
|
||||
Gid: 1000,
|
||||
Uid: 0,
|
||||
Gid: 0,
|
||||
}
|
||||
|
||||
cmd.SysProcAttr.UidMappings = []syscall.SysProcIDMap{{ContainerID: 1000, HostID: 1000, Size: 1}}
|
||||
cmd.SysProcAttr.GidMappings = []syscall.SysProcIDMap{{ContainerID: 1000, HostID: 1000, Size: 1}}
|
||||
cmd.SysProcAttr.UidMappings = []syscall.SysProcIDMap{{ContainerID: 0, HostID: 1001, Size: 1}}
|
||||
cmd.SysProcAttr.GidMappings = []syscall.SysProcIDMap{{ContainerID: 0, HostID: 1001, Size: 1}}
|
||||
|
||||
stdout, err := cmd.StdoutPipe()
|
||||
if nil != err {
|
||||
|
|
Loading…
Reference in New Issue