Skip to content

Commit 863765d

Browse files
authored
ci: use qemu-user-static from acr for alpine-arm64 (#310283)
1 parent 7133939 commit 863765d

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

build/azure-pipelines/alpine/product-build-alpine-node-modules.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ jobs:
6969
displayName: "Pull image"
7070
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
7171

72+
- task: Docker@1
73+
inputs:
74+
azureSubscriptionEndpoint: vscode
75+
azureContainerRegistry: vscodehub.azurecr.io
76+
command: "Run an image"
77+
imageName: "multiarch/qemu-user-static@sha256:fe60359c92e86a43cc87b3d906006245f77bfc0565676b80004cc666e4feb9f0"
78+
containerCommand: uname
79+
displayName: "Pull qemu-user-static image"
80+
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['NPM_ARCH'], 'arm64'))
81+
7282
- script: sudo apt-get update && sudo apt-get install -y libkrb5-dev
7383
displayName: Install build dependencies
7484
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))

build/azure-pipelines/alpine/product-build-alpine.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@ jobs:
109109
displayName: "Pull image"
110110
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
111111

112+
- task: Docker@1
113+
inputs:
114+
azureSubscriptionEndpoint: vscode
115+
azureContainerRegistry: vscodehub.azurecr.io
116+
command: "Run an image"
117+
imageName: "multiarch/qemu-user-static@sha256:fe60359c92e86a43cc87b3d906006245f77bfc0565676b80004cc666e4feb9f0"
118+
containerCommand: uname
119+
displayName: "Pull qemu-user-static image"
120+
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['NPM_ARCH'], 'arm64'))
121+
112122
- script: sudo apt-get update && sudo apt-get install -y libkrb5-dev
113123
displayName: Install build dependencies
114124
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))

build/npm/postinstall.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ async function npmInstallAsync(dir: string, opts?: child_process.SpawnOptions):
7373
log(dir, `Installing dependencies inside container ${process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME']}...`);
7474

7575
if (process.env['npm_config_arch'] === 'arm64') {
76-
run('sudo', ['docker', 'run', '--rm', '--privileged', 'multiarch/qemu-user-static', '--reset', '-p', 'yes'], syncOpts);
76+
run('sudo', ['docker', 'run', '--rm', '--privileged', 'vscodehub.azurecr.io/multiarch/qemu-user-static@sha256:fe60359c92e86a43cc87b3d906006245f77bfc0565676b80004cc666e4feb9f0', '--reset', '-p', 'yes'], syncOpts);
7777
}
7878
run('sudo', [
7979
'docker', 'run',

0 commit comments

Comments
 (0)