Skip to content

Instantly share code, notes, and snippets.

Created August 5, 2013 11:47
  • Star 37 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Allows installing the ubuntu "fuse" package without creating any devices. Used to install packages on docker which require fuse but do not actively use it.
# Fake a fuse install
RUN apt-get install libfuse2
RUN cd /tmp ; apt-get download fuse
RUN cd /tmp ; dpkg-deb -x fuse_* .
RUN cd /tmp ; dpkg-deb -e fuse_*
RUN cd /tmp ; rm fuse_*.deb
RUN cd /tmp ; echo -en '#!/bin/bash\nexit 0\n' > DEBIAN/postinst
RUN cd /tmp ; dpkg-deb -b . /fuse.deb
RUN cd /tmp ; dpkg -i /fuse.deb
Copy link

fjakobs commented Jan 30, 2014

+1 was really useful

Copy link

htulipe commented Feb 2, 2014

Cool stuff, I had to add -y and --force-yes options to apt-get in order to get this working.

Copy link

+1 Saved me a ton of tail chasing

Copy link

pratio commented Apr 14, 2014

I was getting so pissed, this works so well. I had to add -y though. Thanks for this..

Copy link

@htulipe you can use -yy instead :)

Copy link

gtrak commented Jun 17, 2014

Henrik, any chance you could put a license on this? I know, sorry.

EDIT: nevermind.

Copy link

Kosmas commented Jul 6, 2014

+1. Thank you

Copy link

m0dd3r commented Aug 29, 2014

Running dpkg-deb -x in /tmp changes the directory permissions on /tmp from the default 777 to 755. This caused an issue for me running java as a non-root user since defaults to /tmp, which is no longer writable. Creating /tmp/fuse and doing the work in there appears to have fixed the problem for me.

Copy link

hernad commented Apr 7, 2015

+1. Thank you

Copy link

Kurt29 commented Jan 11, 2018

that throws an error in Ubuntu Xenial:
/var/lib/dpkg/info/fuse.postinst: 1: /var/lib/dpkg/info/fuse.postinst: -en: not found
echo '#!/bin/bash\nexit 0\n' -en> DEBIAN/postinst &&
Did you have to use modprobe fuse for it to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment