Skip to content

Commit 9061e7e

Browse files
authored
feat(loong64): use tonistiigi/binfmt:latest (#2549)
1 parent adef3f0 commit 9061e7e

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js
2-
index fa8da7d..abd8957 100644
2+
index fa8da7d..5e2f51b 100644
33
--- a/build/npm/postinstall.js
44
+++ b/build/npm/postinstall.js
5-
@@ -55,5 +55,7 @@ function npmInstall(dir, opts) {
5+
@@ -53,8 +53,9 @@ function npmInstall(dir, opts) {
6+
log(dir, `Installing dependencies inside container ${process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME']}...`);
7+
68
opts.cwd = root;
79
- if (process.env['npm_config_arch'] === 'arm64') {
810
- run('sudo', ['docker', 'run', '--rm', '--privileged', 'multiarch/qemu-user-static', '--reset', '-p', 'yes'], opts);
9-
- }
10-
+ if ((process.env['npm_config_arch'] === 'arm64' || process.env['npm_config_arch'] === 'arm' || process.env['npm_config_arch'] === 'ppc64' || process.env['npm_config_arch'] === 'riscv64' || process.env['npm_config_arch'] === 's390x') && process.env['DISABLE_QEMU'] !== 'true') {
11+
+ const emulateArchList = ['arm64', 'arm', 'ppc64', 'riscv64', 's390x', 'loong64'];
12+
+ if (process.env['DISABLE_QEMU'] !== 'true' && !!process.env['npm_config_arch'] && emulateArchList.includes(process.env['npm_config_arch'])) {
1113
+ run('sudo', ['docker', 'run', '--rm', '--privileged', 'tonistiigi/binfmt:latest', '--install', 'all'], opts);
12-
+ } else if (process.env['npm_config_arch'] === 'loong64') {
13-
+ run('sudo', ['docker', 'run', '--rm', '--privileged', 'loongcr.lcpu.dev/multiarch/archlinux', '--reset', '-p', 'yes'], opts);
14-
+ }
14+
}
1515
run('sudo', [
16+
'docker', 'run',

0 commit comments

Comments
 (0)