浏览代码

try to give more memory to the docker build process

ksieren 3 年之前
父节点
当前提交
587af43d35
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Jenkinsfile

+ 1 - 1
Jenkinsfile

@@ -50,7 +50,7 @@ spec:
       steps {
         container('docker') {
           sh "echo ${env.GIT_COMMIT}"
-          sh "docker build --no-cache -t ${imageNameWithTag} . && docker tag ${imageNameWithTag} ${imageNameTagLatest}"
+          sh "docker build --no-cache --memory=2G -t ${imageNameWithTag} . && docker tag ${imageNameWithTag} ${imageNameTagLatest}"
           sh "docker login --username $DOCKERHUB_CREDS_USR --password $DOCKERHUB_CREDS_PSW && docker push ${imageNameWithTag} && docker push ${imageNameTagLatest}"
           sh "docker run --rm --entrypoint tar ${imageNameWithTag} cCj /var/www . > ${project}-${imageTag}.tar.bz2"
           archiveArtifacts "${project}-${imageTag}.tar.bz2"