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?