Full error log (i uploaded to github to simplify): https://raw.githubusercontent.com/seriseyes/bitbucket-error/main/error
# bitbucket-pipelines.ymlimage: node:21.6.0-alpine3.19pipelines:custom:deploy: - step:runs-on: officename: Build and Push Docker Imagesize: 2xscript: - docker info - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin harbor.medsoft.care - TAG=$(echo $BITBUCKET_COMMIT | head -c 8) # Use the first 8 characters of the commit hash as the tag - DOCKER_BUILDKIT=1 docker build -t harbor.medsoft.care/medsoft8/ui:$TAG . - docker push harbor.medsoft.care/medsoft8/ui:$TAGafter-script: - cat /root/.npm/_logs/*services: - docker
#DockerfileFROM node:21.6.0-alpine3.19 as builderWORKDIR /appCOPY package*.json ./RUN npm installCOPY . .RUN npm run buildFROM nginx:alpineWORKDIR /usr/share/nginx/htmlRUN rm -rf ./*COPY --from=builder /app/dist .COPY nginx.conf /etc/nginx/conf.d/default.confEXPOSE 3000CMD ["nginx", "-g", "daemon off;"]
Hi @bayarkhuu and welcome to the community!
The exit code: 137 mentioned in the logs you provided usually indicates a memory issue.
Your step has size: 2x, so 8 GB of memory will be available for this step (if the host machine has that memory available). However, the docker service gets only 1024 MB of that memory. This is the default amount of memory that a service gets unless you specify otherwise in your bitbucket-pipelines.yml file.
For a step with size: 2x, you can configure a service to use up to 7128 MB of memory. You can do that by adding in your bitbucket-pipelines.yml file a definition as follows (you can change the value to anything up to 7128):
definitions: services: docker: memory: 2048
You can check our documentation on services for more details:
Please feel free to let me know how it goes and if you have any questions.
Kind regards,Theodora
It looks like you're new here. Sign in or register to get started.