building docker image: cannot allocate memory

I am building a docker image using the  the fabric8/docker maven plugin and end up with the following error:

Unable to build image: Error processing tar file(exit status 1): write /usr/share/zoneinfo/posix/Pacific/Wallis: cannot allocate memory

 

my pipeline is:

image: maven:3.5

options:
docker: true

clone:
depth: 5

pipelines:
custom:
build-deploy-to-beta: &beta
- step:
caches:
- maven
script:
- curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
- unzip awscli-bundle.zip
- ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
- $BITBUCKET_CLONE_DIR/src/main/ci/configure-maven.sh
- $(aws ecr get-login --no-include-email)
- mvn verify docker:build docker:push
- $BITBUCKET_CLONE_DIR/bin/update-search-task.sh beta ${BITBUCKET_COMMIT:0:5}
branches:
master: *beta

When I execute the pipeline on a local docker image as per https://confluence.atlassian.com/bitbucket/debug-your-pipelines-locally-with-docker-838273569.html

I don't get the error. I start my local image with:

docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker --volume=/mls-search:/mls --workdir="/mls" --memory=4g --memory-swap=4g --entrypoint=/bin/bash maven:3.5

 

What is different between the local docker build and the bitbucket one so I can reproduce the issue locally?

 

1 answer

1 accepted

0 vote

Possibly this has just been caused by an intermittent operational error with Bitbucket Pipelines, see the following incident:

Accordingly, things might just work if you try again now?

Thanks.

 

That was it.

Glad to hear @Xavier Naud - please also 'accept' my answer as solution via the checkmark on the left side so that it doesn't show up as unanswered anymore, thereby keeping others and myself focused on and motivated to assist with new questions :) - thanks!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,764 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you