No space issue Jenkins – in docker

I am running Jenkins inside docker.
i receive the following space issue.

gzip: /tmp/sbt_a74fec8a/xoquick-1.0.tar.gz: No space left on device
java.lang.RuntimeException: Error gziping /tmp/sbt_a74fec8a/xoquick-1.0.tar. Exit code: 1
    at scala.sys.package$.error(package.scala:27)
    at com.typesafe.sbt.packager.universal.Archives$.gzip(Archives.scala:93)
    at com.typesafe.sbt.packager.universal.Archives$$anonfun$9.apply(Archives.scala:111)
    at com.typesafe.sbt.packager.universal.Archives$$anonfun$9.apply(Archives.scala:111)
    at com.typesafe.sbt.packager.universal.Archives$$anonfun$makeTarball$1.apply(Archives.scala:136)
    at com.typesafe.sbt.packager.universal.Archives$$anonfun$makeTarball$1.apply(Archives.scala:118)
    at sbt.IO$.withTemporaryDirectory(IO.scala:285)
    at com.typesafe.sbt.packager.universal.Archives$.makeTarball(Archives.scala:118)
    at com.typesafe.sbt.packager.universal.Archives$$anonfun$10.apply(Archives.scala:111)
    at com.typesafe.sbt.packager.universal.Archives$$anonfun$10.apply(Archives.scala:111)
    at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:35)
    at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:34)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
    at sbt.std.Transform$$anon$
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
    at sbt.CompletionService$$anon$
    at java.util.concurrent.Executors$
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$
[error] (universal:packageZipTarball) Error gziping /tmp/sbt_a74fec8a/xoquick-1.0.tar. Exit code: 1
[error] Total time: 7 s, completed Feb 5, 2015 9:41:58 AM
Build step 'Build using sbt' changed build result to FAILURE
Build step 'Build using sbt' marked build as failure
SSH: Current build result is [FAILURE], not going to run.
Finished: FAILURE

In docker I navigated to /tmp folder

  • How to run a command on a linked docker container?
  • How to access nodemon log on running docker container
  • Connecting to an H2 Database in a Docker Container
  • Can I use docker engine with the latest pycharm 2016.3.2 on windows 10 pro
  • How do I restore a dump file from mysqldump using kubernet?
  • Connecting to running docker containers from localhost
  • cd /tmp/

    and then

    df -h .
    Filesystem            Size  Used Avail Use% Mounted on
                      9.9G  9.1G  316M  97% /

    I have sufficient place left inside.Why is the job failing to work?

    i have checked this

    No issue with inode also.There is sufficient inodes available.Can somebody tell me what is the problem?

  • docker updates AWS ELB ports
  • Connection Refused Error 61: Scrapy+splash Docker
  • Cannot get more than one port to be exposed with docker [duplicate]
  • Docker File: Chmod on Entrypoint Script
  • Deploying Docker images from Gitlab's private Docker registry to Openshift
  • Docker-Squash command not working
  • One Solution collect form web for “No space issue Jenkins – in docker”

    Jenkins jobs can typically consume more that ~300m of space with all build artefacts, whatever you upload to your Docker container, the size of your version control checkout etc.

    Add this to root’s crontab to clean old containers periodically. Enter sudo crontab -e to edit:

    @daily  (echo "Cleaning Docker images at $(date):"; docker rm $(docker ps -a -q); docker rmi $(docker images | grep '<none>' | tr -s ' ' | cut -d ' ' -f 3)) &>> /var/log/dockerClean.log

    (you could substitute adding the SHELL line for 2>&1 > /var/log/dockerClean.log if you prefer sh, or omit it and make no change if bash is default on your system)

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.