Skip to content

Commit b4a0584

Browse files
committed
sync package-lock.json; build docker for multiple architectures
We have folks on Apple M1 (arm64) computers who need to run canvas RCE API. Also changing from "npm install" to "npm ci" to speed up builds and strictly respect the package-lock.json. The package-lock.json was out of sync with package.json. This commit fixes that too. refs QUIZ-10725 Test Plan: * replace your docker-compose.override.yml with this: version: '3' services: web: image: starlord.inscloudgate.net/jenkins/canvas-rce-api:53.311253.11 volumes: - .:/usr/src/app command: - npm - run - start:dev * this works on both Apple M1 and Apple Intel: docker-compose up Change-Id: Ieabc515ae2b9e7c07a89d2470f55115d507e2372 Reviewed-on: https://gerrit.instructure.com/c/canvas-rce-api/+/311253 Tested-by: Service Cloud Jenkins <[email protected]> Reviewed-by: Yona Appletree <[email protected]> QA-Review: Yona Appletree <[email protected]> Product-Review: Jacob DeWar <[email protected]>
1 parent 92596ca commit b4a0584

File tree

4 files changed

+94
-74
lines changed

4 files changed

+94
-74
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM instructure/node-passenger:16
1+
FROM --platform=${TARGETPLATFORM:-"linux/amd64"} instructure/node-passenger:16
22
COPY --chown=docker:docker . /usr/src/app
33

4-
RUN npm install
4+
RUN npm ci

Jenkinsfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ pipeline {
4141
stage('Push latest to Starlord') {
4242
when { environment name: "GERRIT_EVENT_TYPE", value: "change-merged" }
4343
steps {
44-
sh 'docker build --tag starlord.inscloudgate.net/jenkins/canvas-rce-api:latest .'
45-
sh 'docker push starlord.inscloudgate.net/jenkins/canvas-rce-api:latest'
44+
sh 'docker buildx build --builder multi-platform-builder --pull --push --platform=linux/amd64,linux/arm64 --tag "starlord.inscloudgate.net/jenkins/canvas-rce-api:latest" --tag "starlord.inscloudgate.net/jenkins/canvas-rce-api:master" .'
4645
}
4746
}
4847
}

0 commit comments

Comments
 (0)