Set exec LANG via rest API only

This commit is contained in:
Johannes Zellner
2022-11-16 16:08:54 +01:00
parent 013e15e361
commit 0b6bbf4cc2
2 changed files with 7 additions and 3 deletions

View File

@@ -2460,10 +2460,12 @@ async function createExec(app, options) {
// When passing binary data, tty must be disabled. In addition, the stdout/stderr becomes a single
// unified stream because of the nature of a tty (see https://github.com/docker/docker/issues/19696)
Tty: options.tty,
Cmd: cmd,
Env: [ 'LANG=C.UTF-8' ]
Cmd: cmd
};
// currently the webterminal and cli sets C.UTF-8
if (options.lang) createOptions.Env = [ 'LANG=' + options.lang ];
return await docker.createExec(app.containerId, createOptions);
}