Quickly resize a filesystem and/or partition
4.2K
A quick one-off ubuntu based image - will be replaced with one of my gentoo-based busybox images soon.
[rancher@rancher ~]$ cat Dockerfile.resize2fs FROM ubuntu RUN apt-get update RUN apt-get install -y cloud-guest-utils parted udev
COPY resize-fs.sh /entry.sh
ENTRYPOINT ["/entry.sh"] [rancher@rancher ~]$ cat resize-fs.sh #!/bin/bash RESIZE_DEV="$1" test -b /dev/${RESIZE_DEV} || export RESIZE_DEV="" if [ "X${RESIZE_DEV}" = "X" ] ; then echo "Must set RESIZE_DEV=[/dev/a_valid_block_device]" exit 1 elif [ "${RESIZE_DEV}" = "xvda1" ] ; then resize2fs /dev/${RESIZE_DEV} else growpart /dev/${RESIZE_DEV} 1 partprobe resize2fs /dev/${RESIZE_DEV} fi
Content type
Image
Digest
Size
102.5 MB
Last updated
over 10 years ago
docker pull guruvan/resize2fs