Adjust uploaded files permission
This commit is contained in:
1 parent
28a6211457
commit
ccfda4c054
2 files changed
+40
-9
No files matched your search
@@ -3844,19 +3844,25 @@ export async function getContainerTop(id: string, envId?: number | null): Promis
|
||||
export async function execInContainer(
|
||||
containerId: string,
|
||||
cmd: string[],
|
||||
envId?: number | null
|
||||
envId?: number | null,
|
||||
user?: string | null
|
||||
): Promise<string> {
|
||||
// Create exec instance
|
||||
const execBody: any = {
|
||||
Cmd: cmd,
|
||||
AttachStdout: true,
|
||||
AttachStderr: true,
|
||||
Tty: false
|
||||
};
|
||||
|
||||
if (user) {
|
||||
execBody.User = user;
|
||||
}
|
||||
|
||||
const execCreate = await dockerJsonRequest<{ Id: string }>(
|
||||
`/containers/${containerId}/exec`,
|
||||
{
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
Cmd: cmd,
|
||||
AttachStdout: true,
|
||||
AttachStderr: true,
|
||||
Tty: false
|
||||
})
|
||||
body: JSON.stringify(execBody)
|
||||
},
|
||||
envId
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user