Skip to content

Instantly share code, notes, and snippets.

@henrik-muehe
Created August 5, 2013 11:47
Show Gist options
  • Save henrik-muehe/6155333 to your computer and use it in GitHub Desktop.
Save henrik-muehe/6155333 to your computer and use it in GitHub Desktop.
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
...
@fjakobs
Copy link

fjakobs commented Jan 30, 2014

+1 was really useful

@htulipe
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.

@leopoldodonnell
Copy link

+1 Saved me a ton of tail chasing

@pratio
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..

@anicholson
Copy link

@htulipe you can use -yy instead :)

@gtrak
Copy link

gtrak commented Jun 17, 2014

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

EDIT: nevermind.

@Kosmas
Copy link

Kosmas commented Jul 6, 2014

+1. Thank you

@m0dd3r
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 java.io.tmpdir 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.

@hernad
Copy link

hernad commented Apr 7, 2015

+1. Thank you

@Kurt29
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