Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pipeline: Container 'docker' exceeded memory limit (Vuejs)

Adan J. Suarez
Contributor
January 10, 2020

Hello everyone:

I've been fighting with this problem for three days already. The thing is, I have a pipeline to deploy my container in AWS ECR and it fail saying: Container 'docker' exceeded memory limit, when I push my master branch.

It is a frontend in Vuejs with a Nginx server, as it is recommended in Vue documentation, it is not big and I assigned - I think - enough resources.

I've been trying different memory configuration, in size: 1x and 2x and, memory: 1024, 2048... 7128. And none of them works. It build in my end. 

Any idea other than memory? I think I tried all combinations.

The following is my `bitbacket-pipeline.yml`:

image: node:12

pipelines:
default:
- step:
size: 1x
caches:
-
node

script:
-
npm install
-
npm run test:unit

branches:
master:
-
step:
size: 2x
caches:
-
node
script:
-
npm install
-
npm run test:unit
# Build the image.
-
docker build -t beautiful-frontend .
# use the pipe to push the image to AWS ECR
-
pipe: atlassian/aws-ecr-push-image:1.0.2
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
IMAGE_NAME: beautiful-frontend
services:
-
docker

definitions:
service:
docker:
# Memory docker-in-docker
memory: 7128

 

3 answers

2 votes
jeromemiranda
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 18, 2020

Have the same issue, already using 

      options:    

           size2x

and

      definitions:    

            services:        

                   docker:            

                        memory: 6144 

 

but still the same problem

1 vote
pritij March 10, 2020

@Adan J. Suarez  did you find any solution for the memory issue?

In our case, the build fails at npm run build step.

Adan J. Suarez
Contributor
March 12, 2020

Yes, I did. In our Dockerfile we changed as follow:

(original):

FROM node:12

(new version):

FROM node:12-alpine

The alpine version is smaller and that solved the problem. Hope that helps!

Like Chris Heale likes this
Johan Montan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 1, 2022

This solved my problem that I had in Azure Static Web Apps (azure-static-web-apps-deploy). Thanks!

0 votes
Antoine Büsch
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 16, 2020

Hi Adan,

at which point exactly is the error occuring? Is it when calling the pipe?

Cheers,

Antoine

Adan J. Suarez
Contributor
January 16, 2020

Not, it is when building the container image.

Like Deleted user likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events