sparse-intern-71089
11/18/2021, 12:41 PMwooden-student-58350
11/18/2021, 12:43 PM// index.ts
const repository = new awsx.ecr.Repository(...)
repository.buildAndPushImage({
context: sourcePath,
extraOptions: ["--platform=linux/amd64"],
})
In the CI pipeline:
error: Error: ' docker build --platform=linux/amd64 ../app -t d2f5d933-container' failed with exit code 1
at /builds/.../node_modules/@pulumi/docker.ts:592:15
at Generator.next (<anonymous>)
at fulfilled (/builds/.../node_modules/@pulumi/docker/docker.js:18:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
error: spawn docker ENOENT
# .gitlab-ci.yml
deploy:
stage: deploy
rules:
- if: '$CI_OPEN_MERGE_REQUESTS == null'
image: pulumi/pulumi-nodejs:3.17.1
services:
- docker:20.10.8-dind
variables:
GIT_SUBMODULE_STRATEGY: recursive
DOCKER_TLS_CERTDIR: "/certs"
before_script:
- echo "Running deployment for production"
script:
- npm ci --prefix infra
- pulumi up --yes --stack $CI_COMMIT_BRANCH
The GitLab Runner is using the docker executor on a container using the docker:20.10.8
image, running in privileged mode (following advice in GitLab docs for building Docker images inside Docker).No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by